Suresh Govindachar wrote:
In another thread, Yakov Lerner wrote:

4) You can use tip http://www.vim.org/tips/tip.php?tip_id=1285
to remap :w to :up :

cabbrev w <c-R>=(getcmdtype()==':' && getcmdpos()==1 ? 'up' : 'w')<cr>

Why cabbrev rather than cmap?

--Suresh



For one thing, a cabbrev will wait for an end-of-word signal: if you try to type :wa, :wq, :wincmd, :winpos, :windo, :while, etc., a "cmap w" will react as soon as you type the w while a "cabbrev w" will not react at all.


Best regards,
Tony.

Reply via email to