In some keyboard, <
and >
are painful to hit. This is why I've remapped these 2 characters respectively to aa
and pp
inoremap aa <
cnoremap aa <
inoremap pp >
cnoremap pp >
onoremap aa <
onoremap pp >
The problem is this binding doesn't work in the operator pending mode. Consider this example where _ is my cursor:
<tag> _foobar </tag>
I want my cursor to go to the <
, so I hit faa
but vim understands my command as : fa
+ a
(go to the next a
, and append).
How could I change this behavior ?
Second question : I want it to be very fast, for example, if I type fa
, I don't want vim to wait for a second a
. So I've set a timeout:
set ttimeout
set ttimeoutlen=10 "ms
These commands don't seem working, because if I press a
in insert mode and another a
500 ms after (no chrono), a <
appear.
Thank you for reading
set ttimeout set timeoutlen=150 ttimeoutlen=100
:h f
also helps<
and>
, you should do this at the OS level, not inside Vim. On Linux, this could be done withxmodmap
or similar.