Wikia

Vim Tips Wiki

Changes: Expand existing abbreviation

Edit

Back to page

(Move categories to tip template)
(Remove html character entities)
 
Line 15: Line 15:
   
 
<pre>
 
<pre>
map &lt;C-X&gt;&lt;C-X&gt; diw:exe "normal i".@"&lt;cr&gt;
+
map <C-X><C-X> diw:exe "normal i".@"<CR>
 
</pre>
 
</pre>
   
Line 22: Line 22:
   
 
<pre>
 
<pre>
:nno &lt;C-X&gt;&lt;C-X&gt; ciw@&lt;Esc&gt;"_s&lt;C-R&gt;"&lt;Esc&gt;b
+
:nno <C-X><C-X> ciw@<Esc>"_s<C-R>"<Esc>b
 
</pre>
 
</pre>
   

Latest revision as of 09:07, September 29, 2008

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

Around Wikia's network

Random Wiki