Created
February 24, 2011 08:47
-
-
Save ilstar/841931 to your computer and use it in GitHub Desktop.
当修改snippet脚本后,执行,rr可重新加载脚本,无需重启Vim
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
" 当修改snippet脚本后,执行,rr可重新加载脚本,无需重启Vim | |
function! ReloadSnippets( snippets_dir, ft ) | |
if strlen( a:ft ) == 0 | |
let filetype = "_" | |
else | |
let filetype = a:ft | |
endif | |
call ResetSnippets() | |
call GetSnippets( a:snippets_dir, filetype ) | |
endfunction | |
nmap ,rr :call ReloadSnippets(snippets_dir, &filetype)<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment