My leader is ,:

let mapleader = ','

Now, I want to map # to find previous match (when using f, F, t, T), I try this:

nnoremap # ,

But nothing happens when I use #, obviously something is wrong. What would be the correct way to create the mapping I want?

UPDATE: with vim -u NONE it works fine for me too, so it must be some setting/plugin I use. Strange, cause

map #

returns this:

n #       * ,

the same thing that is returned in vim -u NONE, so it sounds like the map is ok...Strange


closed as off-topic by statox, Josh, EvergreenTree, muru Mar 10 '16 at 22:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers." – statox, Josh, EvergreenTree, muru
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Hm, this seems to work for me? When you use nnoremap, you always map the original built-in Vim meaning of the right-hand-side, so I see no reason why this shouldn't work... – Martin Tournoij Aug 12 '15 at 20:06
  • 1
    This works for me too, maybe try using vim -u NONE to see if any of your plugins are causing issues – Brett Y Aug 12 '15 at 21:25
  • This worked for me also, I noticed that both , and # can be used now to find the previous match. – nobe4 Aug 13 '15 at 4:20
  • 4
    Perhaps you also have another 2-letter mapping that starts with #, and infinite timeout length? In this case, when you press #, vim will wait for the second letter, indefinitely. – VanLaser Aug 15 '15 at 22:20

Browse other questions tagged or ask your own question.