What's the difference between ':source file' and ':runtime file' in vim?

后端 未结 1 1485
小鲜肉
小鲜肉 2020-12-31 00:01

I saw this command in the /etc/vimrc file on my system:

runtime! vimrc_example.vim

From the docs:

:ru[n

相关标签:
1条回答
  • 2020-12-31 01:00

    :source sources the file specified by the path given (relative or absolute)

    :runtime sources the first file (unless banged!) found in &runtimepath that matches the partial path given.

    BTW, the pathnames used with :runtime can contain wildchars (somehow a glob-pattern). This has nothing to do with regexes.

    0 讨论(0)
提交回复
热议问题