Skip to content

Instantly share code, notes, and snippets.

@ilstar
Created February 24, 2011 08:47
Show Gist options
  • Save ilstar/841931 to your computer and use it in GitHub Desktop.
Save ilstar/841931 to your computer and use it in GitHub Desktop.
当修改snippet脚本后,执行,rr可重新加载脚本,无需重启Vim
" 当修改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