xhtml.vim : XHTML syntax highlighting
script karma |
Rating 228/67,
Downloaded by 4815 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Michał Górny |
|
script type |
syntax |
|
description |
Syntax highlighting for Extensible HyperText Markup Language.
Handles XHTML 1.0 (Strict, Transitional and Frameset) and XHTML 1.1;
XHTML 2.0 (as of 7th Working Draft), including XML Events and XForms, is also highlighted.
Syntax of the following languages embedded in XHTML document can be highlighted: MathML, SVG, CSS, JavaScript, VBScript, SSI and XSSI.
There is also special highlighting for XHTML events ("on..." attributes with JavaScript content), however it is possible to disable it by setting the following variable:
xhtml_no_events_rendering
(just insert line "let xhtml_no_events_rendering=1" to your .vimrc file).
CSS highlighting in "style" attributes is availaible too; you can disable it by setting this variable:
xhtml_no_inline_css_rendering
|
|
install details |
Requires mathml.vim (vimscript #1235) and svg.vim (vimscript #935) (for version 1.0.1+ you need mathml.vim v. 1.0.1+ and svg.vim v. 1.1.1+).
However, you can choose not to use MathML and SVG syntax files – in that case you will have to set the following variables in your .vimrc:
xhtml_no_embedded_mathml
xhtml_no_embedded_svg
Drop xhtml.vim into your syntax directory. You should also disable (e.g. rename or delete) XHTML syntax file that comes with distribution, to avoid unnecessary sourcing of HTML syntax file.
Probably you have got already appropriate entry in filetype.vim (for *.html, *.htm, *.shtml and *.stm files), but it's good idea to add also *.xhtml and *.xht files recognizing:
au BufNewFile,BufRead *.xhtml,*.xht setf xhtml |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.97.9.172
|