I have following vimrc file
map u <Up>
map n <Left>
map e <Down>
map i <Right>
noremap h i
noremap t w
noremap s b
Delete or changing word with dt or ct works, but when I want to delete inner word with dht or cht it doesn't work but dhw or chw works. Am I missing something in this remaping of the keys?
I have tried with map instead noreamp but it didn't worked.
Vim's operator-pending mode is likely not expecting two consecutive mappings of individual characters. However you can do a multi-character mapping.
This will let you do
dht,dat,cht, andcat, as well asvhtandvat.For multi-character maps, please be aware of the
'timeoutlen'option setting. This is normally defaulted to 1000ms. If you have a mapping for bothhand forht, then this will slow down yourhmapping because Vim must wait up to 1000ms for you to possibly typet. You can reduce'timeoutlen'to a shorter time but it must still be long enough to let you type bothhandt.The
noremapcommand applies to Normal, Visual and Operator-Pending modes.You probably want to specify only Operator-Pending and Visual modes and exclude Normal mode so that you don't slow down your other Normal mode mappings.