Tip #463: XSLT Mappings I use to speed up developing XSLT files.
tip karma |
Rating 9/5, Viewed by 1578
|
created: |
|
April 23, 2003 5:50 |
|
complexity: |
|
basic |
author: |
|
Steven Spears |
|
as of Vim: |
|
6.0 |
I recently added these mapping to speed up typing XSLT elements. As this is my first tip, I hope these might be useful to someone else. I added these mappings to my copy of Devin Weaver's xmledit script.
imap <Leader>pi <?xml version="1.0" ?>^M
imap <Leader>ap <xsl:apply-templates/>
imap <Leader>ap`s <xsl:apply-templates select=""/>^[F"i
imap <Leader>ap`sm <xsl:apply-templates select="" mode=""/>^[3F"i
imap <Leader>at <xsl:attribute name="">^[F"i
imap <Leader>el <xsl:element name="">^[F"i
imap <Leader>if <xsl:if test="">>^[kf"a
imap <Leader>im <xsl:import href=""/>^[F"i
imap <Leader>in <xsl:include href=""/>^[F"i
imap <Leader>ou <xsl:output method=""/>^[F"i
imap <Leader>pa <xsl:param name=""/>^[F"i
imap <Leader>pa`ns <xsl:param name="" select=""/>^[3F"i
imap <Leader>st <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">>;
imap <Leader>te <xsl:template match="">>^[kf"a
imap <Leader>te`n <xsl:template name="">>^[kf"a
imap <Leader>te`mm <xsl:template match="" mode="">>^[kf"a
imap <Leader>va <xsl:value-of select=""/>^[F"i
imap <Leader>wi <xsl:with-param name=""/>^[F"i
imap <Leader>wi`ns <xsl:with-param name="" select=""/>^[3F"
For more information:
vimscript #301
help: imap
<<G's of Vim |
search & replace the word under the cursor >>
Additional Notes
|