autocmd BufNewFile,BufRead *.tex setlocal ft=tex
autocmd BufNewFile,BufRead CMakeLists.txt setlocal ft=cmake
autocmd BufNewFile,BufRead buildfile setlocal ft=ruby
+autocmd BufNewFile,BufRead build.gradle setlocal ft=groovy
" Set options based on filetypes, overriding the filetype plugin/indent options
autocmd FileType text call WrapOn()
+autocmd FileType markdown call WrapOn()
autocmd FileType bib setlocal textwidth=78 nocindent smartindent
autocmd FileType mail setlocal textwidth=0
autocmd FileType mail call WrapOn()