From 4c8346948c404ec9c6d69cf352f0e9d89e50b2e8 Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Mon, 19 Dec 2011 02:23:46 -0500 Subject: get rid of all the old cruft --- vim/compiler/coffee.vim | 68 ------------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100755 vim/compiler/coffee.vim (limited to 'vim/compiler') diff --git a/vim/compiler/coffee.vim b/vim/compiler/coffee.vim deleted file mode 100755 index 6d97cd8..0000000 --- a/vim/compiler/coffee.vim +++ /dev/null @@ -1,68 +0,0 @@ -" Language: CoffeeScript -" Maintainer: Mick Koch -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - -if exists('current_compiler') - finish -endif - -let current_compiler = 'coffee' -" Pattern to check if coffee is the compiler -let s:pat = '^' . current_compiler - -" Extra options passed to CoffeeMake -if !exists("coffee_make_options") - let coffee_make_options = "" -endif - -" Get a `makeprg` for the current filename. This is needed to support filenames -" with spaces and quotes, but also not break generic `make`. -function! s:GetMakePrg() - return 'coffee -c ' . g:coffee_make_options . ' $* ' . fnameescape(expand('%')) -endfunction - -" Set `makeprg` and return 1 if coffee is still the compiler, else return 0. -function! s:SetMakePrg() - if &l:makeprg =~ s:pat - let &l:makeprg = s:GetMakePrg() - elseif &g:makeprg =~ s:pat - let &g:makeprg = s:GetMakePrg() - else - return 0 - endif - - return 1 -endfunction - -" Set a dummy compiler so we can check whether to set locally or globally. -CompilerSet makeprg=coffee -call s:SetMakePrg() - -CompilerSet errorformat=Error:\ In\ %f\\,\ %m\ on\ line\ %l, - \Error:\ In\ %f\\,\ Parse\ error\ on\ line\ %l:\ %m, - \SyntaxError:\ In\ %f\\,\ %m, - \%-G%.%# - -" Compile the current file. -command! -bang -bar -nargs=* CoffeeMake make - -" Set `makeprg` on rename since we embed the filename in the setting. -augroup CoffeeUpdateMakePrg - autocmd! - - " Update `makeprg` if coffee is still the compiler, else stop running this - " function. - function! s:UpdateMakePrg() - if !s:SetMakePrg() - autocmd! CoffeeUpdateMakePrg - endif - endfunction - - " Set autocmd locally if compiler was set locally. - if &l:makeprg =~ s:pat - autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() - else - autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() - endif -augroup END -- cgit v1.2.3