aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2014-06-05 14:47:54 -0400
committerTeddy Wing2014-06-05 14:47:54 -0400
commite05f4fd92940b839c6aaf0ca279a1353825783a7 (patch)
treeed59107961db76a8c2f3518c85ec61eb0dc7fd31 /vimrc
parent913d74bc871e374e44fd9d639ee68a1a5e63a9a0 (diff)
downloaddotvim-e05f4fd92940b839c6aaf0ca279a1353825783a7.tar.bz2
vimrc: add 0 and $ mappings for soft wrapped lines
Make 0 go to the beginning of the visual line and $ go to the end. Have g0 and g$ go to the beginning and end of the _actual_ line.
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index f5f4990..9a3b626 100644
--- a/vimrc
+++ b/vimrc
@@ -194,6 +194,10 @@
" appear to be doing so before and I want to make sure that an undo
" entry is created every time I save.
"
+" 2014.06.05:
+" * Map 0 -> g0 and $ -> g$ plus the reverse. Makes it easier to get to
+" the beginning & end of a soft wrapped line.
+"
" Pathogen
@@ -462,6 +466,12 @@ nnoremap k gk
nnoremap gj j
nnoremap gk k
+" Easier moving to the beginning & end of wrapped lines
+nnoremap 0 g0
+nnoremap $ g$
+nnoremap g0 0
+nnoremap g$ $
+
" Easier buffer switching
nnoremap <leader>bl :ls<cr>
nnoremap <leader>j :bnext<cr>