From 19f6f3b665834a684ffd0f1b25809222fa607888 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 28 Oct 2017 21:19:35 +1300 Subject: Set up .d-style vimrc subdir for config breakup Before loading up all the plugins proper from ~/.vim/bundle with Pathogen, apply :runtime to load all .vim files in a new config directory, installed by the Makefile. I hope that this will enable me to break most of my .vimrc up into logically-arranged subfiles. This is just a guess at a good way of doing this that will almost certainly need refinement and restructuring later. --- Makefile | 2 ++ vim/config/test.vim | 2 ++ vim/vimrc | 4 ++++ 3 files changed, 8 insertions(+) create mode 100644 vim/config/test.vim diff --git a/Makefile b/Makefile index 6cfee7a1..630eaf79 100644 --- a/Makefile +++ b/Makefile @@ -462,7 +462,9 @@ install-vim: install-vim-config \ install-vim-pathogen install-vim-config: + mkdir -p -- $(HOME)/.vim/config cp -p -- vim/vimrc $(HOME)/.vimrc + cp -p -- vim/config/*.vim $(HOME)/.vim/config install-vim-gui: install-vim \ install-vim-gui-config diff --git a/vim/config/test.vim b/vim/config/test.vim new file mode 100644 index 00000000..b92ea09e --- /dev/null +++ b/vim/config/test.vim @@ -0,0 +1,2 @@ +" Confirm that config subfiles are loading correctly +echo "Config subfiles loading!" diff --git a/vim/vimrc b/vim/vimrc index b64e4290..a6a67dc7 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -7,6 +7,10 @@ if has('multi_byte') scriptencoding utf-8 endif +" Load configuration files from ~/.vim/config or its analogue, before Pathogen +" loads all its directories into 'runtimepath' +runtime config/*.vim + " If our version isn't ancient and Pathogen is available, call it to load all " the plugins in .vim/bundle; these are saved as submodules if v:version >= 701 -- cgit v1.2.3