Created
August 14, 2012 23:28
-
-
Save akiradeveloper/3353873 to your computer and use it in GitHub Desktop.
vimscriptの読み込み順
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 擬似コードでいうとこういう感じなのではないかと推測. | |
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugin/any.vim | |
| after/plugin/any.vim | |
| ftplugin/haskell.vim | |
| after/ftplugin/haskell.vim | |
| indent/haskell.vim | |
| after/indent.haskell.vim | |
擬似コード(推測)
def NeoBundle(plugin):
runtimepath.add_head(plugin)
runtimepath.add_tail(plugin/after) if exist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
: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