ches / dotfiles

Config files and stuff.

Clone this repository (size: 10.8 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/ches/dotfiles/
commit 84: 7a692779345c
parent 83: 894542cafa55
branch: default
vim: function to reload edited snipMate snippets on-the-fly
Ches Martin / ches
4 months ago

Changed (Δ429 bytes):

raw changeset »

.vim/plugin/snipMate.vim (18 lines added, 0 lines removed)

Up to file-list .vim/plugin/snipMate.vim:

@@ -245,4 +245,22 @@ fun! ShowAvailableSnips()
245
245
	return ''
246
246
endf
247
247
248
"
249
" Here be Hax!
250
"
251
" From user on Google Code, reload snippets. This probably shouldn't be added
252
" directly in the plugin like this...
253
function! ReloadSnippets( snippets_dir, ft )
254
    if strlen( a:ft ) == 0
255
        let filetype = "_"
256
    else
257
        let filetype = a:ft
258
    endif
259
260
    call ResetSnippets()
261
    call GetSnippets( a:snippets_dir, filetype )
262
endfunction
263
264
nmap ,rr :call ReloadSnippets(snippets_dir, &filetype)<CR>
265
248
266
" vim:noet:sw=4:ts=4:ft=vim