added 105 characters in body
Source Link
jecxjo
  • 2.5k
  • 9
  • 24

Edit didn't realize someone posted the same answer in a comment rather than just posting an answer.

Per a post on /r/vim, you can add numbered jumps by setting the previous context mark. These two lines will only set the mark when jumping more than 1 time (i.e. must be numbered like 3k or 20j)

nnoremap <expr> k (v:count > 1 ? "m'" . v:count : '') . 'k'
nnoremap <expr> j (v:count > 1 ? "m'" . v:count : '') . 'j'

Per a post on /r/vim, you can add numbered jumps by setting the previous context mark. These two lines will only set the mark when jumping more than 1 time (i.e. must be numbered like 3k or 20j)

nnoremap <expr> k (v:count > 1 ? "m'" . v:count : '') . 'k'
nnoremap <expr> j (v:count > 1 ? "m'" . v:count : '') . 'j'

Edit didn't realize someone posted the same answer in a comment rather than just posting an answer.

Per a post on /r/vim, you can add numbered jumps by setting the previous context mark. These two lines will only set the mark when jumping more than 1 time (i.e. must be numbered like 3k or 20j)

nnoremap <expr> k (v:count > 1 ? "m'" . v:count : '') . 'k'
nnoremap <expr> j (v:count > 1 ? "m'" . v:count : '') . 'j'
Source Link
jecxjo
  • 2.5k
  • 9
  • 24

Per a post on /r/vim, you can add numbered jumps by setting the previous context mark. These two lines will only set the mark when jumping more than 1 time (i.e. must be numbered like 3k or 20j)

nnoremap <expr> k (v:count > 1 ? "m'" . v:count : '') . 'k'
nnoremap <expr> j (v:count > 1 ? "m'" . v:count : '') . 'j'