trusktr
trusktr

Reputation: 45464

How do you map the <u> key to something else in vim?

I tried :map <u> :help<CR> but it doesn't work. The u key keeps undoing instead of going to help.

How do you map to something else?

Upvotes: 1

Views: 118

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172540

You're got it almost right; the <...> notation is only used for special keys and modifier key combinations, see :help key-notation.

Upvotes: 2

Kent
Kent

Reputation: 195039

does this work for you?

nnoremap u :help<cr>

Your mapping works too, actually, you didn't map the key u to help, you mapped <u> to help.

another question, do you really want to have that mapping (by overwriting u)?

Upvotes: 5

Related Questions