Skip to content

Instantly share code, notes, and snippets.

@fearphage
Created June 11, 2011 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fearphage/1020635 to your computer and use it in GitHub Desktop.
Save fearphage/1020635 to your computer and use it in GitHub Desktop.
" turn off word wrapping
set wrap!
set relativenumber
"Turn on smart indent
set smartindent
set tabstop=2 " set tab character to 4 characters
set expandtab " turn tabs into whitespace
set shiftwidth=2 " indent width for autoindent
filetype indent on " indent depends on filetype
filetype plugin on
" remove trailing whitespace from all files on save
autocmd BufWritePre * :%s/\s\+$//e
autocmd Filetype javascript setlocal ts=2 sts=2 sw=2 autoindent expandtab
map <A-v> viw"+gPb
map <A-c> viw"+y
map <A-x> viw"+x
autocmd! BufNewFile * silent! 0r ~/.vim/skel/tmpl.%:e
let g:jslint_command_options='--conf=/home/phred/.jslconf --nosummary --nofilelisting --nologo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment