Yanor.net/
Wiki
Blog
GitHub
Sandbox
開始行:
* 外部ファイルのインクルード [#x05e3147]
** runtime [#n5f04072]
runtime! mylib/*.vim
# パスが通ってない場合はruntimepathに設定する
set runtimepath+=$HOME/.vim/mylib
runtime! *.vim
- http://vim-jp.org/vimdoc-ja/repeat.html#using-scripts
*** runtimepathの確認 [#ud6f0b39]
echo &rtp
** source [#h84d2a0d]
if filereadable(expand('$HOME/mylib/foo.vim'))
source $HOME/mylib/foo.vim
endif
for f in split(glob('~/.vim/mylib/*.vim'), '\n')
exe 'source' f
endfor
- http://vim-jp.org/vimdoc-ja/repeat.html#using-scripts
** runtimeとsourceの違い [#m8daf105]
- sourceは引数にファイルのパス(相対パスか絶対パス)を指...
- runtimeはruntimepathで指定された検索パスの中から見つか...
https://stackoverflow.com/questions/7321073/whats-the-dif...
** 参考 [#de8537be]
https://unix.stackexchange.com/questions/171132/can-vimrc...
終了行:
* 外部ファイルのインクルード [#x05e3147]
** runtime [#n5f04072]
runtime! mylib/*.vim
# パスが通ってない場合はruntimepathに設定する
set runtimepath+=$HOME/.vim/mylib
runtime! *.vim
- http://vim-jp.org/vimdoc-ja/repeat.html#using-scripts
*** runtimepathの確認 [#ud6f0b39]
echo &rtp
** source [#h84d2a0d]
if filereadable(expand('$HOME/mylib/foo.vim'))
source $HOME/mylib/foo.vim
endif
for f in split(glob('~/.vim/mylib/*.vim'), '\n')
exe 'source' f
endfor
- http://vim-jp.org/vimdoc-ja/repeat.html#using-scripts
** runtimeとsourceの違い [#m8daf105]
- sourceは引数にファイルのパス(相対パスか絶対パス)を指...
- runtimeはruntimepathで指定された検索パスの中から見つか...
https://stackoverflow.com/questions/7321073/whats-the-dif...
** 参考 [#de8537be]
https://unix.stackexchange.com/questions/171132/can-vimrc...
ページ名: