sponsor Vim development Vim logo Vim Book Ad

basic Tip #649: expand existing abbreviation

 tip karma   Rating 2/2, Viewed by 311 

created:   February 4, 2004 7:07      complexity:   basic
author:   Yakov Lerner      as of Vim:   6.0

This mapping expands existing abbreviation

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

 rate this tip  Life Changing Helpful Unfulfilling 

<<Uniq - Removing duplicate lines | abbreviation that prompts whether to expand it or not >>

Additional Notes

[email protected], February 4, 2004 7:54
That won't work if the abbrev. is the last word on the line. Try:

:nno <C-X><C-X> ciw@<Esc>"_s<C-R>"<Esc>b
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
SourceForge Logo