Skip to content
Create a gist now

Instantly share code, notes, and snippets.

My .vimrc
set nocompatible
set backupdir=~/.vim/backups
set undofile
set undodir=~/.vim/undo " remember undos across sessions
set noswapfile
" ----------------------------------------------------------------------------
" Text Formatting
" ----------------------------------------------------------------------------
call pathogen#infect() " use pathogen
call pathogen#helptags() " call this when installing new plugins
syntax on " turn that syntax on
set autoindent " automatic indent new lines
set nosmartindent " don't be smart about it
set nowrap " do not wrap lines
set tabstop=4 " a tab is 4 spaces
set shiftwidth=4
set softtabstop=4
set expandtab " expand tabs to spaces
set nosmarttab " fuck tabs
filetype plugin on " enable file specific indenting
filetype plugin indent on " indentation on
" ----------------------------------------------------------------------------
" Remapping
" ----------------------------------------------------------------------------
" lead with ,
let mapleader = ","
let g:mapleader = ","
" exit to normal mode and visual mode with ',,'
inoremap <Leader><Leader> <ESC>
vnoremap <Leader><Leader> <ESC>
" prevent wierd destructive things that I do sometimes
inoremap <C-W> <Nop>
inoremap <C-U> <Nop>
" easy saving, closing, dehighlighting and stripping
nnoremap <Leader>w :w!<CR>
nnoremap <Leader>wq :wq<CR>
nnoremap <Leader>q :q<CR>
nnoremap <Leader>s :FixWhitespace<CR>
nnoremap <Leader>h :noh<CR>
nnoremap / /\v
vnoremap / /\v
" faster scrolling
nnoremap <Space> <C-D>
nnoremap <Backspace> <C-U>
" aligns = which aren't in == or <= or >= and does other cool stuff
vnoremap <Leader>= :Tabularize align_equal<CR>
" ----------------------------------------------------------------------------
" UI
" ----------------------------------------------------------------------------
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set nolazyredraw " turn off lazy redraw
set background=light " i like my terminal dimmm
set number " line numbers
set numberwidth=3 " give me a gutter
set wildmenu " turn on wild menu
set wildmode=list:longest,full
set wildchar=<TAB> " set auto complete to <TAB>
set ch=1 " command line height
set backspace=2 " allow backspacing over everything in insert mode
set shortmess=filtIoOA " shorten messages
set report=0 " tell us about changes
set nostartofline " don't jump to the start of line when scrolling
" ----------------------------------------------------------------------------
" Visual Cues
" ----------------------------------------------------------------------------
set t_Co=256 " give me all 256 colors
set so=10 " 10 line when moving vertically
set showmatch " brackets/braces that is
set mat=5 " duration to show matching brace (1/10 sec)
set incsearch " do incremental searching
set laststatus=2 " always show the status line
set hlsearch " highlight searches
set incsearch " incremental search on
set noerrorbells " shut up
set novisualbell
set gdefault " makes :%s/foo/bar/ -> :%s/foo/bar/g
set colorcolumn=80 " show me a marker at the 80 char line
set ttyfast " be fast
set encoding=utf-8
set spelllang=en_ca " gimme spellcheck!
set cursorline " show me a cursor line
set relativenumber
" ----------------------------------------------------------------------------
" Misc. Options
" ----------------------------------------------------------------------------
set autowriteall " automatically save files when moving around
" Preffered highlights
" Taken and mofied from tomasr/molokai
hi StatusLine ctermfg=0 ctermbg=250
hi StatusLineNC ctermfg=238 ctermbg=250
hi CursorLine ctermbg=234 cterm=none
hi CursorColumn ctermbg=234
hi ColorColumn ctermbg=234
hi LineNr ctermfg=250 ctermbg=0
hi NonText ctermfg=59
hi SpecialKey ctermfg=59
" Syntastic
set statusline=%<%f\ %h%m%r\ %{fugitive#statusline()}\ %{SyntasticStatuslineFlag()}\ %=%-14.(%l,%c%V%)\ %P
let g:syntastic_enable_signs=0 "stops those annoying side things
let g:syntastic_quiet_warnings=1 "only show syntax errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.