ravik1222
ravik1222

Reputation: 45

Vim binding next search ('n') to another key

Hi

lately, I was playing around with key bindings.
I know that for example:
nnoremap g <Del>
Will map delete to key 'g'. But I cannot find a way to change binding for 'n' key.
:help index says : "repeat the latest '/' or '?' N times." How am I supposed to bind that?
Thans in advance for any answer!

Upvotes: 1

Views: 193

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172520

You've got the arguments the wrong way around:

:nnoremap g <Del>

maps the g key to the <Del> command. (Also, there must be no spaces in the <...> notation; see :help key-notation.

To add another binding (e.g. <F5>) for the n command, use:

:nnoremap <F5> n

Upvotes: 3

Related Questions