Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 983a11a96d
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (36 sloc) 1.4 KB
"" Helpers
" Some file types should wrap their text
function! s:setupWrapping()
set wrap
set linebreak
set textwidth=72
set nolist
"" File types
filetype plugin indent on " Turn on filetype plugins (:help filetype-plugin)
if has("autocmd")
" In Makefiles, use real tabs, not tabs expanded to spaces
au FileType make setlocal noexpandtab
" This actually might be confusing, but the plugin +ruby+ already does
" this, so we want to do it only if the plugin +ruby+ is disabled for
" some reason
if janus#is_plugin_disabled("ruby")
" Set the Ruby filetype for a number of common Ruby files without .rb
au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,Procfile,,*.rake} set ft=ruby
" Make sure all mardown files have the correct filetype set and setup wrapping
au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn,txt} setf markdown
au FileType markdown call s:setupWrapping()
" Treat JSON files like JavaScript
au BufNewFile,BufRead *.json set ft=javascript
" make Python follow PEP8 for whitespace ( )
au FileType python setlocal softtabstop=4 tabstop=4 shiftwidth=4
" Remember last location in file, but not for commit messages.
" see :help last-position-jump
au BufReadPost * if &filetype !~ '^git\c' && line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g`\"" | endif
Jump to Line
Something went wrong with that request. Please try again.