Wikia

Vim Tips Wiki

Expand existing abbreviation

Talk0
1,610pages on
this wiki
Revision as of 04:04, April 25, 2008 by JohnBot (Talk | contribs)

Tip 649 Printable Monobook Previous Next

created February 4, 2004 · complexity basic · author Yakov Lerner · version 6.0


This mapping expands an existing abbreviation:

map <C-X><C-X> diw:exe "normal i".@"<cr>

Comments

That won't work if the abbreviation is the last word on the line. Try:

:nno <C-X><C-X> ciw@<Esc>"_s<C-R>"<Esc>b

Around Wikia's network

Random Wiki