Wikia

Vim Tips Wiki

Changes: Speed up developing XSLT files

Edit

Back to page

(Move categories to tip template)
(Remove html character entities)
 
Line 15: Line 15:
   
 
<pre>
 
<pre>
imap &lt;Leader&gt;pi &lt;?xml version="1.0" ?&gt;^M
+
imap <Leader>pi <?xml version="1.0" ?>^M
imap &lt;Leader&gt;ap &lt;xsl:apply-templates/&gt;
+
imap <Leader>ap <xsl:apply-templates/>
imap &lt;Leader&gt;ap`s &lt;xsl:apply-templates select=""/&gt;^[F"i
+
imap <Leader>ap`s <xsl:apply-templates select=""/>^[F"i
imap &lt;Leader&gt;ap`sm &lt;xsl:apply-templates select="" mode=""/&gt;^[3F"i
+
imap <Leader>ap`sm <xsl:apply-templates select="" mode=""/>^[3F"i
imap &lt;Leader&gt;at &lt;xsl:attribute name=""&gt;^[F"i
+
imap <Leader>at <xsl:attribute name="">^[F"i
imap &lt;Leader&gt;el &lt;xsl:element name=""&gt;^[F"i
+
imap <Leader>el <xsl:element name="">^[F"i
imap &lt;Leader&gt;if &lt;xsl:if test=""&gt;&gt;^[kf"a
+
imap <Leader>if <xsl:if test="">>^[kf"a
imap &lt;Leader&gt;im &lt;xsl:import href=""/&gt;^[F"i
+
imap <Leader>im <xsl:import href=""/>^[F"i
imap &lt;Leader&gt;in &lt;xsl:include href=""/&gt;^[F"i
+
imap <Leader>in <xsl:include href=""/>^[F"i
imap &lt;Leader&gt;ou &lt;xsl:output method=""/&gt;^[F"i
+
imap <Leader>ou <xsl:output method=""/>^[F"i
imap &lt;Leader&gt;pa &lt;xsl:param name=""/&gt;^[F"i
+
imap <Leader>pa <xsl:param name=""/>^[F"i
imap &lt;Leader&gt;pa`ns &lt;xsl:param name="" select=""/&gt;^[3F"i
+
imap <Leader>pa`ns <xsl:param name="" select=""/>^[3F"i
imap &lt;Leader&gt;st &lt;xsl:stylesheet version="1.0" xmlns:xsl="[http://www.w3.org/1999/XSL/Transform">> http://www.w3.org/1999/XSL/Transform"&gt;&gt;];
+
imap <Leader>st <xsl:stylesheet version="1.0" xmlns:xsl="[http://www.w3.org/1999/XSL/Transform">> http://www.w3.org/1999/XSL/Transform">>];
imap &lt;Leader&gt;te &lt;xsl:template match=""&gt;&gt;^[kf"a
+
imap <Leader>te <xsl:template match="">>^[kf"a
imap &lt;Leader&gt;te`n &lt;xsl:template name=""&gt;&gt;^[kf"a
+
imap <Leader>te`n <xsl:template name="">>^[kf"a
imap &lt;Leader&gt;te`mm &lt;xsl:template match="" mode=""&gt;&gt;^[kf"a
+
imap <Leader>te`mm <xsl:template match="" mode="">>^[kf"a
imap &lt;Leader&gt;va &lt;xsl:value-of select=""/&gt;^[F"i
+
imap <Leader>va <xsl:value-of select=""/>^[F"i
imap &lt;Leader&gt;wi &lt;xsl:with-param name=""/&gt;^[F"i
+
imap <Leader>wi <xsl:with-param name=""/>^[F"i
imap &lt;Leader&gt;wi`ns &lt;xsl:with-param name="" select=""/&gt;^[3F"
+
imap <Leader>wi`ns <xsl:with-param name="" select=""/>^[3F"
 
</pre>
 
</pre>
   
 
==Comments==
 
==Comments==
 
----
 

Latest revision as of 08:45, September 29, 2008

Tip 463 Printable Monobook Previous Next

created April 23, 2003 · complexity basic · author Steven Spears · version 6.0


I recently added these mapping to speed up typing XSLT elements. I added these to my copy of the 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">> 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"

CommentsEdit

Around Wikia's network

Random Wiki