public
Created

My .vimrc

  • Download Gist
.vimrc
VimL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.