summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2019-04-25 22:16:16 +0200
committerJulian T <julian@jtle.dk>2019-04-25 22:16:16 +0200
commit53285f84038d5aa59c87824970095e6d1b3ce131 (patch)
tree738f4b25a047af47339e4dde60b97b278eb3a1e5
parent7121b0b09ba2069f6408f7b2769880374e480dff (diff)
[vim] counted j and k will be added to jumplist
-rw-r--r--vim/.vimrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index 4c97986..4d2b8c8 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -89,6 +89,11 @@ set completeopt=menuone,preview
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
nnoremap <C-b> :b
+ " When moving more lines make it a jump. If couns i 2 it will run m'2j,
+ " thus storing it on the jumplist and then jumping
+ nnoremap <expr> j (v:count > 1 ? "m'" . v:count : '' ) . 'j'
+ nnoremap <expr> k (v:count > 1 ? "m'" . v:count : '' ) . 'k'
+
" Leader stuff
let mapleader=" "