How to source all vim files in directory

前端 未结 4 591
遥遥无期
遥遥无期 2021-01-31 16:14

I have split my .vimrc into several files and placed them into ~/vimfiles/vimrc.d/.

Currently I source each file in that directory using exact name:

4条回答
  •  失恋的感觉
    2021-01-31 16:56

    The example from DrAl did not work for me, this is how I achieved it:

    for fpath in split(globpath('~/.vimrc.d/', '*.vim'), '\n')
      exe 'source' fpath
    endfor
    

提交回复
热议问题