From 2d5fffcbdd6960512b2e74b8c5d871212265e019 Mon Sep 17 00:00:00 2001 From: Sebastian Burschel Date: Thu, 2 Dec 2021 10:38:36 +0100 Subject: [PATCH] Better line jumping with count. --- dotfiles/.vimrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index cbec65b..5536585 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -221,8 +221,9 @@ set omnifunc=syntaxcomplete#Complete set scrolloff=8 " Jump to wrapped line instead of next real line. -nnoremap j gj -nnoremap k gk +nnoremap k (v:count == 0 ? 'gk' : 'k') +nnoremap j (v:count == 0 ? 'gj' : 'j') + " Use e and E to jump to start or end of a line. nnoremap e ^