How to run a vim script interactively from vim command line?

后端 未结 4 763
伪装坚强ぢ
伪装坚强ぢ 2021-02-14 05:32

Is there a way to run these scripts from the : commandline with a few keystrokes?

Over the last couple of months, I\'ve built a series of fi

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-14 05:49

    Open Vim and enter the following:

    :source /path/to/vim/file/name.vim
    

    If you are currently editing that file, you can also type:

    :w 
    :source % 
    

    The percent sign (%) means the path to the currently opened file.

提交回复
热议问题