0

in Vim, the function of , is:

repeat latest f, t, F or T in opposite direction [count] times.

But after:

:let mapleader = ","

,can not use as repeat latest search anymore.

how to remap \ as , for repeat latest search in opposite direction.

jack guan
  • 331
  • 2
  • 12
  • 2
    No, reusing `,` in another mapping doesn't prevent you from using it to repeat the last `fFtT` in the opposite direction. It merely adds a delay. – romainl Dec 09 '16 at 09:01
  • 2
    have you tested the `,` function before you posted the answer? btw, we have same user logo picture..... – Kent Dec 09 '16 at 09:22

1 Answers1

3

You can just do

:nnoremap \ ,

From :h nnoremap

Map the key sequence {lhs} to {rhs} for the modes
where the map command applies. Disallow mapping of
{rhs}, to avoid nested and recursive mappings. Often
used to redefine a command.

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77