summaryrefslogtreecommitdiffstats
path: root/autoload/coffee.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2013-09-12 16:17:03 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2013-09-12 16:17:03 +0200
commit01fe1500df97577452f755b526c09d8ed0c802ea (patch)
tree9e2e038630cc9e82abcd17da6dd3407a9b3bc62a /autoload/coffee.vim
parentdce12af91b404835938e95de9e6d839d52487ed5 (diff)
downloadvim-polyglot-01fe1500df97577452f755b526c09d8ed0c802ea.tar.gz
vim-polyglot-01fe1500df97577452f755b526c09d8ed0c802ea.zip
Add support for basic languages
coffee, cucumbeer, eruby, haml, haskell, javascript, json, less, nginx, ocaml, ruby, sass, scss, slim, stylus, textile, tmux
Diffstat (limited to 'autoload/coffee.vim')
-rw-r--r--autoload/coffee.vim54
1 files changed, 54 insertions, 0 deletions
diff --git a/autoload/coffee.vim b/autoload/coffee.vim
new file mode 100644
index 00000000..04d5efba
--- /dev/null
+++ b/autoload/coffee.vim
@@ -0,0 +1,54 @@
+" Language: CoffeeScript
+" Maintainer: Mick Koch <kchmck@gmail.com>
+" URL: http://github.com/kchmck/vim-coffee-script
+" License: WTFPL
+
+" Set up some common global/buffer variables.
+function! coffee#CoffeeSetUpVariables()
+ " Path to coffee executable
+ if !exists('g:coffee_compiler')
+ let g:coffee_compiler = 'coffee'
+ endif
+
+ " Options passed to coffee with make
+ if !exists('g:coffee_make_options')
+ let g:coffee_make_options = ''
+ endif
+
+ " Path to cake executable
+ if !exists('g:coffee_cake')
+ let g:coffee_cake = 'cake'
+ endif
+
+ " Extra options passed to cake
+ if !exists('g:coffee_cake_options')
+ let g:coffee_cake_options = ''
+ endif
+
+ " Path to coffeelint executable
+ if !exists('g:coffee_linter')
+ let g:coffee_linter = 'coffeelint'
+ endif
+
+ " Options passed to CoffeeLint
+ if !exists('g:coffee_lint_options')
+ let g:coffee_lint_options = ''
+ endif
+
+ " Pass the litcoffee flag to tools in this buffer if a litcoffee file is open.
+ " Let the variable be overwritten so it can be updated if a different filetype
+ " is set.
+ if &filetype == 'litcoffee'
+ let b:coffee_litcoffee = '--literate'
+ else
+ let b:coffee_litcoffee = ''
+ endif
+endfunction
+
+function! coffee#CoffeeSetUpErrorFormat()
+ CompilerSet errorformat=Error:\ In\ %f\\,\ %m\ on\ line\ %l,
+ \Error:\ In\ %f\\,\ Parse\ error\ on\ line\ %l:\ %m,
+ \SyntaxError:\ In\ %f\\,\ %m,
+ \%f:%l:%c:\ error:\ %m,
+ \%-G%.%#
+endfunction