Permalink
Browse files

Added mappings for easy j/k/$/0/^ on wrapped lines.

In normal and visual mode, holding the command key with j/k/$/0/^ will
move the cursor through display lines, as opposed to numbered lines.
Only relevant with `:set wrap` enabled.
  • Loading branch information...
1 parent 20e03c8 commit 00fe23131f07ba0816501fc53411a5df3816ea09 @nelstrom committed Apr 3, 2010
Showing with 13 additions and 0 deletions.
  1. +13 −0 vimrc
View
13 vimrc
@@ -147,6 +147,19 @@ map <D-7> 7gt
map <D-8> 8gt
map <D-9> 9gt
map <D-0> :tablast<CR>
+" Shortcuts to make it easier to explore wrapped lines {{{2
+" These come in handy when the following settings are enabled:
+" :set linebreak wrap nolist
+vmap <D-j> gj
+vmap <D-k> gk
+vmap <D-4> g$
+vmap <D-6> g^
+vmap <D-0> g^
+nmap <D-j> gj
+nmap <D-k> gk
+nmap <D-4> g$
+nmap <D-6> g^
+nmap <D-0> g^
" Shortcuts for opening file in same directory as current file {{{2
map <leader>ew :e <C-R>=expand("%:p:h") . "/" <CR>
map <leader>es :sp <C-R>=expand("%:p:h") . "/" <CR>

0 comments on commit 00fe231

Please sign in to comment.