I am trying to use relative line numbers with NeoVim to jump through my file so I am expecting to digit to jump 20 lines before:
:20k
and to jump 20 lines after:
:20j
I tried but nothing happens.
So I tried to add this configuration to my init.v file:
nnoremap <expr> j v:count ? 'j' : 'gj'
nnoremap <expr> k v:count ? 'k' : 'gk'
But when I insert something like: :20j it gives me this error:
E471: Argument required
How can I achieve my goal?
>Solution :
You can achieve your goal by learning properly how to use your tools. I don’t know if Neovim still has it but Vim comes with $ vimtutor for the basics and you can still probably follow :help user-manual.
Case in point, it is 20j, not :20j.