2

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

Thanks

  • 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.