The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
{{TipImported |
{{TipImported |
||
|id=1020 |
|id=1020 |
||
β | |previous= |
+ | |previous=1019 |
|next=1021 |
|next=1021 |
||
β | |created=2005 |
+ | |created=October 16, 2005 |
|complexity=basic |
|complexity=basic |
||
|author=Nick Caniglia |
|author=Nick Caniglia |
||
β | |version= |
+ | |version=5.7 |
|rating=8/5 |
|rating=8/5 |
||
|category1=Brackets |
|category1=Brackets |
||
Line 15: | Line 15: | ||
}} |
}} |
||
I often use Vim with the xml.vim plugin script from Devin Weaver {{script|id=301}} for html/xml editing, however it seem to lack the auto-quoting of xml attribute values feature that you find in a lot of IDEs these days. So here is a simplistic but still pretty useful mapping tip you might want to add to your favorite xml plugin Vim script or vimrc: |
I often use Vim with the xml.vim plugin script from Devin Weaver {{script|id=301}} for html/xml editing, however it seem to lack the auto-quoting of xml attribute values feature that you find in a lot of IDEs these days. So here is a simplistic but still pretty useful mapping tip you might want to add to your favorite xml plugin Vim script or vimrc: |
||
+ | |||
<pre> |
<pre> |
||
inoremap " ""<LEFT> |
inoremap " ""<LEFT> |
||
Line 27: | Line 28: | ||
==Comments== |
==Comments== |
||
I normally use |
I normally use |
||
+ | |||
<pre> |
<pre> |
||
imap "" ""<LEFT> |
imap "" ""<LEFT> |
||
Line 33: | Line 35: | ||
Additionally, those are quite handy, too: |
Additionally, those are quite handy, too: |
||
+ | |||
<pre> |
<pre> |
||
imap () ()<LEFT> |
imap () ()<LEFT> |
||
Line 42: | Line 45: | ||
---- |
---- |
||
For this to work only after an equal sign, you can remap the sequences =" and =', i.e.: |
For this to work only after an equal sign, you can remap the sequences =" and =', i.e.: |
||
+ | |||
<pre> |
<pre> |
||
inoremap =" =""<Left> |
inoremap =" =""<Left> |