Fandom

Vim Tips Wiki

Expand existing abbreviation

1,624pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

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>

CommentsEdit

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

Also on Fandom

Random Wiki