Skip to content

Instantly share code, notes, and snippets.

@goyalankit
Created July 3, 2014 19:42
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 goyalankit/ea66e78a23515e703219 to your computer and use it in GitHub Desktop.
Save goyalankit/ea66e78a23515e703219 to your computer and use it in GitHub Desktop.
Latest vimrc
" use pathogen to take care of vim plugins
execute pathogen#infect()
syntax on
filetype plugin indent on
" i like the solarized theme
color solarized
" map <\>n to nerdtree
map <Leader>n :NERDTreeToggle<CR>
set hlsearch
" clear the highlighted search
nmap <silent> <C-l> :nohlsearch<CR>
" set the tab and width to 2
:set tabstop=2
:set shiftwidth=2
:set expandtab
" move nerdree browser to right
let g:NERDTreeWinPos = "right"
" undo/redo map
nnoremap <F5> :GundoToggle<CR>
" ignore case while searching
set ignorecase
nnoremap ; :
vmap Q gq
nmap Q gqap
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
" in case you forgot to open the file with sudo
cmap w!! w !sudo tee % >/dev/null
" Easy window navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
"command Wq wq
"command W w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment