diff options
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/coffee.vim | 17 | ||||
-rw-r--r-- | ftdetect/cucumber.vim | 2 | ||||
-rw-r--r-- | ftdetect/haml.vim | 3 | ||||
-rw-r--r-- | ftdetect/haskell.vim | 2 | ||||
-rw-r--r-- | ftdetect/javascript.vim | 11 | ||||
-rw-r--r-- | ftdetect/json.vim | 8 | ||||
-rw-r--r-- | ftdetect/less.vim | 1 | ||||
-rw-r--r-- | ftdetect/nginx.vim | 1 | ||||
-rw-r--r-- | ftdetect/ruby.vim | 62 | ||||
-rw-r--r-- | ftdetect/slim.vim | 1 | ||||
-rw-r--r-- | ftdetect/stylus.vim | 3 | ||||
-rw-r--r-- | ftdetect/textile.vim | 8 | ||||
-rw-r--r-- | ftdetect/tmux.vim | 1 |
13 files changed, 120 insertions, 0 deletions
diff --git a/ftdetect/coffee.vim b/ftdetect/coffee.vim new file mode 100644 index 00000000..50569298 --- /dev/null +++ b/ftdetect/coffee.vim @@ -0,0 +1,17 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch <kchmck@gmail.com> +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +autocmd BufNewFile,BufRead *.coffee set filetype=coffee +autocmd BufNewFile,BufRead *Cakefile set filetype=coffee +autocmd BufNewFile,BufRead *.coffeekup,*.ck set filetype=coffee +autocmd BufNewFile,BufRead *._coffee set filetype=coffee + +function! s:DetectCoffee() + if getline(1) =~ '^#!.*\<coffee\>' + set filetype=coffee + endif +endfunction + +autocmd BufNewFile,BufRead * call s:DetectCoffee() diff --git a/ftdetect/cucumber.vim b/ftdetect/cucumber.vim new file mode 100644 index 00000000..f00f9e2f --- /dev/null +++ b/ftdetect/cucumber.vim @@ -0,0 +1,2 @@ +" Cucumber +autocmd BufNewFile,BufReadPost *.feature,*.story set filetype=cucumber diff --git a/ftdetect/haml.vim b/ftdetect/haml.vim new file mode 100644 index 00000000..bf1de754 --- /dev/null +++ b/ftdetect/haml.vim @@ -0,0 +1,3 @@ +autocmd BufNewFile,BufRead *.haml,*.hamlbars setf haml +autocmd BufNewFile,BufRead *.sass setf sass +autocmd BufNewFile,BufRead *.scss setf scss diff --git a/ftdetect/haskell.vim b/ftdetect/haskell.vim new file mode 100644 index 00000000..1f511415 --- /dev/null +++ b/ftdetect/haskell.vim @@ -0,0 +1,2 @@ +" autocommand +au BufRead,BufNewFile *.hs set comments=sl:{-,mb:--,elx:-} diff --git a/ftdetect/javascript.vim b/ftdetect/javascript.vim new file mode 100644 index 00000000..805e1978 --- /dev/null +++ b/ftdetect/javascript.vim @@ -0,0 +1,11 @@ +au BufNewFile,BufRead *.js setf javascript +au BufNewFile,BufRead *.jsm setf javascript +au BufNewFile,BufRead *.json setf javascript +au BufNewFile,BufRead Jakefile setf javascript + +fun! s:SelectJavascript() + if getline(1) =~# '^#!.*/bin/env\s\+node\>' + set ft=javascript + endif +endfun +au BufNewFile,BufRead * call s:SelectJavascript() diff --git a/ftdetect/json.vim b/ftdetect/json.vim new file mode 100644 index 00000000..5f6757de --- /dev/null +++ b/ftdetect/json.vim @@ -0,0 +1,8 @@ +autocmd BufNewFile,BufRead *.json set filetype=json + +augroup json_autocmd + autocmd! + autocmd FileType json setlocal autoindent + autocmd FileType json setlocal formatoptions=tcq2l + autocmd FileType json setlocal foldmethod=syntax +augroup END diff --git a/ftdetect/less.vim b/ftdetect/less.vim new file mode 100644 index 00000000..f1cb1d7e --- /dev/null +++ b/ftdetect/less.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufRead *.less setf less diff --git a/ftdetect/nginx.vim b/ftdetect/nginx.vim new file mode 100644 index 00000000..45bb1c15 --- /dev/null +++ b/ftdetect/nginx.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/*,*/nginx/vhosts.d/*,nginx.conf if &ft == '' | setfiletype nginx | endif diff --git a/ftdetect/ruby.vim b/ftdetect/ruby.vim new file mode 100644 index 00000000..a4e9a6d9 --- /dev/null +++ b/ftdetect/ruby.vim @@ -0,0 +1,62 @@ +" Ruby +au BufNewFile,BufRead *.rb,*.rbw,*.gemspec set filetype=ruby + +" Ruby on Rails +au BufNewFile,BufRead *.builder,*.rxml,*.rjs set filetype=ruby + +" Rakefile +au BufNewFile,BufRead [rR]akefile,*.rake set filetype=ruby + +" Rantfile +au BufNewFile,BufRead [rR]antfile,*.rant set filetype=ruby + +" IRB config +au BufNewFile,BufRead .irbrc,irbrc set filetype=ruby + +" Pry config +au BufNewFile,BufRead .pryrc set filetype=ruby + +" Rackup +au BufNewFile,BufRead *.ru set filetype=ruby + +" Capistrano +au BufNewFile,BufRead Capfile set filetype=ruby + +" Bundler +au BufNewFile,BufRead Gemfile set filetype=ruby + +" Guard +au BufNewFile,BufRead Guardfile,.Guardfile set filetype=ruby + +" Chef +au BufNewFile,BufRead Cheffile set filetype=ruby +au BufNewFile,BufRead Berksfile set filetype=ruby + +" Vagrant +au BufNewFile,BufRead [vV]agrantfile set filetype=ruby + +" Autotest +au BufNewFile,BufRead .autotest set filetype=ruby + +" eRuby +au BufNewFile,BufRead *.erb,*.rhtml set filetype=eruby + +" Thor +au BufNewFile,BufRead [tT]horfile,*.thor set filetype=ruby + +" Rabl +au BufNewFile,BufRead *.rabl set filetype=ruby + +" Jbuilder +au BufNewFile,BufRead *.jbuilder set filetype=ruby + +" Puppet librarian +au BufNewFile,BufRead Puppetfile set filetype=ruby +" +" Buildr Buildfile +au BufNewFile,BufRead [Bb]uildfile set filetype=ruby + +" Appraisal +au BufNewFile,BufRead Appraisals set filetype=ruby + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/ftdetect/slim.vim b/ftdetect/slim.vim new file mode 100644 index 00000000..b3415ced --- /dev/null +++ b/ftdetect/slim.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufRead *.slim setf slim diff --git a/ftdetect/stylus.vim b/ftdetect/stylus.vim new file mode 100644 index 00000000..49e04ecc --- /dev/null +++ b/ftdetect/stylus.vim @@ -0,0 +1,3 @@ +" Stylus +autocmd BufNewFile,BufReadPost *.styl set filetype=stylus +autocmd BufNewFile,BufReadPost *.stylus set filetype=stylus diff --git a/ftdetect/textile.vim b/ftdetect/textile.vim new file mode 100644 index 00000000..d02f9425 --- /dev/null +++ b/ftdetect/textile.vim @@ -0,0 +1,8 @@ +" textile.vim +" +" Tim Harper (tim.theenchanter.com) + +" Force filetype to be textile even if already set +" This will override the system ftplugin/changelog +" set on some distros +au BufRead,BufNewFile *.textile set filetype=textile diff --git a/ftdetect/tmux.vim b/ftdetect/tmux.vim new file mode 100644 index 00000000..62cad9da --- /dev/null +++ b/ftdetect/tmux.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux |