schemer.vim (460B)
1 if !exists('g:schemer_no_autocmd') 2 augroup schemer_buffer 3 autocmd! * <buffer> 4 autocmd BufWritePost <buffer> SchemerGenerate | execute 'colorscheme '.expand('%:p:t:r') 5 augroup END 6 endif 7 8 command! -bar -buffer SchemerGenerate silent call Schemer#ProcessFile(expand('%:p')) 9 10 if !exists('b:undo_ftplugin') 11 let b:undo_ftplugin = '' 12 end 13 let b:undo_ftplugin .= '|exe "au! schemer_buffer * <buffer>"' 14 let b:undo_ftplugin .= '|delcommand SchemerGenerate'