function Hlprs_LoadModules(dirz,...)
for module in a:1
execute 'source' fnameescape(a:dirz . '/'. module . '.vim')
endfor
endfunction
" General
call Hlprs_LoadModules("~/.vim/load/init", [
\ "general",
\ "keys"
\ ])
" Plugins
call Hlprs_LoadModules("~/.vim/load/modules", [
\ "autofenc",
\ "closetag",
\ "colorizer",
\ "ctags",
\ "cursorlinecurrentwindow",
\ "delimitmate",
\ "easymotion",
\ "indentline",
\ "largefile",
\ "lightline",
\ "localvimrc",
\ "matchtagalways",
\ "nerdtree",
\ "python-syntax",
\ "rainbow",
\ "sessionman",
\ "snipmate",
\ "syntastic",
\ "syntaxrange",
\ "table-mode",
\ "tagbar",
\ "taskwarrior",
\ "vim-diff-enhanced",
\ "vim-javascript",
\ "vim-slime",
\ "vim-virtualenv",
\ "vimwiki",
\ "vitality",
\ "youcompleteme",
\ "ctrlp",
\ "vim-plug",
\ "vim-javacomplete2"
\ ])
" Functions
call Hlprs_LoadModules("~/.vim/load/functions", [
\ "browser",
\ "common",
\ "cpp",
\ "django_templates",
\ "layout",
\ "qfix",
\ "tags",
\ "virtualenv",
\ "apply_autopep8",
\ "wrap_for_tmux"
\ ])
" autocmd
call Hlprs_LoadModules("~/.vim/load/autocmd", [
\ "cpp",
\ "generic",
\ "html",
\ "htmldjango",
\ "javascript",
\ "line_return",
\ "noext",
\ "other",
\ "python",
\ "quickfix",
\ "table-mode",
\ "text",
\ "vim",
\ ])
А я вот подумал, а не лучше ли сделать типа:
ls ~/.vim/load/autocmd
00_cpp.vim
01_generic.vim
02_html.vim
...
13_vim.vim
call Hlprs_LoadModules("~/.vim/load/init")
call Hlprs_LoadModules("~/.vim/load/modules")
call Hlprs_LoadModules("~/.vim/load/functions")
call Hlprs_LoadModules("~/.vim/load/autocmd")
Кто хочет заморочиться на vimL ? =)