Vim Tips Wiki

Expand existing abbreviation

Redirected from VimTip649

1,623pages on
this wiki
Add New Page
Add New Page Talk0
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>


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