Home Explore Blog CI



neovim

19th chunk of `runtime/doc/syntax.txt`
c6b6495765db37be702d4760f0530010c523c8796683f5dc0000000100000fa2
 and change the way normal
text is shown: <B> <I> <U> <EM> <STRONG> (<EM> is used as an alias for <I>,
while <STRONG> as an alias for <B>), <H1> - <H6>, <HEAD>, <TITLE> and <A>, but
only if used as a link (that is, it must include a href as in
<A href="somefile.html">).

If you want to change how such text is rendered, you must redefine the
following syntax groups:

    - htmlBold
    - htmlBoldUnderline
    - htmlBoldUnderlineItalic
    - htmlUnderline
    - htmlUnderlineItalic
    - htmlItalic
    - htmlTitle for titles
    - htmlH1 - htmlH6 for headings

To make this redefinition work you must redefine them all with the exception
of the last two (htmlTitle and htmlH[1-6], which are optional) and define the
following variable in your vimrc (this is due to the order in which the files
are read during initialization) >
	:let html_my_rendering=1

If you'd like to see an example download mysyntax.vim at
https://www.fleiner.com/vim/download.html

You can also disable this rendering by adding the following line to your
vimrc file: >
	:let html_no_rendering=1

By default Vim synchronises the syntax to 250 lines before the first displayed
line.  This can be configured using: >
	:let html_minlines = 500
<
HTML comments are rather special (see an HTML reference document for the
details), and the syntax coloring scheme will highlight all errors.
However, if you prefer to use the wrong style (starts with <!-- and
ends with -->) you can define >
	:let html_wrong_comments=1

JavaScript and Visual Basic embedded inside HTML documents are highlighted as
'Special' with statements, comments, strings and so on colored as in standard
programming languages.  Note that only JavaScript and Visual Basic are
currently supported, no other scripting language has been added yet.

Embedded and inlined cascading style sheets (CSS) are highlighted too.

There are several html preprocessor languages out there.  html.vim has been
written such that it should be trivial to include it.  To do so add the
following two lines to the syntax coloring file for that language
(the example comes from the asp.vim file):
>
    runtime! syntax/html.vim
    syn cluster htmlPreproc add=asp

Now you just need to make sure that you add all regions that contain
the preprocessor language to the cluster htmlPreproc.

							*html-folding*
The HTML syntax file provides syntax |folding| (see |:syn-fold|) between start
and end tags.  This can be turned on by >

	:let g:html_syntax_folding = 1
	:set foldmethod=syntax

Note: Syntax folding might slow down syntax highlighting significantly,
especially for large files.


HTML/OS (BY AESTIVA)				*htmlos.vim* *ft-htmlos-syntax*

The coloring scheme for HTML/OS works as follows:

Functions and variable names are the same color by default, because VIM
doesn't specify different colors for Functions and Identifiers.  To change
this (which is recommended if you want function names to be recognizable in a
different color) you need to add the following line to your vimrc: >
  :hi Function cterm=bold ctermfg=LightGray

Of course, the ctermfg can be a different color if you choose.

Another issues that HTML/OS runs into is that there is no special filetype to
signify that it is a file with HTML/OS coding.	You can change this by opening
a file and turning on HTML/OS syntax by doing the following: >
  :set syntax=htmlos

Lastly, it should be noted that the opening and closing characters to begin a
block of HTML/OS code can either be << or [[ and >> or ]], respectively.


IA64				*ia64.vim* *intel-itanium* *ft-ia64-syntax*

Highlighting for the Intel Itanium 64 assembly language.  See |asm.vim| for
how to recognize this filetype.

To have `*.inc` files be recognized as IA64, add this to your vimrc file: >
	:let g:filetype_inc = "ia64"


INFORM						*inform.vim* *ft-inform-syntax*

Inform highlighting includes symbols provided by the Inform Library, as
most programs make extensive use of it.  If do not wish Library symbols
to be highlighted add this to

Title: HTML and HTML/OS Syntax Highlighting Customization
Summary
This section describes HTML and HTML/OS syntax highlighting customization. It covers disabling HTML rendering, configuring syntax synchronization lines, handling HTML comments, and embedded JavaScript, Visual Basic, and CSS highlighting. It also explains how to include HTML syntax in HTML preprocessor languages and enable syntax folding for HTML files. For HTML/OS, it provides customization options for function and variable names, setting filetype for HTML/OS files, and highlighting opening and closing characters for HTML/OS code blocks. Also includes brief definitions for IA64 and INFORM highlighting.