Skip to content

Instantly share code, notes, and snippets.

@Kazark
Created August 7, 2015 18:29
Show Gist options
  • Save Kazark/84e25967614138136eca to your computer and use it in GitHub Desktop.
Save Kazark/84e25967614138136eca to your computer and use it in GitHub Desktop.
" Gist-ID: 84e25967614138136eca
" Screw Vi-compatibility; let's make sense around here
" From http://vimrcfu.com/snippet/88
map Y y$
" From my Kazarc plugin https://github.com/Kazark/vim-kazarc -----------------
" Why hold down the shift key? The default mapping of ; is not very useful
nmap ; :
vmap ; :
" From http://vimrcfu.com/snippet/14
" "It's stupid that indenting or unindenting a visual block deselects the
" block. Automatically 'gv' (go to previously selected visual block) after
" indenting or unindenting." --@dwieeb
vnoremap < <gv
vnoremap > >gv
" From http://vimrcfu.com/snippet/106
nnoremap <Tab> >>
nnoremap <S-Tab> <LT><LT>
vnoremap <Tab> >gv
vnoremap <S-Tab> <LT>gv
" I select everything in a file far more than I increment an integer! Why not
" make CTRL-A do what it does in almost every other program?
nmap <C-a> ggVG
" CTRL-C doesn't do anything valuable in Normal or Visual mode. Why not map it
" to what it does in almost every other program?
vmap <C-c> "+y
nmap <C-c> "+yy
" Why not make Visual block mode use CTRL-B so we can free up CTRL-V for CUA?
nnoremap <C-b> <C-v>
nnoremap <C-v> "+p
vnoremap <C-v> "+p
" Like ZZ and ZQ...
nmap ZA :qa<CR>
" Underscore-related motions
map <leader>w f_l
map <leader>b hT_
map <leader>e lt_
omap u t_
omap U f_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment