" general per-language filetype file if exists("did\_load\_filetypes") finish endif " Filetype mappingss augroup markdown au! BufRead,BufNewFile *.mkd setfiletype mkd augroup END augroup mako au! BufRead,BufNewFile *.mak,*.mako setfiletype mako augroup END augroup csv au! BufNewFile,BufRead *.csv setf csv augroup END augroup lilypond au! BufNewFile,BufRead *.ly,*.ily setf lilypond augroup END augroup java autocmd BufRead *.java set efm=%A\ %#[javac]\ %f:%l:\ %m,%-Z\ %#[javac]\ %p^,%-C%.%# autocmd BufRead *.java set makeprg=ant\ -find\ build.xml autocmd FileType java let b:auto_trim_whitespace=1 augroup END augroup less autocmd BufNewFile,BufRead *.less set filetype=less augroup END au! BufNewFile,BufRead *.pde setf arduino augroup org " leave these as is: au! BufRead,BufWrite,BufWritePost,BufNewFile *.org au BufRead,BufNewFile *.org call org#SetOrgFileType() au BufRead *.org :PreLoadTags au BufWrite *.org :PreWriteTags au BufWritePost *.org :PostWriteTags augroup END au BufNewFile,BufRead motd.public,/tmp/motd.public.r.* setf motd au Filetype html,xml,xsl source ~/.vim/closetag.vim au BufRead,BufNewFile *.go set filetype=go "Settings per filetype augroup python ""autocmd FileType python set omnifunc=pythoncomplete#Complete ""autocmd FileType python call SuperTabSetCompletionType("") ""autocmd FileType python set completeopt-=preview autocmd FileType python set ts=4 autocmd FileType python set softtabstop=4 autocmd FileType python set shiftwidth=4 autocmd FileType python set expandtab autocmd FileType python set nosmartindent "autocmd FileType python let b:auto_trim_whitespace=1 augroup END "augroup javascript "autocmd FileType javascript set ts=4 "autocmd FileType javascript set softtabstop=4 "autocmd FileType javascript set shiftwidth=4 "autocmd FileType javascript set expandtab "autocmd FileType javascript let b:auto_trim_whitespace=1 "augroup END augroup mkd autocmd FileType mkd set ai formatoptions=tcroqn2 comments=n:> augroup END augroup mediawiki autocmd BufRead,BufNewFile *.wiki setfiletype mediawiki autocmd BufRead,BufNewFile *.wikipedia.org* setfiletype mediawiki augroup END autocmd FileType go let b:auto_trim_whitespace=1 autocmd FileType cpp let b:auto_trim_whitespace=1 autocmd FileType perl let b:auto_trim_whitespace=1 autocmd FileType borg let b:auto_trim_whitespace=1 autocmd FileType javascript let b:auto_trim_whitespace=1 autocmd FileType python let b:auto_trim_whitespace=1