aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-06 15:38:27 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-06 15:38:45 +1200
commitb111f871d104bc36b9a46bfef06025b6c051769d (patch)
tree9ddfb07abaf871a24595a8892617e8acf15a30db
parentRefactor vim/vimrc (diff)
downloaddotfiles-b111f871d104bc36b9a46bfef06025b6c051769d.tar.gz
dotfiles-b111f871d104bc36b9a46bfef06025b6c051769d.zip
Abbreviate and invert j/gj,k/gk mappings
-rw-r--r--vim/vimrc8
1 files changed, 4 insertions, 4 deletions
diff --git a/vim/vimrc b/vim/vimrc
index db6e7f47..01614231 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -442,12 +442,12 @@ set display=lastline
" start and end of the line
set listchars+=precedes:<,extends:>
-" When wrapping, j and k should move by screen row, and not to the same
-" column number in the previous logical line, which feels very clumsy and is
-" seldom particularly helpful; you can use n| to jump to the nth column in a
-" line anyway if you need to
+" Swap the j/gj and k/gk command pairs so that we move by screen row, not
+" buffer line, with j/k
nnoremap j gj
nnoremap k gk
+nnoremap gj j
+nnoremap gk k
" Line break settings and mappings
if has('linebreak')