0

I currently have

nnoremap <leader> G

in my .vimrc so I can go to line 123 by typing 123<leader>.

However, since I have other leader combinations, such as <leader>u, the line jump happens only after a second.

I know how to reduce this timeout, but I don't really want to do that since it would make it harder for me to use <leader>u when I actually want to.

I would also be happy to type <leader>123 if that is easier to accomplish.

  • That key mapping is not working for me. How is it supposed to work? – pfnuesel Oct 23 '18 at 23:40
1

You may do nnoremap <leader><leader> G.

Then just type the linenumber and double click the leaderkey.

0

You can use map <buffer> <nowait> to stop receiving more keys and execute the map immediately. Note <nowait> only has effect when defined for buffer-local maps. See :h map-nowait.

For example:

nmap ff :echo 'ff'<cr>
nmap <buffer> <nowait> f +
set timeout
set timeoutlen=3000

Then you can feel the difference.

To run ff, you need to use :normal ff

  • I did noremap <nowait> <leader> G and still got the delay – Bananach Nov 21 '18 at 11:45
  • Please see my edit – Liu Sha Nov 22 '18 at 2:25

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.