-
Notifications
You must be signed in to change notification settings - Fork 6
Home
dougireton edited this page Nov 20, 2012
·
6 revisions
kj exit Insert mode
map Y y$ " Make 'Y' yank from cursor pos to EOL. This
" makes 'Y' consistent with 'D' which deletes
" from cursor pos to EOL.
nmap gV `[v`] " Visually select the text that was last
" edited/pasted. From
" http://vimcasts.org/episodes/bubbling-text/
From here: http://vimcasts.org/episodes/working-with-windows/
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
From Practical Vim by Drew Neil, Tip 34
cnoremap <C-p> <Up>
cnoremap <C-n> <Down>
From Practical Vim by Drew Neil: 'Repeat the previous substitute command'
nnoremap & :&&<Enter>
xnoremap & :&&<Enter>
See http://items.sjbach.com/319/configuring-vim-right
nnoremap ' `
nnoremap ` '
This is useful with ex commands like :write, :edit, etc. From Practical Vim by Drew Neil, pg 94
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'
nnoremap <silent> <leader>dw :call Preserve("%s/\\s\\+$//e")<CR>
nnoremap <silent> <leader>= :call Preserve("normal gg=G")<CR>