Skip to content

Instantly share code, notes, and snippets.

@ughitsaaron
Created September 20, 2014 19:47
Show Gist options
  • Select an option

  • Save ughitsaaron/15e31d1a89e252d4d490 to your computer and use it in GitHub Desktop.

Select an option

Save ughitsaaron/15e31d1a89e252d4d490 to your computer and use it in GitHub Desktop.
My .vimrc setup
execute pathogen#infect()
syntax on
" colorscheme solarized
colorscheme badwolf
" manage multiple buffers
set hidden
" sets title of window to filename
set title
" turns off awful error sounds
set visualbell
" tab settings
set expandtab " tabs are spaces
set tabstop=2 " number of spaces per tab
set softtabstop=2 " number of spaces per tab when editing
set autoindent
set smartindent
" maps bp and bn to switch buffers
map bp :bp<cr>
map bn :bn<cr>
" ui
set showcmd
set number
set cursorline
set wildmenu
set lazyredraw
set showmatch
" search
set hlsearch " hilight matches
set incsearch " search as characters are entered
nnoremap <leader><space> :nohlsearch<cr>
" highlights last inserted text
nnoremap gV `[v`]
" Go to last file(s) if invoked without arguments.
autocmd VimLeave * nested if (!isdirectory($HOME . "/.vim")) |
\ call mkdir($HOME . "/.vim") |
\ endif |
\ execute "mksession! " . $HOME . "/.vim/Session.vim"
autocmd VimEnter * nested if argc() == 0 && filereadable($HOME . "/.vim/Session.vim") |
\ execute "source " . $HOME . "/.vim/Session.vim"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment