In my .vimrc:
noremap z w
When I examine the mappings, :map z shows only:
z * w
When I press z, my cursor moves as expected (to the next word). However, when I try to use something like diz or ciz, nothing happens. At the bottom of my screen, di andci appear as I’m typing them, but once I type z, Vim gleefully sits idle. diw and ciw still work as expected.
What else do I need to do? Is there a mapping mode I don’t know about?
The problem is that
iwis a single text object, it is not modifieri+ motionw. You need to mapizandazin this case:. Note that this will wait for you to press
zonly for some amount of time (see:h 'timeoutlen'). To make it work likeiw(e.g., wait forzforever), you should try the following:You will have to do the same for all
i*anda*text objects you use because with the above code onlyizandazworks fine; for some reasoniwmust be either typed too slow or typed asiww.