-
-
Save akiradeveloper/3353873 to your computer and use it in GitHub Desktop.
| 擬似コードでいうとこういう感じなのではないかと推測. | |
| runtimepath = [..., .vim, .vim/after] | |
| def read_script_common(types): | |
| types.each do |type| | |
| runtimepath.each do |rp| | |
| source File.join(rp, type) | |
| # 単純に $ vim とした時 | |
| def launch_vim(): | |
| read_script_common(['plugin']) | |
| # vimを開いたあと, :e file | |
| def open_buffer(file): | |
| filetype <- file | |
| # filetypeに合ったものを読む. | |
| read_script_common(['ftplugin', 'indent', ...]) | |
| # $ vim file | |
| def open_file(file): | |
| launch_vim(); open_buffer(file) |
| plugin/any.vim | |
| after/plugin/any.vim | |
| ftplugin/haskell.vim | |
| after/ftplugin/haskell.vim | |
| indent/haskell.vim | |
| after/indent.haskell.vim | |
擬似コード修正
:set rtp でruntimepathを表示
runtimepath=/.vim/bundle/vim-ruby,/.vim/bundle/vim-textobj-indent,/.vim/bundle/textobj-user,/.vim/bundle/html-template-syntax,/.vim/bundle/syntastic,/.vim/bundle/neco-ghc,
/.vim/bundle/ghcmod-vim,/.vim/bundle/vim2hs,/.vim/bundle/haskellmode-vim,/.vim/bundle/vim-markdown,/.vim/bundle/vim-fugitive,/.vim/bundle/vim-localrc,/.vim/bundle/vim-quick/.vim/bundle/vim-ref,
run,/.vim/bundle/unite.vim,/.vim/bundle/vimproc,/.vim/bundle/vimfiler,/.vim/bundle/neocomplcache,/.vim/bundle/neobundle.vim,/.vim/bundle/vital.vim,/.v/.vim/bundle/dummy-vim-plugin,
im/bundle/L9,/.vim,/usr/local/opt/vim-7.3/share/vim/vimfiles,/usr/local/opt/vim-7.3/share/vim/vim73,/usr/local/opt/vim-7.3/share/vim/vimfiles/after/.vim/after,
,/.vim/bundle/neobundle.vim/,/.vim/bundle/vim2hs/after,/.vim/bundle/ghcmod-vim/after,/.vim/bundle/html-template-syntax/after
擬似コード(推測)
def NeoBundle(plugin):
runtimepath.add_head(plugin)
runtimepath.add_tail(plugin/after) if exist
全然予想どおりじゃねーよ