Home Explore Blog CI



neovim

39th chunk of `runtime/doc/syntax.txt`
bcd7e2bd8748a2123812b54010aa2adcf70f7a04ee41ae750000000100000fa2
 displaying can be very slow.	To
reduce this, the "sh_maxlines" internal variable can be set.  Example: >

	let sh_maxlines = 100
<
The default is to use the twice sh_minlines.  Set it to a smaller number to
speed up displaying.  The disadvantage is that highlight errors may appear.

syntax/sh.vim tries to flag certain problems as errors; usually things like
unmatched "]", "done", "fi", etc.  If you find the error handling problematic
for your purposes, you may suppress such error highlighting by putting
the following line in your .vimrc: >

	let g:sh_no_error= 1
<

						*sh-embed*  *sh-awk*
 Sh: EMBEDDING LANGUAGES~

You may wish to embed languages into sh.  I'll give an example courtesy of
Lorance Stinson on how to do this with awk as an example. Put the following
file into $HOME/.config/nvim/after/syntax/sh/awkembed.vim: >

    " AWK Embedding:
    " ==============
    " Shamelessly ripped from aspperl.vim by Aaron Hope.
    if exists("b:current_syntax")
      unlet b:current_syntax
    endif
    syn include @AWKScript syntax/awk.vim
    syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained
    syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode
    syn cluster shCommandSubList add=AWKScriptEmbedded
    hi def link AWKCommand Type
<
This code will then let the awk code in the single quotes: >
	awk '...awk code here...'
be highlighted using the awk highlighting syntax.  Clearly this may be
extended to other languages.


SPEEDUP						*spup.vim* *ft-spup-syntax*
(AspenTech plant simulator)

The Speedup syntax file has some options:

- strict_subsections : If this variable is defined, only keywords for
  sections and subsections will be highlighted as statements but not
  other keywords (like WITHIN in the OPERATION section).

- highlight_types : Definition of this variable causes stream types
  like temperature or pressure to be highlighted as Type, not as a
  plain Identifier.  Included are the types that are usually found in
  the DECLARE section; if you defined own types, you have to include
  them in the syntax file.

- oneline_comments : This value ranges from 1 to 3 and determines the
  highlighting of # style comments.

  oneline_comments = 1 : Allow normal Speedup code after an even
  number of #s.

  oneline_comments = 2 : Show code starting with the second # as
  error.  This is the default setting.

  oneline_comments = 3 : Show the whole line as error if it contains
  more than one #.

Since especially OPERATION sections tend to become very large due to
PRESETting variables, syncing may be critical.  If your computer is
fast enough, you can increase minlines and/or maxlines near the end of
the syntax file.


SQL						*sql.vim* *ft-sql-syntax*
				*sqlinformix.vim* *ft-sqlinformix-syntax*
				*sqlanywhere.vim* *ft-sqlanywhere-syntax*

While there is an ANSI standard for SQL, most database engines add their own
custom extensions.  Vim currently supports the Oracle and Informix dialects of
SQL.  Vim assumes "*.sql" files are Oracle SQL by default.

Vim currently has SQL support for a variety of different vendors via syntax
scripts.  You can change Vim's default from Oracle to any of the current SQL
supported types.  You can also easily alter the SQL dialect being used on a
buffer by buffer basis.

For more detailed instructions see |ft_sql.txt|.


SQUIRREL				*squirrel.vim* *ft-squirrel-syntax*

Squirrel is a high level imperative, object-oriented programming language,
designed to be a light-weight scripting language that fits in the size, memory
bandwidth, and real-time requirements of applications like video games.  Files
with the following extensions are recognized as squirrel files: .nut.


TCSH						*tcsh.vim* *ft-tcsh-syntax*

This covers the shell named "tcsh".  It is a superset of csh.  See |csh.vim|
for how the filetype is detected.

Tcsh does not

Title: SH Syntax: Embedding Languages, Speedup, SQL, Squirrel, TCSH
Summary
This section covers several syntax highlighting topics. It describes embedding languages (like AWK) in SH scripts, and introduces syntax highlighting for Speedup (AspenTech plant simulator), SQL, Squirrel (a scripting language), and TCSH (a shell superset of csh).