XSLT editieren mit VIM
Einige Abkürzungen um XSLT-Dateien konfortabler zu editieren.
Runterladen und per autocommand einbinden:
autocmd FileType xslt source c:\programme\vim7\xslt.vim
func! JHEatSpace() let c = getchar() return (c == 32 || c == 9 || c == 10 || c == 13) ? '' : nr2char(c) endfunc inoreab <buffer> xtpn <xsl:template name=""><CR></xsl:template><CR><UP><UP><END><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xtpm <xsl:template match=""><CR></xsl:template><CR><UP><UP><END><C-O>F"<C-R>=JHEatSpace()<CR> " param, param+select, param+block inoreab <buffer> xpar <xsl:param name="" /><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xpas <xsl:param name="" select="." /><C-O>3F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xpab <xsl:param name=""><CR></xsl:param><CR><UP><UP><END><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xcho <xsl:choose><CR><xsl:when test=""><CR></xsl:when><CR><xsl:otherwise><CR></xsl:otherwise><CR></xsl:choose><UP><UP><UP><UP><END><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xwhe <xsl:when test=""><CR></xsl:when><CR><UP><UP><END><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xiff <xsl:if test=""><CR></xsl:if><UP><END><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xcal <xsl:call-template name=""><CR></xsl:call-template><UP><END><C-O>F"<C-R>=JHEatSpace()<CR> " apply, apply+select inoreab <buffer> xapp <xsl:apply-templates /><C-R>=JHEatSpace()<CR> inoreab <buffer> xaps <xsl:apply-templates select="" /><C-O>F"<C-R>=JHEatSpace()<CR> " with-param, with-param+select, with-param+block inoreab <buffer> xwpa <xsl:with-param name="" /><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xwps <xsl:with-param name="" select="." /><C-O>3F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xwpb <xsl:with-param name=""><CR></xsl:whith-param><CR><UP><UP><END><C-O>3F"<C-R>=JHEatSpace()<CR> " variable, variable+select, variable+block inoreab <buffer> xvar <xsl:variable name="" /><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xvas <xsl:variable name="" select="." /><C-O>3F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xvab <xsl:variable name=""><CR></xsl:variable><CR><UP><UP><END><C-O>F"<C-R>=JHEatSpace()<CR> " value-of+select, value-of+block inoreab <buffer> xvos <xsl:value-of select="" /><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xvob <xsl:value-of><CR></xsl:value-of><CR><UP><C-O>O<C-R>=JHEatSpace()<CR> inoreab <buffer> xtex <xsl:text></xsl:text><C-O>F<<C-R>=JHEatSpace()<CR> inoreab <buffer> xatt <xsl:attribute name="" value="" /><C-O>3F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xcos <xsl:copy-of select="" /><C-O>F"<C-R>=JHEatSpace()<CR> inoreab <buffer> xcob <xsl:copy-of><CR></xsl:copy-of><C-O>O<C-R>=JHEatSpace()<CR>