Skip to content

Instantly share code, notes, and snippets.

@plagelao
Created March 8, 2011 00:13
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 plagelao/859568 to your computer and use it in GitHub Desktop.
Save plagelao/859568 to your computer and use it in GitHub Desktop.
my vim shortcuts
let mapleader = ","
" Ack maping
nnoremap <leader>a :Ack
" NERDTree maping
map <leader>d :execute 'NERDTreeToggle ' . getcwd()<CR>
" change buffer mapping
nnoremap <leader>6 :b#<CR>
" tab matches brackets
" in normal mode
nnoremap <tab> %
" in visual mode
vnoremap <tab> %
" remove spaces mapping
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
nnoremap <leader>T :%s/\t/ /<cr>
" change symbol key hashes to ruby 1.9 syntax mapper
map <leader>H :%s/:\(\w\+\) =>/\1:<CR>``
map close :q!<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment