Skip to content

Instantly share code, notes, and snippets.

@frimik
Created February 14, 2012 09:37
Show Gist options
  • Select an option

  • Save frimik/1825353 to your computer and use it in GitHub Desktop.

Select an option

Save frimik/1825353 to your computer and use it in GitHub Desktop.
example vimrc
" http://vim.wikia.com/wiki/Example_vimrc:
set nocompatible
" load the pathogen bundle loader plugin
call pathogen#infect()
syntax on
filetype indent plugin on
" This is to standardize style across all our projects:
set shiftwidth=2
set softtabstop=2
set expandtab
" the above is the minimum you want.
" the following optionals should also be
" considered:
set hidden
set wildmenu
set showcmd
set hlsearch
set ignorecase
set smartcase
set backspace=indent,eol,start
set autoindent
set nostartofline
set ruler
set laststatus=2
set confirm
set visualbell
set t_vb=
" set mouse=a
set cmdheight=2
set number
" Quickly time out on keycodes, but never time out on mappings
set notimeout ttimeout ttimeoutlen=200
set pastetoggle=<F2>
" A suggested colorscheme:
" colorscheme adaryn
"-------------------------------------------------------
" Mappings
" Map Y to act like D and C, i.e. to yank until EOL, rather than act as yy,
" which is the default
map Y y$
" Map <C-L> (redraw screen) to also turn off search highlighting until the
" next search
nnoremap <C-L> :nohl<CR><C-L>
" set modeline
" general, the 'smartindent' option should not be set
" http://vim.wikia.com/wiki/VimTip644
" set smartindent
set textwidth=72 "careful with this if you're not used to it.
set scrolloff=10
set wildchar=9 " tab as completion character
set virtualedit=block
set showmatch " Show matching braces.
" Line wrapping on by default
set wrap
set linebreak
" Syntastic plugin settings
let g:syntastic_auto_jump=1
let g:syntastic_auto_loc_list=1
" passive default but active on ruby and puppet,
" the perl one is there only to complete the example.
let g:syntastic_mode_map = { 'mode': 'passive',
\ 'active_filetypes': ['ruby', 'puppet'],
\ 'passive_filetypes': ['perl'] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment