0

I a using vscodevim with VS Code. I have mapped my leader to comma:

"vim.leader": ",",

Now when i do f<some_character>;, it works as expected to go the second matched character. But afterwards, the , (comma) does not work as it is being used as leader. We can do F<same_character> to navigate backward. Is there a way to map backward search (via comma originally) to some other key like \ (slash).

Brij
  • 11,731
  • 22
  • 78
  • 116

1 Answers1

0

You can use :noremap to accomplish what you need. It maps a key non-recursively, which will let you define some other key to have the original behaviour of ,. With your example:

:noremap \ ,

Here, :map would not work, since :map \ , would make \ behave like your modified , key, so you really need noremap.

joanis
  • 10,635
  • 14
  • 30
  • 40