Home Explore Blog CI



neovim

43th chunk of `runtime/doc/syntax.txt`
900444a40d878929a656276264f35916c726aa99ab4cb8030000000100000fa2

superscripts or subscripts; the constraint is due to what utf-8 supports.
In fact, only a few characters are supported as subscripts.

One way to use this is to have vertically split windows (see |CTRL-W_v|); one
with |'conceallevel'| at 0 and the other at 2; and both using |'scrollbind'|.

					*g:tex_conceal*
 Tex: Selective Conceal Mode~

You may selectively use conceal mode by setting g:tex_conceal in your
vimrc.  By default, g:tex_conceal is set to "admgs" to enable concealment
for the following sets of characters: >

	a = accents/ligatures
	b = bold and italic
	d = delimiters
	m = math symbols
	g = Greek
	s = superscripts/subscripts
<
By leaving one or more of these out, the associated conceal-character
substitution will not be made.

						*g:tex_isk* *g:tex_stylish*
 Tex: Controlling iskeyword~

Normally, LaTeX keywords support 0-9, a-z, A-z, and 192-255 only. Latex
keywords don't support the underscore - except when in `*.sty` files.  The
syntax highlighting script handles this with the following logic:

	* If g:tex_stylish exists and is 1
		then the file will be treated as a "sty" file, so the "_"
		will be allowed as part of keywords
		(regardless of g:tex_isk)
	* Else if the file's suffix is sty, cls, clo, dtx, or ltx,
		then the file will be treated as a "sty" file, so the "_"
		will be allowed as part of keywords
		(regardless of g:tex_isk)

	* If g:tex_isk exists, then it will be used for the local 'iskeyword'
	* Else the local 'iskeyword' will be set to 48-57,a-z,A-Z,192-255

			*tex-supersub* *g:tex_superscripts* *g:tex_subscripts*
 Tex: Fine Subscript and Superscript Control~

	See |tex-conceal| for how to enable concealed character replacement.

	See |g:tex_conceal| for selectively concealing accents, bold/italic,
	math, Greek, and superscripts/subscripts.

	One may exert fine control over which superscripts and subscripts one
	wants syntax-based concealment for (see |:syn-cchar|).  Since not all
	fonts support all characters, one may override the
	concealed-replacement lists; by default these lists are given by: >

	    let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
	    let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
<
	For example, I use Luxi Mono Bold; it doesn't support subscript
	characters for "hklmnpst", so I put >
		let g:tex_subscripts= "[0-9aeijoruvx,+-/().]"
<	in ~/.config/nvim/ftplugin/tex/tex.vim in order to avoid having
	inscrutable utf-8 glyphs appear.

					*tex-matchcheck* *g:tex_matchcheck*
 Tex: Match Check Control~

	Sometimes one actually wants mismatched parentheses, square braces,
	and or curly braces; for example, \text{(1,10]} is a range from but
	not including 1 to and including 10.  This wish, of course, conflicts
	with the desire to provide delimiter mismatch detection.  To
	accommodate these conflicting goals, syntax/tex.vim provides >
		g:tex_matchcheck = '[({[]'
<	which is shown along with its default setting.  So, if one doesn't
	want [] and () to be checked for mismatches, try using >
		let g:tex_matchcheck= '[{}]'
<	If you don't want matching to occur inside bold and italicized
	regions, >
		let g:tex_excludematcher= 1
<	will prevent the texMatcher group from being included in those regions.

TF						*tf.vim* *ft-tf-syntax*

There is one option for the tf syntax highlighting.

For syncing, minlines defaults to 100.	If you prefer another value, you can
set "tf_minlines" to the value you desire.  Example: >

	:let tf_minlines = your choice
<
TYPESCRIPT				*typescript.vim* *ft-typescript-syntax*
			    *typescriptreact.vim* *ft-typescriptreact-syntax*

There is one option to control the TypeScript syntax highlighting.

						*g:typescript_host_keyword*
When this variable is set to 1, host-specific APIs such as `addEventListener`
are highlighted. To disable set it to zero in your .vimrc: >

	let g:typescript_host_keyword = 0
<
The default value is 1.

TYPST						    *ft-typst-syntax*

						*g:typst_embedded_languages*
Typst files can embed syntax highlighting for other

Title: TEX Conceal Mode, Keyword Control, Subscript/Superscript Fine-Tuning, and Match Checking; TF and TypeScript Syntax Options
Summary
This section details customizing TEX syntax highlighting. It covers selective conceal mode with g:tex_conceal, controlling LaTeX keywords with g:tex_isk, fine-tuning subscripts/superscripts with g:tex_superscripts and g:tex_subscripts, and managing parenthesis/bracket matching with g:tex_matchcheck. It also briefly mentions options for TF (tf_minlines) and TypeScript (g:typescript_host_keyword) syntax highlighting.