Movatterモバイル変換


[0]ホーム

URL:


Quick links:help overview ·quick reference ·user manual toc ·reference manual toc·faq
Go to keyword (shortcut:k)
Site search (shortcut:s)
syntax.txt  ForVim version 9.1.  Last change: 2025 May 21VIM REFERENCE MANUAL  by Bram MoolenaarSyntax highlightingsyntaxsyntax-highlightingcoloringSyntax highlighting enables Vim to show parts of the text in another font orcolor.Those parts can be specific keywords or text matchinga pattern.  Vimdoesn't parse the whole file (to keepit fast), so the highlighting has itslimitations.  Lexical highlighting might bea better name, but since everybodycallsitsyntax highlighting we'll stick with that.Vim supportssyntax highlighting on all terminals.  But since most ordinaryterminals have very limited highlighting possibilities,it works best in theGUI version, gvim.In theUser Manual:usr_06.txt introducessyntax highlighting.usr_44.txt introduceswritingasyntax file.1.  Quick start:syn-qstart2.Syntax files:syn-files3.Syntax loading proceduresyntax-loading4.  Converting to HTML2html.vim5.Syntax file remarks:syn-file-remarks6.  Definingasyntax:syn-define7.:syntax arguments:syn-arguments8.Syntax patterns:syn-pattern9.Syntax clusters:syn-cluster10. Includingsyntax files:syn-include11. Synchronizing:syn-sync12. Listingsyntax items:syntax13. Colorschemescolor-schemes14. Highlight command:highlight15. Linking groups:highlight-link16. Cleaning up:syn-clear17. Highlightingtagstag-highlight18. Window-localsyntax:ownsyntax19. Color xtermsxterm-color20. Whensyntaxis slow:syntime{Vi does not have any of these commands}Syntax highlightingis not available when the+syntax feature has beendisabledat compile time.==============================================================================1. Quick start:syn-qstart:syn-enable:syntax-enableThis command switches onsyntax highlighting::syntax enableWhat this command actually doesis to execute the command:source $VIMRUNTIME/syntax/syntax.vimIf the VIM environment variableis not set, Vim will try to findthe path in another way (see$VIMRUNTIME).  Usually this works justfine.  Ifit doesn't, try setting the VIM environment variable to thedirectory where the Vim stuffis located.  For example, if yoursyntax filesare in the "/usr/vim/vim82/syntax" directory, set$VIMRUNTIME to"/usr/vim/vim82".  Youmustdo this in the shell, beforestarting Vim.This command also sources themenu.vimscript when theGUIis running orwill start soon.  See'go-M' about avoiding that.:syn-on:syntax-onThe `:syntax enable` command will keep most of your current color settings.This allows using:highlight commands to set your preferred colors before orafter using this command.  If you want Vim to overrule your settings with thedefaults, use::syntax on:hi-normal:highlight-normalIf you are running in the GUI, you can get white text ona black backgroundwith::highlight Normal guibg=Black guifg=WhiteFora colorterminal see:hi-normal-cterm.For setting up your own colorssyntax highlighting seesyncolor.NOTE: Thesyntax files onMS-Windows have lines thatend in<CR><NL>.The files forUnixend in<NL>.  This means you should use the right type offile for your system.  Although onMS-Windows the right formatisautomatically selected if the'fileformats' optionis not empty.NOTE: When using reverse video("gvim-fg white-bg black"), the default valueof'background' will not be set until theGUIwindowis opened, whichis afterreading thegvimrc.  This will cause the wrong default highlighting to beused.  To set the default value of'background' before switching onhighlighting, include the ":gui" command in thegvimrc:   :gui" open window and set default for 'background'   :syntax on" start highlighting, use 'background' to set colorsNOTE: Using ":gui" in thegvimrc means that "gvim-f" won't start in theforeground!  Use ":gui-f" then.g:syntax_onYou cantoggle thesyntax on/off with this command:   :if exists("g:syntax_on") | syntax off | else | syntax enable | endifToput this intoa mapping, you can use:   :map <F7> :if exists("g:syntax_on") <Bar>\   syntax off <Bar>\ else <Bar>\   syntax enable <Bar>\ endif <CR>[using the<> notation, type this literally]Details:The ":syntax" commands are implemented by sourcinga file.  To see exactly howthis works, look in the file:    commandfile:syntax enable$VIMRUNTIME/syntax/syntax.vim:syntax on$VIMRUNTIME/syntax/syntax.vim:syntax manual$VIMRUNTIME/syntax/manual.vim:syntax off$VIMRUNTIME/syntax/nosyntax.vimAlso seesyntax-loading.NOTE: If displaying long linesis slow and switching offsyntax highlightingmakesit fast, consider setting the'synmaxcol' option toa lower value.==============================================================================2.Syntax files:syn-filesThesyntax and highlighting commands for one language are normally stored inasyntax file.The name convention is: "{name}.vim".  Where{name}is thename of the language, or an abbreviation (to fit the name in 8.3 characters,a requirement incase the fileis used onaDOS filesystem).Examples:c.vimperl.vimjava.vimhtml.vimcpp.vimsh.vimcsh.vimThesyntax file can contain anyEx commands, just likeavimrc file.  Butthe ideais that only commands fora specific language are included.  Whenalanguageisa superset of another language,it may include the other one,for example, thecpp.vim file could include thec.vim file:   :so $VIMRUNTIME/syntax/c.vimThe .vim files are normally loaded with an autocommand.  For example:   :au Syntax c    runtime! syntax/c.vim   :au Syntax cpp   runtime! syntax/cpp.vimThese commands are normally in the file $VIMRUNTIME/syntax/synload.vim.MAKING YOUR OWN SYNTAX FILESmysyntaxfileWhen you create your ownsyntax files, and you want to have Vim use theseautomatically with ":syntax enable",do this:1. Create your user runtime directory.You would normally use the first item   of the'runtimepath' option.  Example for Unix:mkdir ~/.vim2. Createa directory in there called "syntax".  For Unix:mkdir ~/.vim/syntax3. Write the Vimsyntax file.  Ordownload one from the internet.  Then writeit in yoursyntax directory.  For example, for the "mine" syntax::w ~/.vim/syntax/mine.vimNow you can start using yoursyntax file manually::set syntax=mineYou don't have to exit Vim to use this.If you also want Vim to detect the type of file, seenew-filetype.If you are setting upa system with many users and you don't want each userto add the samesyntax file, you can use another directory from'runtimepath'.ADDING TO AN EXISTING SYNTAX FILEmysyntaxfile-addIf you are mostly satisfied with an existingsyntax file, but would like toadda few items or change the highlighting, follow these steps:1. Create your user directory from'runtimepath', see above.2. Createa directory in there called "after/syntax".  For Unix:mkdir -p ~/.vim/after/syntax3. Writea Vimscript that contains the commands you want to use.  For   example, to change the colors for theC syntax:highlight cComment ctermfg=Green guifg=Green4. Write that file in the "after/syntax" directory.  Use the name of the   syntax, with ".vim" added.  For ourC syntax::w ~/.vim/after/syntax/c.vimThat's it.  The next time you editaC file the Comment color will bedifferent.  You don't even have to restart Vim.If you have multiple files, you can use thefiletypeas the directory name.All the "*.vim" files in this directory will be used, for example:~/.vim/after/syntax/c/one.vim~/.vim/after/syntax/c/two.vimREPLACING AN EXISTING SYNTAX FILEmysyntaxfile-replaceIf you don't likea distributedsyntax file, or you have downloadeda newversion, follow the same stepsas formysyntaxfile above.  Just make surethat you write thesyntax file ina directory thatis early in'runtimepath'.Vim will only load the firstsyntax file found, assuming thatit setsb:current_syntax.NAMING CONVENTIONSgroup-name{group-name}E669W18Asyntax group nameis to be used forsyntax items that match the same kind ofthing.  These are then linked toa highlight group thatspecifies the color.Asyntax group name doesn't specify any color or attributes itself.The name fora highlight orsyntax groupmust consist of ASCII letters,digits, underscores, dots, or hyphens.  Asa regexp: "[a-zA-Z0-9_.-]*".However, Vim does not give an error when using other characters.  The maximumlength ofa group nameis about 200 bytes.E1249To be able to allow each user to pick their favorite set of colors, theremustbe preferred names for highlight groups that are common for many languages.These are the suggested group names (ifsyntax highlighting works properlyyou can see the actual color, except for "Ignore"):*Commentany comment*Constantany constantStringastring constant: "thisisastring" Charactera character constant: 'c', '\n'Numbera number constant: 234, 0xffBooleanaboolean constant: TRUE,falseFloata floating point constant: 2.3e10*Identifierany variable name Functionfunction name (also: methods for classes)*Statementany statement Conditionalif, then, else, endif, switch, etc. Repeatfor, do, while, etc. Labelcase, default, etc. Operator"sizeof", "+", "*", etc. Keywordany other keyword Exceptiontry, catch, throw*PreProcgeneric Preprocessor Includepreprocessor #include Definepreprocessor #define Macrosameas Define PreConditpreprocessor #if, #else, #endif, etc.*Typeint, long, char, etc. StorageClassstatic, register, volatile, etc. Structurestruct, union, enum, etc. TypedefA typedef*Specialany special symbol SpecialCharspecial character ina constant Tagyou can useCTRL-] on this Delimitercharacter that needs attention SpecialCommentspecial things insidea comment Debugdebugging statements*Underlinedtext that stands out, HTML links*Ignoreleft blank, hiddenhl-Ignore*Errorany erroneous construct*Todoanything that needs extra attention; mostly thekeywords TODO FIXME and XXX*Addedadded line inadiff*Changedchanged line inadiff*Removedremoved line inadiffThe names marked with * are the preferred groups; the others are minor groups.For the preferred groups, the "syntax.vim" file contains default highlighting.The minor groups are linked to the preferred groups, so they get the samehighlighting.  You can override these defaults by using ":highlight" commandsafter sourcing the "syntax.vim" file.Note that highlight group names are notcase sensitive.  "String" and "string"can be used for the same group.The following names are reserved and cannot be usedasa group name:NONE   ALL   ALLBUT   contains containedhl-IgnoreWhen using the Ignore group, you may also consider using theconcealmechanism.  Seeconceal.==============================================================================3.Syntax loading proceduresyntax-loadingThis explains the details that happen when the command ":syntax enable"isissued.  When Vim initializes itself,it finds out where the runtime files arelocated.  Thisis used hereas the variable$VIMRUNTIME.":syntax enable" and ":syntax on"do the following:    Source $VIMRUNTIME/syntax/syntax.vim    |    +-Clear out any oldsyntax by sourcing $VIMRUNTIME/syntax/nosyntax.vim    |    +-Source first syntax/synload.vim in'runtimepath'    ||    |+-  Setup the colors forsyntax highlighting.  Ifa color schemeis    ||   defineditis loaded again with ":colors{name}".  Otherwise    ||   ":runtime! syntax/syncolor.vim"is used.  ":syntax on" overrules    ||   existing colors, ":syntax enable" only sets groups that weren't    ||   set yet.    ||    |+-  Set upsyntax autocmds to load the appropriatesyntax file when    ||   the'syntax' optionis set.synload-1    ||    |+-  Source the user's optional file, from themysyntaxfile variable.    |    Thisis for backwards compatibility with Vim 5.x only.synload-2    |    +-Do ":filetype on", which does ":runtime! filetype.vim".  It loads any    |filetype.vim files found.  It should always Source    |$VIMRUNTIME/filetype.vim, which does the following.    ||    |+-  Install autocmds based on suffix to set the'filetype' option    ||   Thisis where the connection between file name and file typeis    ||   made for known file types.synload-3    ||    |+-  Source the user's optional file, from themyfiletypefile    ||   variable.  Thisis for backwards compatibility with Vim 5.x only.    ||synload-4    ||    |+-  Install oneautocommand which sources scripts.vim when no file    ||   type was detected yet.synload-5    ||    |+-  Source $VIMRUNTIME/menu.vim, to setup theSyntax menu.menu.vim    |    +-InstallaFileTypeautocommand to set the'syntax' option whena file    |type has been detected.synload-6    |    +-Executesyntaxautocommands to startsyntax highlighting for eachalready loaded buffer.Upon loadinga file, Vim finds the relevantsyntax fileas follows:    Loading the file triggers theBufReadPost autocommands.    |    +-If thereisa match with one of theautocommands fromsynload-3    |(known file types) orsynload-4 (user's file types), the'filetype'    |optionis set to the file type.    |    +-Theautocommandatsynload-5is triggered.  If the file type was not    |found yet, then scripts.vimis searched for in'runtimepath'.  This    |should always load $VIMRUNTIME/scripts.vim, which does the following.    ||    |+-  Source the user's optional file, from themyscriptsfile    ||   variable.  Thisis for backwards compatibility with Vim 5.x only.    ||    |+-  If the file typeis still unknown, check the contents of the file,    |    again with checks like "getline(1) =~pattern"as to whether the    |    file type can be recognized, and set'filetype'.    |    +-When the file type was determined and'filetype' was set, this    |triggers theFileTypeautocommandsynload-6 above.  It sets    |'syntax' to the determined file type.    |    +-When the'syntax' option was set above, this triggers anautocommand    |fromsynload-1 (andsynload-2).  This find the mainsyntax file in    |'runtimepath', with this command:    |runtime! syntax/<name>.vim    |    +-Any other user installedFileType orSyntaxautocommands aretriggered.  This can be used to change the highlighting fora specificsyntax.==============================================================================4. Conversion to HTML2html.vimconvert-to-HTML2htmlis notasyntax file itself, butascript that converts the currentwindow into HTML. Vim opensa newwindow in whichit builds the HTML file.After you save the resulting file, you canviewit with any browser. Thecolors should be exactly the sameas you see them in Vim.  Withg:html_line_ids you can jump to specific lines by adding (for example) #L123or #123 to theend of the URL in your browser's address bar. And withg:html_dynamic_folds enabled, you can show or hide the text thatis foldedin Vim.You are not supposed to set the'filetype' or'syntax' option to "2html"!Source thescript to convert the current file::runtime! syntax/2html.vimManyvariables affect the output of 2html.vim; see below. Any of the on/offoptions listed below can be enabled or disabled by setting them explicitly tothe desired value, or restored to their default by removing the variable using:unlet.Remarks:- Some truly ancient browsers may not show the background colors.- From most browsers you can also print the file (in color)!- The latest TOhtml may actually work with older versions of Vim, but some  features suchasconceal support will not function, and the colors may be  incorrect for an old Vim withoutGUI support compiled in.Hereis an example how to run thescript over all .c and .h files fromaUnix shell:   for f in *.[ch]; do gvim -f +"syn on" +"run! syntax/2html.vim" +"wq" +"q" $f; doneg:html_start_lineg:html_end_lineTo restrict the conversion toa range of lines, usea range with the:TOhtmlcommand below, or set "g:html_start_line" and "g:html_end_line" to the firstand last line to be converted.  Example, using the last setVisual area::let g:html_start_line = line("'<"):let g:html_end_line = line("'>"):runtime! syntax/2html.vim:TOhtml:[range]TOhtmlThe ":TOhtml" commandis defined ina standard plugin.This command will source2html.vim for you. Whenarangeis given, this command setsg:html_start_lineandg:html_end_line to the start andend of therange, respectively. Default rangeis the entirebuffer.If the currentwindowis part ofadiff, unlessg:html_diff_one_fileis set,:TOhtml will convertallwindows which are part of thediff in the currenttab and place them side-by-side ina<table> elementin the generated HTML. Withg:html_line_ids you canjump to lines in specificwindows with (for example)#W1L42 for line42 in the first diffed window, or#W3L87 for line 87 in the third.Examples::10,40TOhtml " convert lines 10-40 to html:'<,'>TOhtml " convert current/last visual selection:TOhtml      " convert entire bufferg:html_diff_one_fileDefault: 0.When 0, and using:TOhtml allwindows involved inadiff in the currenttabpage are converted to HTML and placed side-by-side ina<table> element. When1, only the current bufferis converted.Example:let g:html_diff_one_file = 1g:html_whole_fillerDefault: 0.When 0, ifg:html_diff_one_fileis 1,a sequence of more than 3 filler linesis displayedas three lines with the middle line mentioning the total numberof inserted lines.When 1, always display all inserted linesas ifg:html_diff_one_file werenot set.    :let g:html_whole_filler = 1TOhtml-performanceg:html_no_progressDefault: 0.When 0, displaya progressbar in the statusline for each major step in the2html.vim conversion process.When 1,do not display the progress bar. This offersa minor speed improvementbut you won't have any idea how much longer the conversion might take; for bigfilesit can takea long time!Example:let g:html_no_progress = 1You can obtain better performance improvements by also instructing Vim to notrun interactively, so that too much timeis not taken to redrawas thescriptmoves through the buffer, switches windows, and the like:  vim -E -s -c "let g:html_no_progress=1" -c "syntax on" -c "set ft=c" -c "runtime syntax/2html.vim" -cwqa myfile.cNote that the-s flag prevents loading your.vimrc and any plugins, so youneed to explicitly source/enable anything that will affect the HTMLconversion. See-E and-s-ex for details. Itis probably best to createascript to replace all the-c commands and useit with the-u flag instead ofspecifying each command separately.hl-TOhtmlProgressTOhtml-progress-colorWhen displayed, the progressbar will show colored boxes along the statuslineas the HTML conversion proceeds. By default, the background coloras thecurrent "DiffDelete" highlight groupis used. If "DiffDelete" and "StatusLine"have the same background color, TOhtml will automatically adjust the color todiffer. If youdo not like the automatically selected colors, you can defineyour own highlight colors for the progress bar. Example:hi TOhtmlProgress guifg=#c0ffee ctermbg=7g:html_number_linesDefault: Current'number' setting.When 0, buffer textis displayed in the generated HTML without line numbering.When 1,a column of line numbersis added to the generated HTML with the samehighlightingas the line number column in Vim(hl-LineNr).Force line numbers even if'number'is not set:   :let g:html_number_lines = 1Force to omit the line numbers:   :let g:html_number_lines = 0Go back to the default to use'number' bydeleting the variable:   :unlet g:html_number_linesg:html_line_idsDefault: 1 ifg:html_number_linesis set,0 otherwise.When 1, adds an HTML id attribute to each line number, or to an empty<span>inserted for that purpose if no line numbers are shown. This ID attributetakes the form of L123 for single-buffer HTML pages, or W2L123 for diff-viewpages, andis used to jump toa specific line (ina specificwindow ofadiffview). Javascriptis inserted to open any closed dynamicfolds(g:html_dynamic_folds) containing the specified line before jumping. Thejavascript also allows omitting thewindow ID in the url, and the leading L.For example:page.html#L123jumps to line 123 in a single-buffer filepage.html#123does the samediff.html#W1L42jumps to line 42 in the first window in a diffdiff.html#42does the sameg:html_use_cssDefault: 1.When 1, generate valid HTML 5 markup with CSS styling, supported in all modernbrowsers and many old browsers.When 0, generate<font>tags and similar outdated markup. Thisis notrecommended butit may work better in really old browsers, email clients,forum posts, and similar situations where basic CSS supportis unavailable.Example:   :let g:html_use_css = 0g:html_ignore_concealDefault: 0.When 0, concealed textis removed from the HTML and replaced witha characterfrom:syn-cchar or'listchars'as appropriate, depending on the currentvalue of'conceallevel'.When 1, include all text from the buffer in the generated HTML, even ifitisconcealed.Either of the following commands will ensure that all text in the bufferisincluded in the generated HTML (unlessitis folded):   :let g:html_ignore_conceal = 1   :setl conceallevel=0g:html_ignore_foldingDefault: 0.When 0, text ina closed foldis replaced by the text shown for the fold inVim(fold-foldtext). Seeg:html_dynamic_folds if you also want to allowthe user to expand the foldas in Vim to see the text inside.When 1, include all text from the buffer in the generated HTML; whether thetextis ina fold has no impactat all.g:html_dynamic_folds has no effect.Either of these commands will ensure that all text in the bufferis includedin the generated HTML (unlessitis concealed):   zR   :let g:html_ignore_folding = 1g:html_dynamic_foldsDefault: 0.When 0, text ina closed foldis not includedat all in the generated HTML.When 1, generate javascript to opena fold and show the text within, just likein Vim.Setting this variable to 1 causes2html.vim to always use CSS for styling,regardless of whatg:html_use_cssis set to.This variableis ignored wheng:html_ignore_foldingis set.   :let g:html_dynamic_folds = 1g:html_no_foldcolumnDefault: 0.When 0, ifg:html_dynamic_foldsis 1, generatea column of text similar toVim's foldcolumn(fold-foldcolumn) the user can click on totogglefoldsopen or closed. The minimum width of the generated text columnis the current'foldcolumn' setting.When 1,do not generate this column; instead, hovering the mouse cursor overfolded text will open the foldas ifg:html_hover_unfold were set.   :let g:html_no_foldcolumn = 1TOhtml-uncopyable-textg:html_prevent_copyDefault: Empty string.This option prevents certain regions of the generated HTML from being copied,when you select all text in document rendered ina browser and copy it. Usefulfor allowing users to copy-paste only the source text even ifa fold column orline numbers are shown in the generated content. Specify regions to beaffected in this wayas follows:f:fold columnn:line numbers (also within fold text)t:fold textd:diff fillerExample, to make the fold column and line numbers uncopyable::let g:html_prevent_copy = "fn"Themethod used to preventcopying in the generated page depends on the valueofg:html_use_input_for_pc.g:html_use_input_for_pcDefault: "none"Ifg:html_prevent_copyis non-empty, then:When "all", read-only<input> elements are used in place of normal text foruncopyable regions. In some browsers, especially older browsers, afterselecting an entire page andcopying the selection, the<input>tags are notpasted with the page text. Ifg:html_no_invalidis 0, the<input>tags haveinvalid type; this works in more browsers, but the page will not validate.Note: Thismethod does NOT work in recent versions of Chrome and equivalentbrowsers; the<input>tags get pasted with the text.When "fallback" (default value), the same<input> elements are generated forolder browsers, but newer browsers (detected by CSS feature query) hide the<input> elements and instead use generated content in an ::before pseudoelementto display the uncopyable text. Thismethod should work with the largestnumber of browsers, both old and new.When "none", the<input> elements are not generatedat all. Only thegenerated-contentmethodis used. This means that old browsers, notablyInternet Explorer, will either copy the text intended not to be copyable, orthe non-copyable text may not appearat all. However, thisis the moststandards-based method, and there will be muchless markup.g:html_no_invalidDefault: 0.When 0, ifg:html_prevent_copyis non-empty andg:html_use_input_for_pcisnot "none", an invalid attributeis intentionally inserted into the<input>element for the uncopyable areas. This prevents pasting the<input> elementsin some applications. Specifically, some versions of Microsoft Word will notpaste the<input> elements if they contain this invalid attribute. When 1, noinvalid markupis inserted, and the generated page should validate. However,<input> elements may be pasted into some applications and can be difficult toremove afterward.g:html_hover_unfoldDefault: 0.When 0, the only way to opena fold generated by2html.vim withg:html_dynamic_folds set,is to click on the generated fold column.When 1, use CSS 2.0 to allow the user to opena fold by moving the mousecursor over the displayed fold text. Thisis useful to allow users withdisabled javascript toview the folded text.Note that old browsers (notably Internet Explorer 6) will not support thisfeature.  Browser-specific markup for IE6is included to fall back to thenormal CSS1 styling so that thefolds show up correctly for this browser, butthey will not be openable withouta foldcolumn.   :let g:html_hover_unfold = 1g:html_id_exprDefault: ""Dynamicfolding and jumping to line IDs rely on unique IDs within the documentto work. If generated HTMLis copied intoa larger document, these IDs are nolonger guaranteed to be unique. Setg:html_id_expr to anexpression Vim canevaluate to geta uniquestring to append to each ID used ina given document,so that the full IDs will be unique even when combined with other content inalarger HTML document. Example, to append_ and the buffer number to each ID::let g:html_id_expr = '"_" .. bufnr("%")'To appendastring "_mystring" to theend of each ID::let g:html_id_expr = '"_mystring"'Note: When convertingadiffview to HTML, theexpression will only beevaluated for the firstwindow in the diff, and the result used for all thewindows.TOhtml-wrap-textg:html_pre_wrapDefault: Current'wrap' setting.When 0, ifg:html_no_preis0 or unset, the text in the generated HTML doesnot wrapat the edge of the browser window.When 1, ifg:html_use_cssis 1, the CSS 2.0 "white-space:pre-wrap" valueisused, causing the text to wrapatwhitespaceat the edge of the browserwindow.Explicitly enable text wrapping:   :let g:html_pre_wrap = 1Explicitly disable wrapping:   :let g:html_pre_wrap = 0Go back to default, determine wrapping from'wrap' setting:   :unlet g:html_pre_wrapg:html_no_preDefault: 0.When 0, buffer text in the generated HTMLis surrounded by<pre>...</pre>tags. Series ofwhitespaceis shownas in Vim without special markup, andtabcharacters can be included literally (seeg:html_expand_tabs).When 1 (not recommended), the<pre>tags are omitted, anda plain<div>isused instead. Whitespaceis replaced bya series of &nbsp; characterreferences, and<br>is used toend each line. Thisis another way to allowtext in the generated HTMLis wrap (seeg:html_pre_wrap) which also works inold browsers, but may cause noticeable differences between Vim's display andthe rendered page generated by 2html.vim.   :let g:html_no_pre = 1g:html_no_docDefault: 0.When 1it doesn't generatea full HTML document witha DOCTYPE,<head>,<body>, etc. Ifg:html_use_cssis enabled (the default) you'll have todefine the CSS manually. Theg:html_dynamic_folds andg:html_line_idssettings (off by default) alsoinsert some JavaScript.g:html_no_linksDefault: 0.Don't generate<a>tags for text that looks like an URL.g:html_no_modelineDefault: 0.Don't generateamodeline disabling folding.g:html_expand_tabsDefault:0 if'tabstop'is 8,'expandtab'is 0,'vartabstop'is not in use,       and no fold column or line numbers occur in the generated HTML; 1 otherwise.When 1,<Tab> characters in the buffer text are replaced with an appropriatenumber ofspace characters, or &nbsp; references ifg:html_no_preis 1.When 0, ifg:html_no_preis0 or unset,<Tab> characters in the buffer textare included as-is in the generated HTML. Thisis useful for when you want toallow copy and paste froma browser without losing the actualwhitespace inthe source document.Note that this can easily break text alignment andindentation in the HTML, unless set by default.Force2html.vim to keep<Tab> characters:   :let g:html_expand_tabs = 0Force tabs to be expanded:   :let g:html_expand_tabs = 1TOhtml-encoding-detectTOhtml-encodingItis highly recommended to set your desired encoding withg:html_use_encoding for any content which will be placed ona web server.If youdo not specify an encoding,2html.vim uses the preferred IANA namefor the current value of'fileencoding' if set, or'encoding' if not.'encoding'is always used for certain'buftype' values.'fileencoding' will beset to match the chosen document encoding.Automatic detection works for the encodings mentioned specifically by name inencoding-names, but TOhtml will only automatically use those encodings withwide browser support. However, you can override this to support specificencodings that may not be automatically detected by default (seeoptionsbelow). Seehttp://www.iana.org/assignments/character-sets for the IANA names.Note: By default allUnicode encodings are converted toUTF-8 with no BOM inthe generated HTML,as recommended by W3C:http://www.w3.org/International/questions/qa-choosing-encodingshttp://www.w3.org/International/questions/qa-byte-order-markg:html_use_encodingDefault: none, uses IANA name for current'fileencoding'as above.To overrule all automaticcharset detection, setg:html_use_encoding to thename of thecharset to be used. Itis recommended to set this variable tosomething widely supported, like UTF-8, for anything you will be hosting onawebserver:   :let g:html_use_encoding = "UTF-8"You can also use this option to omit the line thatspecifies thecharsetentirely, by settingg:html_use_encoding to an emptystring (NOT recommended):   :let g:html_use_encoding = ""Togo back to the automatic mechanism, delete theg:html_use_encodingvariable:   :unlet g:html_use_encodingg:html_encoding_overrideDefault: none, autoload/tohtml.vim contains default conversions for encodingsmentioned by nameatencoding-names.This option allows2html.vim to detect the correct'fileencoding' when youspecify an encoding withg:html_use_encoding whichis not in the defaultlist of conversions.Thisisa dictionary of charset-encoding pairs that will replace existingpairs automatically detected by TOhtml, or supplement with new pairs.Detect the HTMLcharset "windows-1252"as the encoding "8bit-cp1252":   :let g:html_encoding_override = {'windows-1252': '8bit-cp1252'}g:html_charset_overrideDefault: none, autoload/tohtml.vim contains default conversions for encodingsmentioned by nameatencoding-names and which have widebrowser support.This option allows2html.vim to detect the HTMLcharset for any'fileencoding' or'encoding' whichis not detected automatically. You can alsouseit to override specific existing encoding-charset pairs. For example,TOhtml will by default useUTF-8 for all Unicode/UCS encodings. To use UTF-16and UTF-32 instead, use:   :let g:html_charset_override = {'ucs-4': 'UTF-32', 'utf-16': 'UTF-16'}Note that documents encoded in either UTF-32 or UTF-16 have knowncompatibility problems with some major browsers.g:html_fontDefault: "monospace"You can specify the font or fonts used in the converted document usingg:html_font. If this optionis set toa string, then the value will besurrounded with single quotes. If this optionis set toalist then eachlistitemis surrounded by singlequotes and thelistis joined with commas. Eitherway, "monospace"is addedas the fallback generic family name and the entireresult usedas the font family (using CSS) or font face (if not using CSS).Examples:   " font-family: 'Consolas', monospace;   :let g:html_font = "Consolas"   " font-family: 'DejaVu Sans Mono', 'Consolas', monospace;   :let g:html_font = ["DejaVu Sans Mono", "Consolas"]convert-to-XMLconvert-to-XHTMLg:html_use_xhtmlDefault: 0.When 0, generate standard HTML 4.01 (strict when possible).When 1, generate XHTML 1.0 instead (XML compliant HTML).    :let g:html_use_xhtml = 1==============================================================================5.Syntax file remarks:syn-file-remarksb:current_syntax-variableVim stores the name of thesyntax that has been loaded in the"b:current_syntax" variable.  You can use this if you want to load othersettings, depending on whichsyntaxis active.Example:   :au BufReadPost * if b:current_syntax == "csh"   :au BufReadPost *   do-some-things   :au BufReadPost * endifABELabel.vimft-abel-syntaxABEL highlighting provides some user-defined options.  To enable them, assignany value to the respective variable.  Example::let abel_obsolete_ok=1To disable them use ":unlet".  Example::unlet abel_obsolete_okVariableHighlightabel_obsolete_okobsolete keywords are statements, noterrorsabel_cpp_comments_illegaldo not interpret '//'as inline comment leaderADASeeft-ada-syntaxANTant.vimft-ant-syntaxThe antsyntax file providessyntax highlighting for javascript andpythonby default.Syntax highlighting for otherscript languages can be installedby the function AntSyntaxScript(), which takes thetag nameas first argumentand thescriptsyntax file nameas second argument.  Example::call AntSyntaxScript('perl', 'perl.vim')willinstallsyntaxperl highlighting for the following ant code<script language = 'perl'><![CDATA[    # everything inside is highlighted as perl]]></script>Seemysyntaxfile-add for installingscript languages permanently.APACHEapache.vimft-apache-syntaxThe apachesyntax file providessyntax highlighting for Apache HTTP serverversion 2.2.3.asm.vimasmh8300.vimnasm.vimmasm.vimasm68kASSEMBLYft-asm-syntaxft-asmh8300-syntaxft-nasm-syntaxft-masm-syntaxft-asm68k-syntaxfasm.vimFiles matching "*.i" could be Progress or Assembly.  If the automatic detectiondoesn't work for you, or you don't edit Progressat all, use this in yourstartup vimrc:   :let filetype_i = "asm"Replace "asm" with the type of assembly you use.There are many types of assembly languages that all use the same file nameextensions.  Therefore you will have to select the type yourself, or addaline in the assembly file that Vim will recognize.  Currently thesesyntaxfiles are included:asmGNU assembly (usually have .s or .S extension and werealready built usingC compiler suchas GCC or CLANG)asm68kMotorola 680x0 assemblyasmh8300Hitachi H-8300 version of GNU assemblyia64Intel Itanium 64fasmFlat assembly (http://flatassembler.net)masmMicrosoft assembly (.masm files are compiled withMicrosoft's Macro Assembler. Thisis only supportedfor x86, x86_64, ARM and AARCH64 CPU families)nasmNetwide assemblytasmTurbo Assembly (with opcodes 80x86 up to Pentium, andMMX)picPIC assembly (currently for PIC16F84)The most flexibleis to adda line in your assembly file containing:asmsyntax=nasmReplace "nasm" with the name of the real assembly syntax.  This linemust beone of the first five lines in the file.  No non-white textmust beimmediately before or after this text.Note that specifying asmsyntax=fooisequivalent to setting ft=foo inamodeline, and that incase ofa conflictbetween the two settings the one from themodeline will take precedence (inparticular, if you have ft=asm in the modeline, you will get the GNUsyntaxhighlighting regardless of whatis specifiedas asmsyntax).Thesyntax type can always be overruled fora specific buffer by setting theb:asmsyntax variable::let b:asmsyntax = "nasm"If b:asmsyntaxis not set, either automatically or by hand, then the value ofthe global variable asmsyntaxis used.This can be seenasa default assemblylanguage::let asmsyntax = "nasm"Asa last resort, if nothingis defined, the "asm"syntaxis used.Netwide assembler (nasm.vim) optional highlightingTo enablea feature::let   {variable}=1|set syntax=nasmTo disablea feature::unlet {variable}  |set syntax=nasmVariableHighlightnasm_loose_syntaxunofficial parser allowedsyntax notas Error  (parser dependent; not recommended)nasm_ctx_outside_macrocontexts outsidemacro notas Errornasm_no_warnpotentially riskysyntax notas ToDoASTROastro.vimft-astro-syntaxConfigurationThe followingvariablescontrol certainsyntax highlighting features.You can add them to your .vimrc.To enable TypeScript and TSX for ".astro" files (default "disable"):let g:astro_typescript = "enable"To enable Stylus for ".astro" files (default "disable"):let g:astro_stylus = "enable"NOTE: You need toinstall an externalplugin to support stylus in astro files.ASPPERLft-aspperl-syntaxASPVBSft-aspvbs-syntax*.asp and *.asa files could be eitherPerl orVisual Basic script.  Since it'shard to detect this you can set two globalvariables to tell Vim what you areusing.ForPerlscript use::let g:filetype_asa = "aspperl":let g:filetype_asp = "aspperl"ForVisual Basic use::let g:filetype_asa = "aspvbs":let g:filetype_asp = "aspvbs"ASYMPTOTEasy.vimft-asy-syntaxBy default, only basic Asymptote keywords are highlighted. To highlightextended geometry keywords::let g:asy_syn_plain = 1and for highlighting keywords related to 3D constructions::let g:asy_syn_three = 1By default, Asymptote-defined colors (e.g: lightblue) are highlighted. Tohighlight TeX-defined colors (e.g: BlueViolet) use::let g:asy_syn_texcolors = 1or for Xorg colors (e.g: AliceBlue)::let g:asy_syn_x11colors = 1BAANbaan.vimbaan-syntaxThebaan.vim givessyntax support for BaanC of release BaanIV up to SSA ERP LNfor both 3 GL and 4 GL programming. Large number of standard defines/constantsare supported.Some special violation of coding standards will be signalled when one specifyin ones.vimrc:let baan_code_stds=1baan-foldingSyntaxfolding can be enabledatvarious levels through thevariablesmentioned below (Set those in your.vimrc). The more complexfolding onsource blocks and SQL can be CPU intensive.To allow anyfolding and enablefoldingat function level use:let baan_fold=1Folding can be enabledat source block levelas if, while, for ,... Theindentation preceding the begin/end keywords has to match (spaces are notconsidered equal toa tab).let baan_fold_block=1Folding can be enabled for embedded SQL blocksas SELECT, SELECTDO,SELECTEMPTY,... The indentation preceding the begin/end keywords has tomatch (spaces are not considered equal toa tab).let baan_fold_sql=1Note: Blockfolding can result in many small folds. Itis suggested to:settheoptions'foldminlines' and'foldnestmax' in.vimrc or use:setlocal in.../after/syntax/baan.vim (seeafter-directory). Eg:set foldminlines=5set foldnestmax=6BASICbasic.vimvb.vimft-basic-syntaxft-vb-syntaxBothVisual Basic and "normal" BASIC use the extension ".bas".To detectwhich one should be used, Vim checks for thestring "VB_Name" in the firstfive lines of the file.  Ifitis not found,filetype will be "basic",otherwise "vb".  Files with the ".frm" extension will always be seenasVisualBasic.If the automatic detection doesn't work for you or you only edit, forexample, FreeBASIC files, use this in yourstartup vimrc:   :let filetype_bas = "freebasic"Cc.vimft-c-syntaxA few things inC highlighting are optional.  To enable them assign any value(including zero) to the respective variable.  Example::let c_comment_strings = 1:let c_no_bracket_error = 0To disable them use:unlet.  Example::unlet c_comment_stringsSetting the value to zero doesn't work!An alternativeis to switch to the C++ highlighting::set filetype=cppVariableHighlightc_gnu  GNU gcc specific itemsc_comment_strings  strings and numbers insidea commentc_space_errors  trailing whitespace and spaces beforea<Tab>c_no_trail_space_error... but no trailing spacesc_no_tab_space_error... but no spaces beforea<Tab>c_no_bracket_error  don't highlight {}; inside[]aserrorsc_no_curly_error  don't highlight {}; inside[] and ()as errors; ...except{ and } in first columnDefaultis to highlight them, otherwise youcan't spota missing ")".c_curly_error  highlighta missing} by finding all pairs; thisforces syncing from the start of the file, can be slowc_no_ansi  don'tdo standard ANSI types and constantsc_ansi_typedefs... butdo standard ANSI typesc_ansi_constants... butdo standard ANSI constantsc_no_utf  don't highlight \u and \U in stringsc_syntax_for_h  useCsyntax for *.h files instead of C++/ObjC/ObjC++(NOTE: This variableis deprecated and no longer necessary,as *.h files now default to C, unless the file contains C++ or Objective-C syntax. If the automated detection fails, the defaultfiletype can be adjusted usingg:filetype_h.)c_no_if0  don't highlight "#if0" blocksas commentsc_no_cformat  don't highlight %-formats in stringsc_no_c99  don't highlightC99 standard itemsc_no_c11  don't highlight C11 standard itemsc_no_c23  don't highlight C23 standard itemsc_no_bsd  don't highlight BSD specific typesc_functions  highlight function calls anddefinitionsc_function_pointers  highlight function pointersdefinitionsWhen'foldmethod'is set to "syntax" then/* */ comments and{ } blocks willbecomea fold.  If you don't want comments to becomea fold use::let c_no_comment_fold = 1"#if0" blocks are also folded, unless::let c_no_if0_fold = 1If you notice highlightingerrors whilescrolling backwards, which are fixedwhen redrawing withCTRL-L, try setting the "c_minlines" internal variabletoa larger number::let c_minlines = 100This will make thesyntax synchronization start 100 lines before the firstdisplayed line.  The default valueis 50 (15 whenc_no_if0is set).  Thedisadvantage of usinga larger numberis that redrawing can become slow.When using the "#if0"/ "#endif" comment highlighting, notice that this onlyworks when the "#if0"is within "c_minlines" from the top of the window.  Ifyou havea long "#if0" constructit will not be highlighted correctly.To match extra items in comments, use the cCommentGroup cluster.Example:   :au Syntax c call MyCadd()   :function MyCadd()   :  syn keyword cMyItem contained Ni   :  syn cluster cCommentGroup add=cMyItem   :  hi link cMyItem Title   :endfunANSI constants will be highlighted with the "cConstant" group.This includes"NULL", "SIG_IGN" and others.  But not "TRUE", for example, because thisisnot in the ANSI standard.  If you find this confusing, remove the cConstanthighlighting::hi link cConstant NONEIf you see '{' and '}' highlightedas an error where they are OK, reset thehighlighting for cErrInParen and cErrInBracket.If you want to usefolding in yourC files, you can add these lines ina filein the "after" directory in'runtimepath'.  ForUnix this would be~/.vim/after/syntax/c.vim.    syn sync fromstart    set foldmethod=syntaxCHch.vimft-ch-syntaxC/C++ interpreter.  Ch has similarsyntax highlighting toC and builds upontheCsyntax file.  Seec.vim for all the settings that are available for C.By settinga variable you can tell Vim to use Chsyntax for *.h files, insteadofC or C++::let g:filetype_h = 'ch'NOTE: In previous versions of Vim, the following (now-deprecated) variable wasused, butis no longer the preferred approach::let ch_syntax_for_h = 1CHILLchill.vimft-chill-syntaxChillsyntax highlightingis similar to C.  Seec.vim for all the settingsthat are available.  Additionally there is:chill_space_errorslikec_space_errorschill_comment_stringlikec_comment_stringschill_minlineslike c_minlinesCHANGELOGchangelog.vimft-changelog-syntaxChangeLog supports highlighting spacesat the start ofa line.If youdo not like this, add following line to your .vimrc:let g:changelog_spacing_errors = 0This works the next time you edita changelog file.  You can also use"b:changelog_spacing_errors" to set this per buffer (before loading thesyntaxfile).You can change the highlighting used, e.g., to flag the spacesas an error::hi link ChangelogError ErrorOr to avoid the highlighting::hi link ChangelogError NONEThis works immediately.CLOJUREft-clojure-syntaxg:clojure_syntax_keywordsSyntax highlighting of public vars in "clojure.core"is provided by default,but additional symbols can be highlighted by adding them to theg:clojure_syntax_keywords variable.  The value should beaDictionary ofsyntax group names, each containingaList of identifiers.let g:clojure_syntax_keywords = {    \   'clojureMacro': ["defproject", "defcustom"],    \   'clojureFunc': ["string/join", "string/replace"]    \ }Refer to the Clojuresyntaxscript for validsyntax group names.Thereis alsob:clojure_syntax_keywords whichisa buffer-local variant ofthis variable intended for use byplugin authors to highlight symbolsdynamically.By setting theb:clojure_syntax_without_core_keywords variable, vars from"clojure.core" will not be highlighted by default.  Thisis useful fornamespaces that have set `(:refer-clojure:only [])`g:clojure_foldSettingg:clojure_fold to1 will enable thefolding of Clojure code.  Anylist, vector or map thatextends over more than one line can be folded usingthe standard Vimfold-commands.g:clojure_discard_macroSet this variable to1 to enable basic highlighting of Clojure's "discardreadermacro".#_(defn foo [x]    (println x))Note that this option will not correctly highlight stackeddiscard macros(e.g.#_#_).COBOLcobol.vimft-cobol-syntaxCOBOL highlighting has different needs for legacy code thanit does for freshdevelopment.  Thisis due to differences in whatis being done (maintenanceversus development) and other factors.To enable legacy code highlighting,add this line to your .vimrc::let cobol_legacy_code = 1To disableit again, use this::unlet cobol_legacy_codeCOLD FUSIONcoldfusion.vimft-coldfusion-syntaxThe ColdFusion has its own version of HTML comments.  To turn on ColdFusioncomment highlighting, add the following line to yourstartup file::let html_wrong_comments = 1The ColdFusionsyntax fileis based on the HTMLsyntax file.CPPcpp.vimft-cpp-syntaxMost things are the sameasft-c-syntax.VariableHighlightcpp_no_cpp11don't highlight C++11 standard itemscpp_no_cpp14don't highlight C++14 standard itemscpp_no_cpp17don't highlight C++17 standard itemscpp_no_cpp20don't highlight C++20 standard itemsCSHcsh.vimft-csh-syntaxThis covers the shell named "csh".Note that on some systems tcshis actuallyused.Detecting whethera fileis csh or tcshis notoriously hard.  Some systemssymlink /bin/csh to /bin/tcsh, makingit almost impossible to distinguishbetween csh and tcsh.  Incase VIM guesses wrong you can set the"filetype_csh" variable.  For using csh:g:filetype_csh:let g:filetype_csh = "csh"For using tcsh::let g:filetype_csh = "tcsh"Anyscript witha tcsh extension ora standard tcsh filename (.tcshrc,tcsh.tcshrc, tcsh.login) will havefiletype tcsh.  All other tcsh/csh scriptswill be classifiedas tcsh, UNLESS the "filetype_csh" variable exists.  If the"filetype_csh" variable exists, thefiletype will be set to the value of thevariable.CSVft-csv-syntaxIf you change the delimiter ofa CSV file, itssyntax highlighting will nolonger match the changed file content. You will need to unlet the followingvariable::unlet b:csv_delimiterAnd afterwards save andreload the file::w:eNow thesyntax engine should determine the newly changed CSV delimiter.CYNLIBcynlib.vimft-cynlib-syntaxCynlib files are C++ files that use the Cynlibclass library to enablehardware modelling and simulation using C++.  Typically Cynlib files havea .ccora .cpp extension, which makesit very difficult to distinguish them fromanormal C++ file.  Thus, to enable Cynlib highlighting for .cc files, add thisline to your.vimrc file::let cynlib_cyntax_for_cc=1Similarly for cpp files (this extensionis only usually used in Windows):let cynlib_cyntax_for_cpp=1To disable these again, use this::unlet cynlib_cyntax_for_cc:unlet cynlib_cyntax_for_cppCWEBcweb.vimft-cweb-syntaxFiles matching "*.w" could be Progress or cweb.  If the automatic detectiondoesn't work for you, or you don't edit Progressat all, use this in yourstartup vimrc:   :let filetype_w = "cweb"CSHARPcs.vimft-cs-syntaxC# rawstring literals may use any number ofquote marks to encapsulate theblock, and raw interpolatedstring literals may use any number of braces toencapsulate the interpolation, e.g.    $$$""""Hello {{{name}}}""""By default, Vim highlights 3-8quote marks, and 1-8 interpolation braces.The maximum numbers ofquotes and braces recognized can configured using thefollowing variables:    VariableDefault    g:cs_raw_string_quote_count8    g:cs_raw_string_interpolation_brace_count8DARTdart.vimft-dart-syntaxDartis an object-oriented, typed,class defined, garbage collected languageused for developing mobile, desktop, web, and back-end applications.  Dart usesa C-likesyntax derived from C, Java, and JavaScript, with features adoptedfrom Smalltalk, Python, Ruby, and others.More information about the language and itsdevelopment environmentat theofficial Dart language websiteathttps://dart.devdart.vimsyntax detects and highlights Dart statements, reserved words,type declarations, storage classes, conditionals, loops, interpolated values,and comments.  Thereis no support idioms from Flutter or any other Dartframework.Changes, fixes?  Submit an issue or pull request via:https://github.com/pr3d4t0r/dart-vim-syntax/DESKTOPdesktop.vimft-desktop-syntaxPrimary goal of thissyntax fileis to highlight .desktop and .directory filesaccording to freedesktop.org standard:https://specifications.freedesktop.org/desktop-entry-spec/latest/To highlight nonstandard extensions that does not begin with X-, setlet g:desktop_enable_nonstd = 1Note that this may cause wrong highlight.To highlight KDE-reserved features, setlet g:desktop_enable_kde = 1g:desktop_enable_kde follows g:desktop_enable_nonstd if not suppliedDIFFdiff.vimThediff highlighting normally finds translated headers.  This can be slow ifthere are very long lines in the file.  To disable translations::let diff_translations = 0Also seediff-slow.DIRCOLORSdircolors.vimft-dircolors-syntaxThe dircolors utility highlighting definition has one option.  It exists toprovide compatibility with the Slackware GNU/Linux distributions version ofthe command.  It addsa few keywords that are generally ignored by mostversions.  On Slackware systems, however, the utility accepts the keywords anduses them for processing.  To enable the Slackware keywords add the followingline to yourstartup file:let dircolors_is_slackware = 1DOCBOOKdocbk.vimft-docbk-syntaxdocbookDOCBOOK XMLdocbkxml.vimft-docbkxml-syntaxDOCBOOK SGMLdocbksgml.vimft-docbksgml-syntaxThere are two types of DocBook files: SGML and XML.  To specify what type youare using the "b:docbk_type" variable should be set.  Vim does this for youautomatically ifit can recognize the type.  When Vim can't guessit the typedefaults to XML.You can set the type manually::let docbk_type = "sgml"or::let docbk_type = "xml"You need todo this before loading thesyntax file, whichis complicated.Simpleris setting thefiletype to "docbkxml" or "docbksgml"::set filetype=docbksgmlor::set filetype=docbkxmlYou can specify the DocBook version::let docbk_ver = 3When not set 4is used.DOSBATCHdosbatch.vimft-dosbatch-syntaxSelect the set of Windows Command interpreter extensions that should besupported with the variable dosbatch_cmdextversion.  For versions of WindowsNT (before Windows 2000) this should have the value of 1.  For Windows 2000and laterit should be 2.Select the version you want with the following line:   :let dosbatch_cmdextversion = 1If this variableis not definedit defaults toa value of 2 to supportWindows 2000 and later.The originalMS-DOS supports an idiom of usinga double colon (::)as analternative way to entera comment line.  This idiom can be used with thecurrent Windows Command Interpreter, butit can lead to problems when usedinside(...) command blocks.  You can finda discussion about this onStack Overflow-https://stackoverflow.com/questions/12407800/which-comment-style-should-i-use-in-batch-filesTo allow the use of the :: idiom for comments in command blocks with theWindows Command Interpreter set the dosbatch_colons_comment variable toanything:   :let dosbatch_colons_comment = 1If this variableis set thena :: comment thatis the last line ina commandblock will be highlightedas an error.Thereis an option that covers whether *.btm files should be detectedas type"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files).  The latteris used by default.  You may select the former with the following line:   :let g:dosbatch_syntax_for_btm = 1If this variableis undefined or zero, btmsyntaxis selected.DOXYGENdoxygen.vimdoxygen-syntaxDoxygen generates code documentation usinga special documentation format(similar to Javadoc).  Thissyntaxscript adds doxygen highlighting to c, cpp,idl and php files, and should also work with java.There area few of ways to turn on doxygen formatting. It can be doneexplicitly or inamodeline by appending '.doxygen' to thesyntax of the file.Example::set syntax=c.doxygenor// vim:syntax=c.doxygenIt can also be done automatically for C, C++, C#, IDL and PHP files by settingthe global or buffer-local variable load_doxygen_syntax.  Thisis done byadding the following to your .vimrc.:let g:load_doxygen_syntax=1There area couple ofvariables that have an effect onsyntax highlighting,and are todo with non-standard highlighting options.VariableDefaultEffectg:doxygen_enhanced_colorg:doxygen_enhanced_colour0Use non-standard highlighting fordoxygen comments.doxygen_my_rendering0Disable rendering of HTML bold,italicand html_my_rendering underline.doxygen_javadoc_autobrief1Set to0 to disable javadoc autobriefcolour highlighting.doxygen_end_punctuation'[.]'Set toregexp match for the endingpunctuation of briefThere are also some highlight groups worth mentioningas they can be useful inconfiguration.HighlightEffectdoxygenErrorCommentThe colour of an end-comment when missingpunctuation ina code, verbatim or dotsectiondoxygenLinkErrorThe colour of an end-comment when missing the\endlink froma \link section.DTDdtd.vimft-dtd-syntaxThe DTDsyntax highlightingiscase sensitive by default.  To disablecase-sensitive highlighting, add the following line to yourstartup file::let dtd_ignore_case=1The DTDsyntax file will highlight unknowntagsas errors.  Ifthisis annoying,it can be turned off by setting::let dtd_no_tag_errors=1before sourcing thedtd.vimsyntax file.Parameter entity names are highlighted in the definition using the'Type' highlighting group and 'Comment' for punctuation and '%'.Parameter entity instances are highlighted using the 'Constant'highlighting group and the 'Type' highlighting group for thedelimiters% and ;.  This can be turned off by setting::let dtd_no_param_entities=1The DTDsyntax fileis also included byxml.vim to highlight included dtd's.EIFFELeiffel.vimft-eiffel-syntaxWhile Eiffelis not case-sensitive, its style guidelines are, and thesyntax highlighting file encourages their use.  This also allows tohighlightclass names differently.  If you want to disable case-sensitivehighlighting, add the following line to yourstartup file::let eiffel_ignore_case=1Case still matters forclass names and TODO marks in comments.Conversely, for even stricter checks, add one of the following lines::let eiffel_strict=1:let eiffel_pedantic=1Setting eiffel_strict will only catch improper capitalization for thefive predefined words "Current", "Void", "Result", "Precursor", and"NONE", to warn against their accidental useas feature orclass names.Setting eiffel_pedantic will enforce adherence to the Eiffel styleguidelines fairly rigorously (like arbitrary mixes of upper- andlowercase lettersas wellas outdated ways to capitalize keywords).If you want to use the lower-case version of "Current", "Void","Result", and "Precursor", you can use:let eiffel_lower_case_predef=1instead of completely turning case-sensitive highlighting off.Support for ISE's proposed new creationsyntax thatis alreadyexperimentally handled by some compilers can be enabled by::let eiffel_ise=1Finally, some vendors support hexadecimal constants.  To handle them, add:let eiffel_hex_constants=1to yourstartup file.EUPHORIAeuphoria3.vimeuphoria4.vimft-euphoria-syntaxTwosyntax highlighting files exist for Euphoria. One for Euphoriaversion 3.1.1, whichis the defaultsyntax highlighting file, and one forEuphoria version 4.0.5 or later.Euphoria version 3.1.1 (http://www.rapideuphoria.com/ link seems dead)isstill necessary for developing applications for theDOS platform, whichEuphoria version 4 (http://www.openeuphoria.org/) does not support.The following file extensions are auto-detectedas Euphoria file type:*.e, *.eu, *.ew, *.ex, *.exu, *.exw*.E, *.EU, *.EW, *.EX, *.EXU, *.EXWTo selectsyntax highlighting file for Euphoria,as wellas forauto-detecting the *.e and *.E file extensionsas Euphoria file type,add the following line to yourstartup file::let g:filetype_euphoria = "euphoria3"or:let g:filetype_euphoria = "euphoria4"Elixir and Euphoria share the *.ex file extension.  If thefiletypeisspecifically setas Euphoria with the g:filetype_euphoria variable, or thefileis determined to be Euphoria based on keywords in the file, then thefiletype will be setas Euphoria. Otherwise, thefiletype will default toElixir.ERLANGerlang.vimft-erlang-syntaxErlangisa functional programming language developed by Ericsson.  Files withthe following extensions are recognizedas Erlang files: erl, hrl, yaws.The BIFs (built-in functions) are highlighted by default. To disable this,put the following line in your vimrc:      :let g:erlang_highlight_bifs = 0To enable highlighting some special atoms,put this in your vimrc:      :let g:erlang_highlight_special_atoms = 1ELIXIRelixir.vimft-elixir-syntaxElixirisa dynamic, functional language for building scalable andmaintainable applications.The following file extensions are auto-detectedas Elixir file types:*.ex, *.exs, *.eex, *.leex, *.lockElixir and Euphoria share the *.ex file extension. If thefiletypeisspecifically setas Euphoria with the g:filetype_euphoria variable, or thefileis determined to be Euphoria based on keywords in the file, then thefiletype will be setas Euphoria. Otherwise, thefiletype will default toElixir.FLEXWIKIflexwiki.vimft-flexwiki-syntaxFlexWikiis an ASP.NET-based wiki package which used to be availableathttp://www.flexwiki.comNOTE: This site currently doesn't work, on Wikipediais mentioned thatdevelopment stopped in 2009.Syntax highlightingis available for the most common elements of FlexWikisyntax. The associatedftpluginscript sets some buffer-localoptions to makeediting FlexWiki pages more convenient. FlexWiki considersa newlineas thestart ofa new paragraph, so theftplugin sets'tw'=0 (unlimited line length),'wrap' (wrap long lines instead of using horizontal scrolling),'linebreak'(to wrapata character in'breakat' instead ofat the last char on screen),and so on. It also includes some keymaps that are disabled by default.If you want to enable the keymaps that make "j" and "k" and the cursor keysmove up and down by display lines, add this to your .vimrc::let flexwiki_maps = 1FORMform.vimft-form-syntaxThecoloring scheme forsyntax elements in the FORM file uses the defaultmodes Conditional, Number, Statement, Comment, PreProc, Type, and String,following the language specifications in 'Symbolic Manipulation with FORM' byJ.A.M. Vermaseren, CAN, Netherlands, 1991.If you want to include your own changes to the default colors, you have toredefine the followingsyntax groups:- formConditional- formNumber- formStatement- formHeaderStatement- formComment- formPreProc- formDirective- formType- formStringNote that theform.vimsyntax fileimplements FORM preprocessor commands anddirectives per default in the samesyntax group.A predefined enhanced color mode for FORMis available to distinguish betweenheader statements and statements in the body ofa FORM program.  To activatethis mode define the following variable in yourvimrc file:let form_enhanced_color=1The enhanced mode also takes advantage of additional color features fora darkgvim display.  Here, statements are colored LightYellow instead of Yellow, andconditionals are LightBlue for better distinction.BothVisual Basic and FORM use the extension ".frm".  To detect which oneshould be used, Vim checks for thestring "VB_Name" in the first five lines ofthe file.  Ifitis found,filetype will be "vb", otherwise "form".If the automatic detection doesn't work for you or you only edit, forexample, FORM files, use this in yourstartup vimrc:   :let filetype_frm = "form"FORTHforth.vimft-forth-syntaxFiles matching "*.f" could be Fortran or Forth and those matching "*.fs" couldbe F# or Forth.  If the automatic detection doesn't work for you, or you don'tedit F# or Fortranat all, use this in yourstartup vimrc:   :let filetype_f  = "forth"   :let filetype_fs = "forth"FORTRANfortran.vimft-fortran-syntaxDefault highlighting and dialectVim highlights according to Fortran 2023 (the most recent standard). Thischoice should be appropriate for most users most of the time because Fortran2023is almosta superset of previous versions (Fortran 2018, 2008, 2003, 95,90, 77, and 66).A few legacy constructs deleted or declared obsolescent,respectively, in recent Fortran standards are highlightedaserrors andtodoitems.Thesyntaxscript no longer supports Fortran dialects.  The variablefortran_dialectis now silently ignored.  Since computers are much faster now,the variable fortran_more_preciseis no longer needed andis silently ignored.Fortran source code formFortran code can be in either fixed or free source form.Note that thesyntax highlighting will not be correct if the formis incorrectly set.When you createa new Fortran file, thesyntaxscript assumes fixed sourceform.  If you always use free source form, then    :let fortran_free_source=1in your.vimrc prior to the:syntax on command.  If you always use fixedsource form, then    :let fortran_fixed_source=1in your.vimrc prior to the:syntax on command.If the form of the source code depends, ina non-standard way, upon the fileextension, thenitis most convenient to set fortran_free_source inaftpluginfile.  For more information onftplugin files, seeftplugin.Note that thiswill work only if the "filetypeplugin indent on" command precedes the "syntaxon" command in your.vimrc file.When you edit an existing Fortran file, thesyntaxscript will assume freesource form if the fortran_free_source variable has been set, and assumesfixed source form if the fortran_fixed_source variable has been set.  Supposeneither of thesevariables have been set. In that case, thesyntaxscriptattempts to determine which source form has been used by examining the fileextension using conventions common to the ifort, gfortran, Cray, NAG, andPathScale compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08for free-source).  No defaultis used for the .fpp and .ftn file extensionsbecause different compilers treat them differently. If none of this works,then thescript examines the first five columns of the first 500 lines of yourfile. If nosigns of free source form are detected, then the fileis assumedto be in fixed source form.  The algorithm should work in the vast majority ofcases.  In some cases, suchasa file that begins with 500 or more full-linecomments, thescript may incorrectly decide that the codeis in fixed form.If that happens, just adda non-comment statement beginning anywhere in thefirst five columns of the first twenty-five lines, save (:w), and thenreload(:e!) the file.Vendor extensionsFixed-form Fortran requiresa maximum line length of 72 characters but thescript allowsa maximum line length of 80 charactersasdo all compilerscreated in the last three decades.  An even longer line length of 132charactersis allowed if you set the variable fortran_extended_line_lengthwitha command suchas    :let fortran_extended_line_length=1placed prior to the:syntax on command.If you want additional highlighting of the CUDA Fortran extensions, you shouldset the variable fortran_CUDA witha command suchas    :let fortran_CUDA=1placed prior to the:syntax on command.To activate recognition of some common, non-standard, vendor-suppliedintrinsics, you should set the variable fortran_vendor_intrinsics withacommand suchas    :let fortran_vendor_intrinsics=1placed prior to the:syntax on command.Tabs in Fortran filesTabs are not recognized by the Fortran standards.  Tabs are nota good idea infixed format Fortran source code which requires fixed column boundaries.Therefore, tabs are markedas errors.  Nevertheless, some programmers likeusing tabs.  If your Fortran files contain tabs, then you should set thevariable fortran_have_tabs in your.vimrc witha command suchas    :let fortran_have_tabs=1placed prior to the:syntax on command.  Unfortunately, the use of tabs willmean that thesyntax file will not be able to detect incorrect margins.Syntax folding of Fortran filesVim will fold your file using foldmethod=syntax, if you set the variablefortran_fold in your.vimrc witha command suchas    :let fortran_fold=1to instruct thesyntaxscript to define fold regions for program units, thatis main programsstarting witha program statement, subroutines, functionsubprograms, modules, submodules, blocks of comment lines, and block dataunits. Block, interface, associate, critical, type definition, and change teamconstructs will also be folded.  If you also set the variablefortran_fold_conditionals witha command suchas    :let fortran_fold_conditionals=1then fold regions will also be defined fordo loops, if blocks, select case,select type, and select rank constructs.Note that defining fold regions canbe slow for large files.The syntax/fortran.vimscript contains embedded comments that tell you how tocomment and/or uncomment some lines to (a) activate recognition of somenon-standard, vendor-supplied intrinsics and (b) to prevent features deletedor declared obsolescent in the 2008 standard from being highlightedastodoitems.LimitationsParenthesis checking does not catch too few closing parentheses.  Hollerithstrings are not recognized.  Some keywords may be highlighted incorrectlybecause Fortran90 has no reserved words.For further information related to Fortran, seeft-fortran-indent andft-fortran-plugin.FREEBASICfreebasic.vimft-freebasic-syntaxFreeBASIC files will be highlighted differently for each of the four availabledialects, "fb", "qb", "fblite" and "deprecated".  Seeft-freebasic-pluginfor how to select the correct dialect.Highlightingis further configurable via the following variables.VariableHighlightfreebasic_no_comment_fold  disable multiline commentfoldingfreebasic_operators  non-alpha operatorsfreebasic_space_errors  trailing whitespace and spaces beforea<Tab>freebasic_type_suffixes  QuickBASIC style typesuffixesFVWM CONFIGURATION FILESfvwm.vimft-fvwm-syntaxIn order for Vim to recognize Fvwm configuration files thatdo not matchthe patternsfvwmrc orfvwm2rc, youmustput additional patternsappropriate to your system in your myfiletypes.vim file.  For thesepatterns, youmust set the variable "b:fvwm_version" to the major versionnumber of Fvwm, and the'filetype' option to fvwm.For example, to make Vim identify all files in /etc/X11/fvwm2/as Fvwm2 configuration files, add the following:  :au! BufNewFile,BufRead /etc/X11/fvwm2/*  let b:fvwm_version = 2 | \ set filetype=fvwmGSPgsp.vimft-gsp-syntaxThe defaultcoloring style for GSP pagesis defined byhtml.vim, andthecoloring for java code (within javatags or inline between backticks)is defined byjava.vim.  The following HTML groups defined inhtml.vimare redefined to incorporate and highlight inline java code:    htmlString    htmlValue    htmlEndTag    htmlTag    htmlTagNHighlighting should look fine most of the places where you'd see inlinejava code, but in some special casesit may not.  To add another HTMLgroup where you will have inline java code whereit does not highlightcorrectly, just copy the line you want fromhtml.vim and add gspJavato the contains clause.The backticks for inline java are highlighted according to the htmlErrorgroup to make them easier to see.GROFFgroff.vimft-groff-syntaxThe groffsyntax fileisa wrapper fornroff.vim, see the notesunder that heading for examples of use and configuration.  The purposeof this wrapperis to set up groffsyntax extensions by setting thefiletype fromamodeline or ina personalfiletypedefinitions file(seefiletype.txt).HASKELLhaskell.vimlhaskell.vimft-haskell-syntaxThe Haskellsyntax files support plain Haskell codeas wellas literateHaskell code, the latter in both Bird style and TeX style.  The Haskellsyntax highlighting will also highlightC preprocessor directives.If you want to highlight delimiter characters (useful if you havealight-coloured background), add to your .vimrc::let hs_highlight_delimiters = 1To treat True and Falseas keywordsas opposed to ordinary identifiers,add::let hs_highlight_boolean = 1To also treat the names of primitive typesas keywords::let hs_highlight_types = 1And to treat the names of even more relatively common typesas keywords::let hs_highlight_more_types = 1If you want to highlight the names of debugging functions,put inyour .vimrc::let hs_highlight_debug = 1The Haskellsyntax highlighting also highlightsC preprocessordirectives, and flags lines that start with# but are not validdirectivesas erroneous.  This interferes with Haskell'ssyntax foroperators,as they may start with #.  If you want to highlight thoseas operatorsas opposed to errors,put in your .vimrc::let hs_allow_hash_operator = 1Thesyntax highlighting for literate Haskell code will try toautomatically guess whether your literate Haskell code containsTeX markup or not, and correspondingly highlight TeX constructsor nothingat all.  You can override this globally by puttingin your.vimrc:let lhs_markup = nonefor no highlightingat all, or:let lhs_markup = texto force the highlighting to always try to highlight TeX markup.For more flexibility, you may also use buffer local versions ofthis variable, so e.g.:let b:lhs_markup = texwill force TeX highlighting fora particular buffer.  It has to beset before turningsyntax highlighting on for the buffer orloadinga file.HTMLhtml.vimft-html-syntaxThecoloring scheme fortags in the HTML file worksas follows.The<> of openingtags are colored differently than the </> ofa closing tag.Thisis on purpose! For openingtags the 'Function' coloris used, while forclosingtags the 'Identifier' coloris used (See syntax.vim to check how thoseare defined for you)Knowntag names are colored the same wayas statements in C.  Unknowntagnames are colored with the same coloras the<> or </> respectively whichmakesiteasy to spoterrorsNote that the sameistrue for argument (or attribute) names.  Known attributenames are colored differently than unknown ones.Some HTMLtags are used to change the rendering of text.  The followingtagsare recognized by thehtml.vimsyntaxcoloring file and change the way normaltextis shown:<B><I><U><EM><STRONG> (<EM>is usedas an alias for<I>,while<STRONG>as an alias for<B>),<H1>-<H6>,<HEAD>,<TITLE> and<A>, butonly if usedasa link (that is,itmust includea hrefas in<A href="somefile.html">).If you want to change how such textis rendered, youmust redefine thefollowingsyntax groups:- htmlBold- htmlBoldUnderline- htmlBoldUnderlineItalic- htmlUnderline- htmlUnderlineItalic- htmlItalic- htmlTitle for titles- htmlH1- htmlH6 for headingsTo make this redefinition work youmust redefine them all with the exceptionof the last two (htmlTitle and htmlH[1-6], which are optional) and define thefollowing variable in yourvimrc (thisis due to the order in which the filesare read during initialization):let html_my_rendering=1If you'd like to see an exampledownload mysyntax.vimathttp://www.fleiner.com/vim/download.htmlYou can also disable this rendering by adding the following line to yourvimrc file::let html_no_rendering=1By default Vim synchronises thesyntax to 250 lines before the first displayedline.  This can be configured using::let html_minlines = 500HTML comments are rather special (see an HTMLreference document for thedetails), and thesyntaxcoloring scheme will highlight all errors.However, if you prefer to use the wrong style (starts with <!-- andends with -->) you can define:let html_wrong_comments=1JavaScript andVisual Basic embedded inside HTML documents are highlightedas'Special' with statements, comments, strings and so on coloredas in standardprogramming languages.Note that only JavaScript andVisual Basic arecurrently 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 beenwritten such thatit should be trivial to include it.  Todo so add thefollowing two lines to thesyntaxcoloring file for that language(the example comes from the asp.vim file):    runtime! syntax/html.vim    syn cluster htmlPreproc add=aspNow you just need to make sure that you add all regions that containthe preprocessor language to the cluster htmlPreproc.html-foldingThe HTMLsyntax file providessyntaxfolding (see:syn-fold) between startandend tags.  This can be turned on by:let g:html_syntax_folding = 1:set foldmethod=syntaxNote:Syntaxfolding might slow downsyntax highlighting significantly,especially for large files.HTML/OS (BY AESTIVA)htmlos.vimft-htmlos-syntaxThecoloring scheme for HTML/OS worksas follows:Functions and variable names are the same color by default, because VIMdoesn't specify different colors for Functions and Identifiers.  To changethis (whichis recommended if you want function names to be recognizable inadifferent color) you need to add the following line to either your ~/.vimrc:  :hi Function term=underline cterm=bold ctermfg=LightGrayOf course, the ctermfg can bea different color if you choose.Another issues that HTML/OS runs intois that thereis no specialfiletype tosignify thatitisa file with HTML/OS coding.You can change this by openinga file and turning on HTML/OSsyntax by doing the following:  :set syntax=htmlosLastly,it should be noted that the opening and closing characters to beginablock of HTML/OS code can either be<< or[[ and>> or ]], respectively.IA64ia64.vimintel-itaniumft-ia64-syntaxHighlighting for the Intel Itanium 64 assembly language.  Seeasm.vim forhow to recognize this filetype.To have *.inc files be recognizedas IA64, add this to your.vimrc file::let g:filetype_inc = "ia64"INFORMinform.vimft-inform-syntaxInform highlighting includes symbols provided by the Inform Library,asmost programs make extensive use of it.  Ifdo not wish Library symbolsto be highlighted add this to your vim startup::let inform_highlight_simple=1By defaultitis assumed that Inform programs are Z-machine targeted,and highlights Z-machine assembly language symbols appropriately.  Ifyou intend your program to be targeted toa Glulx/Glk environment youneed to add this to yourstartup sequence::let inform_highlight_glulx=1This will highlight Glulx opcodes instead, and also adds glk() to theset of highlighted system functions.The Inform compiler will flag certain obsolete keywordsaserrors whenit encounters them.  These keywords are normally highlightedaserrorsby Vim.  To prevent such error highlighting, youmust add this to yourstartup sequence::let inform_suppress_obsolete=1By default, the language features highlighted conform to Compilerversion 6.30 and Library version 6.11.  If you are using an olderInformdevelopment environment, you may with to add this to yourstartup sequence::let inform_highlight_old=1IDLidl.vimidl-syntaxIDL (Interface Definition Language) files are used to define RPC calls.  InMicrosoft land, thisis also used for defining COM interfaces and calls.IDL's structureis simple enough to permita full grammar based approach torather than usinga few heuristics.  The resultis large and somewhatrepetitive but seems to work.There are some Microsoft extensions to idl files that are here.  Some of themare disabled by defining idl_no_ms_extensions.The more complex of the extensions are disabled by defining idl_no_extensions.VariableEffectidl_no_ms_extensionsDisable some of the Microsoft specificextensionsidl_no_extensionsDisable complex extensionsidlsyntax_showerrorShow IDLerrors (can be rather intrusive, butquite helpful)idlsyntax_showerror_softUse softer colours by default forerrorsJAVAjava.vimft-java-syntaxThejava.vimsyntax highlighting file offers several options.In Java 1.0.2,it was never possible to have braces inside parens, so this wasflaggedas an error.  Since Java 1.1, thisis possible (with anonymousclasses); and, therefore,is no longer markedas an error.  If you prefer theold way,put the following line into your Vimstartup file::let g:java_mark_braces_in_parens_as_errors = 1All (exported) public types declared injava.lang are always automaticallyimported and availableas simple names.  To highlight them, use::let g:java_highlight_java_lang_ids = 1You can also highlight types of most standard Javapackages if youdownloadthe javaid.vimscriptathttp://www.fleiner.com/vim/download.html.  If youprefer to only highlight types ofa certain package, sayjava.io, use thefollowing::let g:java_highlight_java_io = 1Check the javaid.vim file foralist of all thepackages that are supported.Headers of indented function declarations can be highlighted (along with partsoflambda expressions andmethodreference expressions), butit depends on howyou write Java code.  Two formats are recognized:1) If you write function declarations that are consistently indented by eithera tab, oraspace... or eightspace character(s), you may want to set oneof:let g:java_highlight_functions = "indent":let g:java_highlight_functions = "indent1":let g:java_highlight_functions = "indent2":let g:java_highlight_functions = "indent3":let g:java_highlight_functions = "indent4":let g:java_highlight_functions = "indent5":let g:java_highlight_functions = "indent6":let g:java_highlight_functions = "indent7":let g:java_highlight_functions = "indent8"Note that in terms of'shiftwidth', thisis the leftmost step of indentation.2) However, if you follow the Java guidelines about howfunctions and typesare supposed to be named (with respect to upper- and lowercase) and thereisany amount of indentation, you may want to set:let g:java_highlight_functions = "style"In addition, you can combine any value of "g:java_highlight_functions" with:let g:java_highlight_signature = 1to have the name ofa function with its parameterlist parens distinctlyhighlighted from its type parameters, return type, and formal parameters; andto have the parameterlist parens ofalambdaexpression with its arrowdistinctly highlighted from its formal parameters or identifiers.If neither setting does work for you, but you would still want headers offunction declarations to be highlighted, modify the currentsyntaxdefinitionsor compose new ones.Higher-order function types can be hard to parse by eye, so uniformly toningdown some of their components may be of value.  Provided that such type namesconform to the Java naming guidelines, you may arrangeit with:let g:java_highlight_generics = 1In Java 1.1, thefunctionsSystem.out.println() andSystem.err.println()should only be used for debugging.  Consider adding the following definitionin yourstartup file::let g:java_highlight_debug = 1to have the bulk of those statements coloredas*Debugdebugging statements,and to make some of their own items further grouped and linked:*Specialas DebugSpecial,*Stringas DebugString,*Booleanas DebugBoolean,*Typeas DebugType,which are used for special characters appearing in strings, strings proper,boolean literals, and special instance references (`super`,this,null),respectively.Javadocisa program that takes special comments out of Java program files andcreates HTML pages.  The standard configuration will highlight this HTML codesimilarly to HTML files (seehtml.vim).  You can even add JavaScript and CSSinside this code (see below).  The HTML rendering and the Markdown renderingdivergeas follows:  1. The firstsentence (all characters up to the first period., whichis     followed byawhitespace character ora line terminator, or up to the     first block tag, e.g.@param,@return)is coloredas*SpecialCommentspecial comments.  2. The textis coloredas*Commentcomments.  3. HTML comments are coloredas*Specialspecial symbols.  4. The standard Javadoctags (`@code`,@see, etc.) are coloredas*Specialspecial symbols     and some of their arguments are coloredas*Functionfunction names.To turn this feature off for both HTML and Markdown, add the following line toyourstartup file::let g:java_ignore_javadoc = 1Alternatively, only suppress HTML comments or Markdown comments::let g:java_ignore_html = 1:let g:java_ignore_markdown = 1Seeft-java-plugin for additional support available for Markdown comments.If you use the special Javadoc comment highlighting described above, you canalso turn on special highlighting for JavaScript,Visual Basic scripts, andembedded CSS (stylesheets).  This only makes sense if any of these languagesactually appear in Javadoc comments.  Thevariables to use are:let g:java_javascript = 1:let g:java_css = 1:let g:java_vb = 1Note that these threevariables are maintained in the HTMLsyntax file.Numbers and strings can be recognized in non-Javadoc comments with:let g:java_comment_strings = 1When'foldmethod'is set to "syntax", blocks of code and multi-line commentswill be folded.  No textis usually written in the first line ofa multi-linecomment, making folded contents of Javadoc commentsless informative with thedefault'foldtext' value; you may opt for showing the contents ofa secondline for any comments written in this way, and showing the contents ofa firstline otherwise, with:let g:java_foldtext_show_first_or_second_line = 1HTMLtags in Javadoc comments can additionally be folded by following theinstructions listed underhtml-folding and giving explicit consent with:let g:java_consent_to_html_syntax_folding = 1Do not default to this kind offolding unless ALL starttags and optionalendtags are balanced in Javadoc comments; otherwise,put up with creating runawayfolds that breaksyntax highlighting.Trailingwhitespace characters ora run ofspace characters beforeatabcharacter can be markedas an error with:let g:java_space_errors = 1but either kind of an error can be suppressed by also defining one of:let g:java_no_trail_space_error = 1:let g:java_no_tab_space_error = 1In order to highlight nested parens with different colors, define colors forjavaParen,javaParen1, andjavaParen2.  For example,:hi link javaParen Commentor:hi javaParen ctermfg=blue guifg=#0000ffCertain modifiers are incompatible with each other, e.g.abstract andfinal::syn list javaConceptKindand can be differently highlightedasa group than other modifiers with:hi link javaConceptKind NonTextIf you notice highlightingerrors whilescrolling backwards, which are fixedwhen redrawing withCTRL-L, try setting the "g:java_minlines" variable toa larger number::let g:java_minlines = 50This will make thesyntax synchronization start 50 lines before the firstdisplayed line.  The default valueis 10.  The disadvantage of usinga largernumberis that redrawing can become slow.Significant changes to the Java platform are gradually introduced in the formof JDK Enhancement Proposals (JEPs) that can be implemented fora release andofferedas its preview features.  It may take several JEPs anda few releasecycles for sucha feature to become either integrated into the platform orwithdrawn from this effort.  To cater for early adopters, thereis optionalsupport in Vim forsyntax related preview features that are implemented.  Youcan requestit by specifyingalist of preview feature numbersas follows::let g:java_syntax_previews = [488, 494]The supported JEP numbers are to be drawn from this table:430:String Templates [JDK 21]488: Primitive types in Patterns, instanceof, and switch494: Module Import DeclarationsNote thatas soonas the particular preview feature will have been integratedinto the Java platform, its entry will be removed from the table and relatedoptionality will be discontinued.JSONjson.vimft-json-syntaxg:vim_json_concealg:vim_json_warningsThe jsonsyntax file providessyntax highlighting withconceal support bydefault. To disable concealment:let g:vim_json_conceal = 0To disablesyntax highlighting of errors:let g:vim_json_warnings = 0JQjq.vimjq_quote_highlightft-jq-syntaxTo disable numbers having their own color add the following to your vimrc:hi link jqNumber NormalIf you wantquotes to have different highlighting than stringslet g:jq_quote_highlight = 1KCONFIGft-kconfig-syntaxKconfigsyntax highlighting language.  Forsyntax syncing, you can configurethe following variable (default: 50):let kconfig_minlines = 50To configurea bit more (heavier) highlighting, set the following variable:let kconfig_syntax_heavy = 1LACElace.vimft-lace-syntaxLace (Language for Assembly of Classes in Eiffel)iscase insensitive, but thestyle guide lines are not.  If you prefercase insensitive highlighting, justdefine the vim variable 'lace_case_insensitive' in yourstartup file::let lace_case_insensitive=1LF (LFRC)lf.vimft-lf-syntaxg:lf_shell_syntaxb:lf_shell_syntaxFor the lf file manager configuration files (lfrc) the shell commandssyntaxhighlighting can be changed globally and per buffer by settinga different'include' command searchpattern using these variables:let g:lf_shell_syntax = "syntax/dosbatch.vim"let b:lf_shell_syntax = "syntax/zsh.vim"Thesevariables are unset by default.The default'include' command searchpatternis 'syntax/sh.vim'.LEXlex.vimft-lex-syntaxLex uses brute-force synchronizingas the "^%%$"section delimitergives no clueas to whatsection follows.  Consequently, the value for:syn sync minlines=300may be changed by the user if s/heis experiencing synchronizationdifficulties (suchas may happen with large lex files).LIFELINESlifelines.vimft-lifelines-syntaxTo highlight deprecatedfunctionsas errors, add in your .vimrc::let g:lifelines_deprecated = 1LISPlisp.vimft-lisp-syntaxThe lispsyntax highlighting provides two options:g:lisp_instring : If it exists, then "(...)" strings are highlighted  as if the contents of the string were lisp.  Useful for AutoLisp.g:lisp_rainbow  : If it exists and is nonzero, then differing levels  of parenthesization will receive different  highlighting.The g:lisp_rainbow option provides 10 levels of individual colorization forthe parentheses and backquoted parentheses.  Because of the quantity ofcolorization levels, unlike non-rainbow highlighting, the rainbow modespecifies its highlighting using ctermfg and guifg, thereby bypassing theusual color schemecontrol using standard highlighting groups.  The actualhighlighting used depends on the dark/bright setting  (see'bg').LITElite.vimft-lite-syntaxThere are twooptions for the litesyntax highlighting.If you like SQLsyntax highlighting inside Strings, use this::let lite_sql_query = 1For syncing, minlines defaults to 100.If you prefer another value, you canset "lite_minlines" to the value you desire.  Example::let lite_minlines = 200LPClpc.vimft-lpc-syntaxLPC stands fora simple, memory-efficient language: Lars Pensjö C.  Thefile name of LPCis usually *.c.  Recognizing these filesas LPC would botheruserswriting onlyC programs.If you want to use LPCsyntax in Vim, youshould seta variable in your.vimrc file::let lpc_syntax_for_c = 1Ifit doesn't work properly for some particularC or LPC files, useamodeline.  Fora LPC file:// vim:set ft=lpc:ForaC file thatis recognizedas LPC:// vim:set ft=c:If you don't want to set the variable, use themodeline in EVERY LPC file.There are several implementations for LPC, we intend to support most widelyused ones.  Here the default LPCsyntaxis for MudOS series, for MudOS v22and before, you should turn off the sensible modifiers, and this will alsoassert the new efuns after v22 to be invalid, don't set this variable whenyou are using the latest version of MudOS::let lpc_pre_v22 = 1For LpMud 3.2 series of LPC::let lpc_compat_32 = 1For LPC4 series of LPC::let lpc_use_lpc4_syntax = 1For uLPC series of LPC:uLPC has been developed to Pike, so you should use Pikesyntaxinstead, and the name of your source file should be *.pikeLUAlua.vimft-lua-syntaxTheLuasyntax file can be used for versions 4.0, 5.0+. You can select one ofthese versions using the globalvariablesg:lua_version andg:lua_subversion.MAILmail.vimft-mail.vimVim highlights all the standard elements of an email (headers, signatures,quoted text and URLs/ email addresses).  In keeping with standard conventions,signatures begin ina line containing only "--" followed optionally bywhitespaces andend witha newline.Vim treats lines beginning with ']', '}','|', '>' oraword followed by '>'as quoted text.  However Vim highlights headers and signatures in quoted textonly if the textis quoted with '>' (optionally followed by one space).By defaultmail.vim synchronisessyntax to 100 lines before the firstdisplayed line.  If you havea slow machine, and generally deal with emailswith short headers, you can change this toa smaller value::let mail_minlines = 30MAKEmake.vimft-make-syntaxIn makefiles, commands are usually highlighted to makeiteasy for you to spoterrors.  However, this may be too muchcoloring for you.  You can turn thisfeature off by using::let make_no_commands = 1Comments are also highlighted by default.  You can turn this off by using::let make_no_comments = 1There arevarious Make implementations, which add extensions other than thePOSIX specification and thus are mutually incompatible.  If the filenameisBSDmakefile or GNUmakefile, the corresponding implementationis automaticallydetermined; otherwise vim tries to detectit by the file contents.  If you seeany wrong highlights because of this, you can enforcea flavor by setting oneof the following::let g:make_flavor = 'bsd'  " or:let g:make_flavor = 'gnu'  " or:let g:make_flavor = 'microsoft'MAPLEmaple.vimft-maple-syntaxMaple V, by Waterloo Maple Inc, supports symbolic algebra.  The languagesupports manypackages offunctions which are selectively loaded by the user.The standard set of packages'functionsas supplied in MapleV release 4 may behighlightedat the user's discretion.  Users may place in their.vimrc file::let mvpkg_all= 1to get all packagefunctions highlighted, or users may select any subset bychoosinga variable/package from the table below and setting that variable to1, also in their.vimrc file (prior to sourcing$VIMRUNTIME/syntax/syntax.vim).Table of MapleV Package Function Selectors  mv_DEtools mv_genfuncmv_networksmv_process  mv_Galois mv_geometrymv_numapproxmv_simplex  mv_GaussInt mv_grobnermv_numtheorymv_stats  mv_LREtools mv_groupmv_orthopolymv_student  mv_combinat mv_inttransmv_padicmv_sumtools  mv_combstruct mv_liesymmmv_plotsmv_tensor  mv_difforms mv_linalgmv_plottoolsmv_totorder  mv_finance mv_logicmv_powseriesMARKDOWNft-markdown-syntaxg:markdown_minlinesg:markdown_fenced_languagesg:markdown_syntax_concealIf you have long regions there might be wrong highlighting.  At the cost ofslowing down displaying, you can have the engine look further back to sync onthe start ofa region, for example 500 lines (defaultis 50)::let g:markdown_minlines = 500If you want to enable fenced code blocksyntax highlighting in your markdowndocuments you can enable like this::let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']To disable markdownsyntax concealing add the following to your vimrc::let g:markdown_syntax_conceal = 0MATHEMATICAmma.vimft-mma-syntaxft-mathematica-syntaxEmpty *.m files will automatically be presumed to be Matlab files unless youhave the following in your .vimrc:let filetype_m = "mma"MBSYNCmbsync.vimft-mbsync-syntaxThe mbsync application usesa configuration file to setup mailboxes names,user and password. All files ending with.mbsyncrc or with the nameisyncrc will be recognizedas mbsync configuration files.MEDIAWIKIft-mediawiki-syntaxBy default,syntax highlighting includes basic HTMLtags like style andheadershtml.vim. For strict Mediawikisyntax highlighting:let g:html_no_rendering = 1If HTML highlightingis desired, terminal-based textformatting suchasboldanditalicis possible by:let g:html_style_rendering = 1MODULA2modula2.vimft-modula2-syntaxVim will recognise comments with dialecttags to automatically selecta givendialect.Thesyntax fora dialecttag comment is:taggedComment :=  '(*!' dialectTag '*)'  ;dialectTag :=  m2pim | m2iso | m2r10  ;reserved words  m2pim = 'm2pim', m2iso = 'm2iso', m2r10 = 'm2r10'A dialecttag commentis recognised by Vim ifit occurs within the first 200lines of the source file. Only the very first such commentis recognised, anyadditional dialecttag comments are ignored.Example:DEFINITION MODULE FooLib; (*!m2pim*)...Variable g:modula2_default_dialect sets the default Modula-2 dialect when thedialect cannot be determined from the contents of the Modula-2 file: ifdefined and set to 'm2pim', the default dialectis PIM.Example:let g:modula2_default_dialect = 'm2pim'Highlightingis further configurable for each dialect via the followingvariables.VariableHighlightmodula2_iso_allow_lowline  allow low line in identifiersmodula2_iso_disallow_octals  disallowoctal integer literalsmodula2_iso_disallow_synonyms  disallow "@", "&" and "~" synonymsmodula2_pim_allow_lowline  allow low line in identifiersmodula2_pim_disallow_octals  disallowoctal integer literalsmodula2_pim_disallow_synonyms  disallow "&" and "~" synonymsmodula2_r10_allow_lowline  allow low line in identifiersMOOmoo.vimft-moo-syntaxIf you use C-style comments inside expressions and findit mangles yourhighlighting, you may want to use extended (slow!) matches for C-stylecomments::let moo_extended_cstyle_comments = 1To disable highlighting of pronoun substitution patterns inside strings::let moo_no_pronoun_sub = 1To disable highlighting of the regularexpressionoperator '%|', and matching'%(' and '%)' inside strings::let moo_no_regexp = 1Unmatched doublequotes can be recognized and highlightedas errors::let moo_unmatched_quotes = 1To highlight builtin properties (.name, .location, .programmer etc.)::let moo_builtin_properties = 1Unknown builtinfunctions can be recognized and highlightedas errors.  If youuse this option, add your own extensions to the mooKnownBuiltinFunction group.To enable this option::let moo_unknown_builtin_functions = 1An example of adding sprintf() to thelist of known builtin functions::syn keyword mooKnownBuiltinFunction sprintf containedMSQLmsql.vimft-msql-syntaxThere are twooptions for the msqlsyntax highlighting.If you like SQLsyntax highlighting inside Strings, use this::let msql_sql_query = 1For syncing, minlines defaults to 100.If you prefer another value, you canset "msql_minlines" to the value you desire.  Example::let msql_minlines = 200NEOMUTTneomutt.vimft-neomuttrc-syntaxft-neomuttlog-syntaxTo disable the default NeoMutt log colors::let g:neolog_disable_default_colors = 1N1QLn1ql.vimft-n1ql-syntaxN1QLisa SQL-like declarative language for manipulating JSON documents inCouchbase Server databases.Vimsyntax highlights N1QL statements, keywords, operators, types, comments,and special values.  Vim ignores syntactical elements specific to SQL or itsmany dialects, like COLUMN or CHAR, that don't exist in N1QL.NCFncf.vimft-ncf-syntaxThereis one option for NCFsyntax highlighting.If you want to have unrecognized (by ncf.vim) statements highlightedaserrors, use this::let ncf_highlight_unknowns = 1If you don't want to highlight these errors, leaveit unset.NROFFnroff.vimft-nroff-syntaxThe nroffsyntax file works with AT&T n/troff out of the box.  You need toactivate the GNU groff extra features included in thesyntax file before youcan use them.For example, Linux and BSD distributions use groffas their default textprocessing package.  In order to activate the extrasyntax highlightingfeatures for groff, arrange for files to be recognizedas groff (seeft-groff-syntax) or add the following option to your start-up files:  :let nroff_is_groff = 1Groffis different from the old AT&T n/troff that you may still find inSolaris.  Groffmacro and request names can be longer than 2 characters andthere are extensions to the language primitives.  For example, in AT&T troffyou access the yearasa 2-digit number with the request \(yr.  In groff youcan use the same request, recognized for compatibility, or you can use groff'snative syntax, \[yr].  Furthermore, you can usea 4-digit year directly:\[year].  Macro requests can be longer than 2 characters, for example, GNU mmaccepts the requests ".VERBON" and ".VERBOFF" for creating verbatimenvironments.In order to obtain the best formatted output g/troff can give you, you shouldfollowa few simple rules about spacing and punctuation.1. Do not leave empty spacesat theend of lines.2. Leave onespace and onespace only after an end-of-sentence period,   exclamation mark, etc.3. For reasons stated below,itis best to follow all period marks witha   carriage return.The reason behind these unusualtipsis that g/n/troff havea line breakingalgorithm that can be easily upset if you don't follow the rules given above.Unlike TeX, troff fills text line-by-line, not paragraph-by-paragraph and,furthermore,it does not havea concept of glue or stretch, all horizontal andverticalspace input will be outputas is.Therefore, you should be careful about not using morespace between sentencesthan you intend to have in your final document.  For this reason, the commonpracticeis toinserta carriage return immediately after all punctuationmarks.  If you want to have "even" text in your final processed output, youneed to maintain regular spacing in the input text.  Tomark both trailingspaces and two or more spaces aftera punctuationas an error, use:  :let nroff_space_errors = 1Another technique to detect extra spacing and othererrors that will interferewith the correct typesetting of your file,is to define an eye-catchinghighlighting definition for thesyntax groups "nroffDefinition" and"nroffDefSpecial" in your configuration files.  For example:  hi def nroffDefinition term=italic cterm=italic gui=reverse  hi def nroffDefSpecial term=italic,bold cterm=italic,bold \ gui=reverse,boldIf you want to navigate preprocessor entries in your source fileas easilyaswithsection markers, you can activate the following option in your.vimrcfile:let b:preprocs_as_sections = 1As well, thesyntax file adds an extraparagraph marker for the extendedparagraphmacro (.XP) in the ms package.Finally, thereisagroff.vimsyntax file that can be used for enablinggroffsyntax highlighting either ona file basis or globally by default.OCAMLocaml.vimft-ocaml-syntaxThe OCamlsyntax file handles files having the following prefixes: .ml,.mli, .mll and .mly.  By setting the following variable:let ocaml_revised = 1you can switch from standard OCaml-syntax to revisedsyntaxas supportedby the camlp4 preprocessor.  Setting the variable:let ocaml_noend_error = 1prevents highlighting of "end"as error, whichis useful when sourcescontain very long structures that Vim does not synchronize anymore.PANDOCft-pandoc-syntaxBy default, markdown files will be detectedasfiletype "markdown".Alternatively, you may want them to be detectedasfiletype "pandoc" instead.Todo so, set theg:filetype_md var::let g:filetype_md = 'pandoc'The pandocsyntaxplugin usesconceal for pretty highlighting. Defaultis 1:let g:pandoc#syntax#conceal#use = 1To specify elements that should not be concealed, set the following variable::let g:pandoc#syntax#conceal#blacklist = []Thisisalist of the rules which can be used here:- titleblock- image- block-subscript- superscript- strikeout- atx- codeblock_start- codeblock_delim- footnote- definition-list- newline- dashes- ellipses-quotes- inlinecode- inlinemathYou can customize the way concealing works. For example, if you prefer tomarkfootnotes with the* symbol::let g:pandoc#syntax#conceal#cchar_overrides = {"footnote" : "*"}Toconceal the urls in links, use::let g:pandoc#syntax#conceal#urls = 1Prevent highlighting specific codeblock types so that they remain Normal.Codeblock types include "definition" for codeblocks inside definition blocksand "delimited" for delimited codeblocks. Default=[]:let g:pandoc#syntax#codeblocks#ignore = ['definition']Use embedded highlighting for delimited codeblocks wherea languageisspecified. Default= 1:let g:pandoc#syntax#codeblocks#embeds#use = 1For specify what languages and using whatsyntax files to highlight embeds.Thisisalist of language names. When the language pandoc and vim use don'tmatch, you can use the "PANDOC=VIM" syntax. For example::let g:pandoc#syntax#codeblocks#embeds#langs = ["ruby", "bash=sh"]To use italics and strong in emphases. Default= 1:let g:pandoc#syntax#style#emphases = 1"0" will add "block" to g:pandoc#syntax#conceal#blacklist, because otherwiseyou couldn't tell where the styles are applied.To addunderline subscript, superscript and strikeout text styles. Default= 1:let g:pandoc#syntax#style#underline_special = 1Detect and highlight definition lists. Disabling this can improve performance.Default= 1 (i.e., enabled by default):let g:pandoc#syntax#style#use_definition_lists = 1The pandocsyntaxscript also comes with the following commands::PandocHighlight LANGEnables embedded highlighting for language LANG in codeblocks. Uses thesyntax for items in g:pandoc#syntax#codeblocks#embeds#langs.:PandocUnhighlight LANGDisables embedded highlighting for language LANG in codeblocks.PAPPpapp.vimft-papp-syntaxThe PAppsyntax file handles .papp files and, toa lesser extent, .pxmland .pxsl files which are alla mixture of perl/xml/html/other using xmlas the top-level file format.  By default everything inside phtml or pxmlsectionsis treatedasastring with embedded preprocessor commands.  Ifyou set the variable::let papp_include_html=1in yourstartup fileit will try to syntax-highlight html code inside phtmlsections, but thisis relatively slow and much too colourful to be able toedit sensibly. ;)The newest version of thepapp.vimsyntax file can usually be foundathttp://papp.plan9.de.PASCALpascal.vimft-pascal-syntaxFiles matching "*.p" could be Progress or Pascal and those matching "*.pp"could be Puppet or Pascal.  If the automatic detection doesn't work for you,or you only edit Pascal files, use this in yourstartup vimrc:   :let filetype_p  = "pascal"   :let filetype_pp = "pascal"The Pascalsyntax file has been extended to take into account some extensionsprovided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler.Delphi keywords are also supported.  By default, Turbo Pascal 7.0 features areenabled.  If you prefer to stick with the standard Pascal keywords, add thefollowing line to yourstartup file:   :let pascal_traditional=1To switch on Delphi specific constructions (suchas one-line comments,keywords, etc):   :let pascal_delphi=1The option pascal_symbol_operator controls whether symbol operators suchas +,*, .., etc. are displayed using the Operator color or not.  To colorize symboloperators, add the following line to yourstartup file:   :let pascal_symbol_operator=1Somefunctions are highlighted by default.  To switchit off:   :let pascal_no_functions=1Furthermore, there are specificvariables for some compilers.  Besidespascal_delphi, there are pascal_gpc and pascal_fpc.  Default extensions try tomatch Turbo Pascal.   :let pascal_gpc=1or   :let pascal_fpc=1To ensure that strings are defined ona single line, you can define thepascal_one_line_string variable.   :let pascal_one_line_string=1If you dislike<Tab> chars, you can set the pascal_no_tabs variable.  Tabswill be highlightedas Error.   :let pascal_no_tabs=1PERLperl.vimft-perl-syntaxThere area number of possibleoptions to theperlsyntax highlighting.Inline POD highlightingis now turned on by default.  If you don't wishto have the added complexity of highlighting POD embedded withinPerlfiles, you may set the 'perl_include_pod' option to 0::let perl_include_pod = 0To reduce the complexity of parsing (and increase performance) you can switchoff two elements in the parsing of variable names and contents.To handle package references in variable and function names not differentlyfrom the rest of the name (like 'PkgName::' in '$PkgName::VarName')::let perl_no_scope_in_variables = 1(In Vim 6.xit was the other way around: "perl_want_scope_in_variables"enabled it.)If youdo not want complex things like '@{${"foo"}}' to be parsed::let perl_no_extended_vars = 1(In Vim 6.xit was the other way around: "perl_extended_vars" enabled it.)Thecoloring strings can be changed.  By default strings and qq friends willbe highlighted like the first line.  If you set the variableperl_string_as_statement,it will be highlightedas in the second line.   "hello world!"; qq|hello world|;   ^^^^^^^^^^^^^^NN^^^^^^^^^^^^^^^N  (unlet perl_string_as_statement)   S^^^^^^^^^^^^SNNSSS^^^^^^^^^^^SN  (let perl_string_as_statement)(^= perlString,S= perlStatement,N=Noneat all)The syncing has 3 options.  The first two switch off some triggering ofsynchronization and should only be needed incaseit fails to work properly.If whilescrolling all ofa sudden the whole screen changes color completelythen you should try and switch off one of those.  Let the developer know ifyou can figure out the line that causes the mistake.One triggers on "^\s*sub\s*" and the other on "^[$@%]" more or less.:let perl_no_sync_on_sub:let perl_no_sync_on_global_varBelow you can set the maximum distance VIM should look forstarting points forits attempts insyntax highlighting.:let perl_sync_dist = 100If you want to usefolding with perl, set perl_fold::let perl_fold = 1If you want to fold blocks in if statements, etc.as well set the following::let perl_fold_blocks = 1Subroutines are folded by default if 'perl_fold'is set.  If youdo not wantthis, you can set 'perl_nofold_subs'::let perl_nofold_subs = 1Anonymous subroutines are not folded by default; you may enable theirfoldingvia 'perl_fold_anonymous_subs'::let perl_fold_anonymous_subs = 1Packages are also folded by default if 'perl_fold'is set.  To disable thisbehavior, set 'perl_nofold_packages'::let perl_nofold_packages = 1PHP3 and PHP4php.vimphp3.vimft-php-syntaxft-php3-syntax[Note: Previously this was called "php3", but sinceit now also supports php4it has been renamed to "php"]There are the followingoptions for the phpsyntax highlighting.If you like SQLsyntax highlighting inside Strings:  let php_sql_query = 1For highlighting the Baselib methods:  let php_baselib = 1Enable HTMLsyntax highlighting inside strings:  let php_htmlInStrings = 1Using the old colorstyle:  let php_oldStyle = 1Enable highlighting ASP-style short tags:  let php_asp_tags = 1Disable short tags:  let php_noShortTags = 1For highlighting parent error] or ):  let php_parent_error_close = 1For skippinga phpend tag, if there exists an open( or[ withouta closingone:  let php_parent_error_open = 1Enablefolding for classes and functions:  let php_folding = 1Selecting syncing method:  let php_sync_method = xx= -1 to sync by search (default),x>0 to syncat leastx lines backwards,x=0 to sync from start.PLAINTEXplaintex.vimft-plaintex-syntaxTeXisa typesetting language, and plaintexis the file type for the "plain"variant of TeX.  If you never want your *.tex files recognizedas plain TeX,seeft-tex-plugin.Thissyntax file has the optionlet g:plaintex_delimiters = 1if you want to highlight brackets "[]" and braces "{}".PPWIZARDppwiz.vimft-ppwiz-syntaxPPWizardisa preprocessor for HTML andOS/2 INF filesThissyntax file has the options:- ppwiz_highlight_defs: Determines highlighting mode for PPWizard's  definitions.  Possible values are  ppwiz_highlight_defs= 1: PPWizard #define statements retain the    colors of their contents (e.g. PPWizard macros and variables).  ppwiz_highlight_defs= 2: Preprocessor #define and #evaluate    statements are shown ina single color with the exception of line    continuation symbols.  The default setting for ppwiz_highlight_defsis 1.- ppwiz_with_html: If the valueis 1 (the default), highlight literal  HTML code; if 0, treat HTML code like ordinary text.PHTMLphtml.vimft-phtml-syntaxThere are twooptions for the phtmlsyntax highlighting.If you like SQLsyntax highlighting inside Strings, use this::let phtml_sql_query = 1For syncing, minlines defaults to 100.If you prefer another value, you canset "phtml_minlines" to the value you desire.  Example::let phtml_minlines = 200POSTSCRIPTpostscr.vimft-postscr-syntaxThere are severaloptions whenit comes to highlighting PostScript.First which version of the PostScript language to highlight.  There arecurrently three defined language versions, or levels.  Level 1is the originaland base version, and includes all extensions prior to the release of level 2.Level 2is the most common version around, and includes its own set ofextensions prior to the release of level 3.  Level 3is currently the highestlevel supported.  You select which level of the PostScript language you wanthighlighted by defining the postscr_level variableas follows::let postscr_level=2If this variableis not definedit defaults to 2 (level 2) since thisisthe most prevalent version currently.Note: Not all PS interpreters will support all language features foraparticular language level.  In particular the %!PS-Adobe-3.0at the start ofPS files does NOT mean the PostScript presentis level 3 PostScript!If you are working with Display PostScript, you can include highlighting ofDisplay PS language features by defining the postscr_display variableasfollows::let postscr_display=1If you are working with Ghostscript, you can include highlighting ofGhostscript specific language features by defining the variablepostscr_ghostscriptas follows::let postscr_ghostscript=1PostScriptisa large language, with many predefined elements.Whileituseful to have all these elements highlighted, on slower machines this cancause Vim to slow down.  In an attempt to be machine friendly font names andcharacter encodings are not highlighted by default.  Unless you are workingexplicitly with either of these this should be ok.  If you want them to behighlighted you should set one or both of the following variables::let postscr_fonts=1:let postscr_encodings=1Thereisa stylistic option to the highlighting of and, or, and not.  InPostScript the function of these operators depends on the types of theiroperands- if the operands are booleans then they are the logical operators,if they are integers then they are binary operators.  As binary and logicaloperators can be highlighted differently they have to be highlighted one wayor the other.  By default they are treatedas logical operators.  They can behighlightedas binary operators by defining the variablepostscr_andornot_binaryas follows::let postscr_andornot_binary=1ptcap.vimft-printcap-syntaxPRINTCAP+ TERMCAPft-ptcap-syntaxft-termcap-syntaxThissyntax file applies to the printcap andtermcap databases.In order for Vim to recognize printcap/termcap files thatdo not matchthe patterns *printcap*, or *termcap*, youmustput additional patternsappropriate to your system in yourmyfiletypefile file.  For thesepatterns, youmust set the variable "b:ptcap_type" to either "print" or"term", and then the'filetype' option to ptcap.For example, to make Vim identify all files in /etc/termcaps/astermcapfiles, add the following:   :au BufNewFile,BufRead /etc/termcaps/* let b:ptcap_type = "term" |       \ set filetype=ptcapIf you notice highlightingerrors whilescrolling backwards, whichare fixed when redrawing withCTRL-L, try setting the "ptcap_minlines"internal variable toa larger number:   :let ptcap_minlines = 50(The defaultis 20 lines.)PROGRESSprogress.vimft-progress-syntaxFiles matching "*.w" could be Progress or cweb.  If the automatic detectiondoesn't work for you, or you don't edit cwebat all, use this in yourstartup vimrc:   :let filetype_w = "progress"The same happens for "*.i", which could be assembly, and "*.p", which could bePascal.  Use this if you don't use assembly and Pascal:   :let filetype_i = "progress"   :let filetype_p = "progress"PYTHONpython.vimft-python-syntaxThere are sixoptions tocontrolPythonsyntax highlighting.For highlighted numbers::let python_no_number_highlight = 1For highlighted builtin functions::let python_no_builtin_highlight = 1For highlighted standard exceptions::let python_no_exception_highlight = 1For highlighted doctests and code inside::let python_no_doctest_highlight = 1or:let python_no_doctest_code_highlight = 1The first option implies the second one.For highlighted trailingwhitespace and mix of spaces and tabs::let python_space_error_highlight = 1If you want all possiblePython highlighting::let python_highlight_all = 1This has the same effectas setting python_space_error_highlight andunsetting all the other ones.If you usePython 2 or straddling code (Python 2 and 3 compatible),you can enforce the use of an oldersyntax file with support forPython 2 and up toPython 3.5.:let python_use_python2_syntax = 1This option will exclude all modernPython 3.6 or higher features.Note: Only existence of theseoptions matters, not their value.      You can replace 1 above with anything.QUAKEquake.vimft-quake-syntaxThe Quakesyntax definition should work for most FPS (First Person Shooter)based on one of the Quake engines.  However, the command names varya bitbetween the three games (Quake, Quake 2, and Quake 3 Arena) so thesyntaxdefinition checks for the existence of three globalvariables to allow usersto specify what commands are legal in their files.  The threevariables canbe set for the following effects:set to highlight commands only available in Quake::let quake_is_quake1 = 1set to highlight commands only available in Quake 2::let quake_is_quake2 = 1set to highlight commands only available in Quake 3 Arena::let quake_is_quake3 = 1Any combination of these threevariablesis legal, but might highlight morecommands than are actually available to you by the game.Rr.vimft-r-syntaxThe parsing ofR code forsyntax highlight starts 40 lines backwards, but youcan seta different value in yourvimrc. Example:let r_syntax_minlines = 60You can also turn offsyntax highlighting of ROxygen:let r_syntax_hl_roxygen = 0enablefolding of code delimited by parentheses, square brackets and curlybraces:let r_syntax_folding = 1and highlightasfunctions all keywords followed by an opening parenthesis:let r_syntax_fun_pattern = 1R MARKDOWNrmd.vimft-rmd-syntaxTo disablesyntax highlight of YAML header, add to yourvimrc:let rmd_syn_hl_yaml = 0To disablesyntax highlighting of citation keys:let rmd_syn_hl_citations = 0To highlightR code in knitr chunk headers:let rmd_syn_hl_chunk = 1By default, chunks ofR code will be highlighted following the rules ofRlanguage. Moreover, whenever the bufferis saved, Vim scans the buffer andhighlights other languages if they are present in new chunks. LaTeX code alsois automatically recognized and highlighted when the bufferis saved. Thisbehavior can be controlled with thevariablesrmd_dynamic_fenced_languages,andrmd_include_latex whose valid values are:let rmd_dynamic_fenced_languages = 0 " No autodetection of languageslet rmd_dynamic_fenced_languages = 1 " Autodetection of languageslet rmd_include_latex = 0 " Don't highlight LaTeX codelet rmd_include_latex = 1 " Autodetect LaTeX codelet rmd_include_latex = 2 " Always include LaTeX highlightingIf the value ofrmd_dynamic_fenced_languagesis 0, you still can set thelist of languages whose chunks of code should be properly highlighted,as inthe example:let rmd_fenced_languages = ['r', 'python']R RESTRUCTURED TEXTrrst.vimft-rrst-syntaxTo highlightR code in knitr chunk headers, add to yourvimrc:let rrst_syn_hl_chunk = 1RASIrasi.vimft-rasi-syntaxRasi stands for Rofi Advanced Style Information. Itis used by the programrofi to style the rendering of the search window. The languageis heavilyinspired by CSS stylesheet. Files with the following extensions are recognizedas rasi files: .rasi.READLINEreadline.vimft-readline-syntaxThe readline libraryis primarily used by the BASH shell, which adds quiteafew commands andoptions to the ones already available.  To highlight theseitemsas well you can add the following to yourvimrc or just typeit in thecommand line before loadinga file with the readline syntax:let readline_has_bash = 1This will add highlighting for the commands that BASH (version 2.05a andlater, and part earlier) adds.REGOrego.vimft-rego-syntaxRegoisa query language developed by Styra.  Itis mostly usedasa policylanguage for kubernetes, but can be applied to almost anything.  Files withthe following extensions are recognizedas rego files: .rego.RESTRUCTURED TEXTrst.vimft-rst-syntaxSyntax highlightingis enabled for code blocks within the document foraselect number of file types.  See $VIMRUNTIME/syntax/rst.vim for the defaultsyntax list.To seta user-definedlist of code blocksyntax highlighting:let rst_syntax_code_list = ['vim', 'lisp', ...]To assign multiple code block types toa single syntax, definerst_syntax_code_listasa mapping:let rst_syntax_code_list = {\ 'cpp': ['cpp', 'c++'],\ 'bash': ['bash', 'sh'],...\ }To use color highlighting for emphasis text:let rst_use_emphasis_colors = 1To enablefolding of sections:let rst_fold_enabled = 1Note thatfolding can cause performance issues on some platforms.REXXrexx.vimft-rexx-syntaxIf you notice highlightingerrors whilescrolling backwards, which are fixedwhen redrawing withCTRL-L, try setting the "rexx_minlines" internal variabletoa larger number::let rexx_minlines = 50This will make thesyntax synchronization start 50 lines before the firstdisplayed line.  The default valueis 10.  The disadvantage of usinga largernumberis that redrawing can become slow.Vim tries to guess what typea ".r" file is.  Ifit can't be detected (fromcomment lines), the defaultis "r".  To make the default rexx add this line toyour .vimrc:g:filetype_r:let g:filetype_r = "r"RUBYruby.vimft-ruby-syntax    Ruby: Operator highlightingruby_operators    Ruby: Whitespaceerrorsruby_space_errors    Ruby:Foldingruby_foldruby_foldable_groups    Ruby: Reducing expensive operationsruby_no_expensiveruby_minlines    Ruby: Spellchecking stringsruby_spellcheck_stringsruby_operators Ruby: Operator highlightingOperators can be highlighted by defining "ruby_operators"::let ruby_operators = 1ruby_space_errors Ruby: Whitespace errorsWhitespaceerrors can be highlighted by defining "ruby_space_errors"::let ruby_space_errors = 1This will highlight trailingwhitespace and tabs preceded byaspace characteras errors.  This can be refined by defining "ruby_no_trail_space_error" and"ruby_no_tab_space_error" which will ignore trailingwhitespace and tabs afterspaces respectively.ruby_foldruby_foldable_groups Ruby: FoldingFolding can be enabled by defining "ruby_fold"::let ruby_fold = 1This will set the value of'foldmethod' to "syntax" locally to the currentbuffer or window, which will enable syntax-basedfolding when editingRubyfiletypes.Defaultfoldingis rather detailed, i.e., smallsyntax units like "if", "do","%w[]" may create corresponding fold levels.You can set "ruby_foldable_groups" to restrict which groups are foldable::let ruby_foldable_groups = 'if case %'The valueisa space-separatedlist of keywords:    keyword       meaning    --------  -------------------------------------    ALL        Most blocksyntax (default)    NONE       Nothing    if       "if" or "unless" block    def        "def" blockclass      "class" block    module     "module" blockdo       "do" block    begin      "begin" blockcase       "case" block    for        "for", "while", "until" loops{       Curly bracket block or hash literal[       Array literal%       Literal with "%" notation, e.g.: %w(STRING), %!STRING!/       RegexpstringString and shell command output (surrounded by ', ",`):       Symbol#       Multiline comment<<       Here documents    __END__    Source code after "__END__" directiveruby_no_expensive Ruby: Reducing expensive operationsBy default, the "end" keywordis colorized according to the opening statementof the blockit closes.  While useful, this feature can be expensive; if youexperience slow redrawing (or you are onaterminal with poor color support)you may want to turnit off by defining the "ruby_no_expensive" variable::let ruby_no_expensive = 1In thiscase the same color will be used for allcontrol keywords.ruby_minlinesIf youdo want this feature enabled, but notice highlightingerrors whilescrolling backwards, which are fixed when redrawing withCTRL-L, try settingthe "ruby_minlines" variable toa value larger than 50::let ruby_minlines = 100Ideally, this value should bea number of lines large enough to embrace yourlargestclass or module.ruby_spellcheck_strings Ruby: Spellchecking stringsRubysyntax will perform spellchecking of strings if you define"ruby_spellcheck_strings"::let ruby_spellcheck_strings = 1SCHEMEscheme.vimft-scheme-syntaxBy default only R7RS keywords are highlighted and properly indented.scheme.vim also supports extensions of the CHICKEN Scheme->C compiler.Define b:is_chicken or g:is_chicken, if you need them.SDLsdl.vimft-sdl-syntaxThe SDL highlighting probably missesa few keywords, but SDL has so manyof them it's almost impossibly to cope.The new standard, SDL-2000,specifies that all identifiers arecase-sensitive (which was not so before), and that all keywords can beused either completelylowercase or completely uppercase.  To have thehighlighting reflect this, you can set the following variable::let sdl_2000=1This also sets many new keywords.  If you want to disable the oldkeywords, whichis probablya good idea, use::let SDL_no_96=1The indentationis probably also incomplete, but right nowI am verysatisfied withit for my own projects.SEDsed.vimft-sed-syntaxTo make tabs stand out from regular blanks (accomplished by using Todohighlighting on the tabs), define "g:sed_highlight_tabs" by putting:let g:sed_highlight_tabs = 1in thevimrc file.  (This special highlighting only applies for tabsinside search patterns, replacement texts, addresses or text includedby an Append/Change/Insert command.)  If you enable this option,itisalsoa good idea to set thetab width to one character; by doing that,you can easilycount the number of tabs ina string.GNU sed allows comments after text on the same line.  BSD sed only allowscomments where "#"is the first character of the line.  To enforce BSD-stylecomments, i.e.mark end-of-line commentsas errors, use::let g:sed_dialect = "bsd"Note that there are other differences between GNU sed and BSD sed which arenot (yet) affected by this setting.Bugs:  The transform command (y)is treated exactly like the substitute  command.  This means that,as faras thissyntax fileis concerned,  transform accepts the same flagsas substitute, whichis wrong.  (Transform accepts no flags.)I tolerate this bug because the  involved commands need very complex treatment (95 patterns, one for  each plausiblepattern delimiter).SGMLsgml.vimft-sgml-syntaxThecoloring scheme fortags in the SGML file worksas follows.The<> of openingtags are colored differently than the </> ofa closing tag.Thisis on purpose! For openingtags the 'Function' coloris used, while forclosingtags the 'Type' coloris used (See syntax.vim to check how those aredefined for you)Knowntag names are colored the same wayas statements in C.  Unknowntagnames are not colored which makesiteasy to spot errors.Note that the sameistrue for argument (or attribute) names.  Known attributenames are colored differently than unknown ones.Some SGMLtags are used to change the rendering of text.  The followingtagsare recognized by thesgml.vimsyntaxcoloring file and change the way normaltextis shown:<varname><emphasis><command><function><literal><replaceable><ulink> and<link>.If you want to change how such textis rendered, youmust redefine thefollowingsyntax groups:- sgmlBold- sgmlBoldItalic- sgmlUnderline- sgmlItalic- sgmlLink for linksTo make this redefinition work youmust redefine them all and define thefollowing variable in yourvimrc (thisis due to the order in which the filesare read during initialization)   let sgml_my_rendering=1You can also disable this rendering by adding the following line to yourvimrc file:   let sgml_no_rendering=1(Adapted from thehtml.vimhelp text by Claudio Fleiner <claudio@fleiner.com>)ft-posix-syntaxft-dash-syntaxSHsh.vimft-sh-syntaxft-bash-syntaxft-ksh-syntaxThis coverssyntax highlighting for the olderUnix (Bourne) sh, and newershells suchas bash, dash, posix, and the Korn shells.Vim attempts to determine which shell typeis in use by specifying thatvarious filenames are of specific types, e.g.:    ksh : .kshrc* *.ksh    bash: .bashrc* bashrc bash.bashrc .bash_profile* *.bashSee $VIMRUNTIME/filetype.vim for the fulllist of patterns.  If none of thesecases pertain, then the first line of the fileis examined (ex. looking for/bin/sh  /bin/ksh  /bin/bash).  If the first linespecifiesa shelltype, thenthat shelltypeis used.  However some files (ex. .profile) are known to beshell files but the typeis not apparent.  Furthermore, on many systems shissymbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (POSIX).One may specifya global default by instantiating one of the followingvariables in your <.vimrc>:   ksh:let g:is_kornshell = 1   posix: (default)let g:is_posix     = 1   bash:let g:is_bash   = 1   dash:let g:is_dash   = 1   sh: Bourne shelllet g:is_sh   = 1Specific shell features are automatically enabled based on the shell detectedfrom the shebang line("#!...").  For KornShell Vim detects different shellfeatures for mksh, ksh88, ksh93, ksh93u, ksh93v, and ksh2020.If there's no "#!..." line, and the user hasn't availed himself/herself ofadefaultsh.vimsyntax settingas just shown, then syntax/sh.vim will assumethe POSIX shell syntax.  No need toquote RFCs or market penetrationstatistics in error reports, please-- just select the default version of thesh your system uses andinstall the associated "let..." in your <.vimrc>.The syntax/sh.vim file provides several levels of syntax-based folding:let g:sh_fold_enabled= 0     (default, no syntax folding)let g:sh_fold_enabled= 1     (enable function folding)let g:sh_fold_enabled= 2     (enable heredoc folding)let g:sh_fold_enabled= 4     (enable if/do/for folding)thenvarioussyntax items (ie. HereDocuments and function bodies) becomesyntax-foldable (see:syn-fold).  You also may add these togetherto get multiple types of folding:let g:sh_fold_enabled= 3     (enables function and heredoc folding)If you notice highlightingerrors whilescrolling backwards which are fixedwhen one redraws withCTRL-L, try setting the "sh_minlines" internal variabletoa larger number.  Example:let sh_minlines = 500This will makesyntax synchronization start 500 lines before the firstdisplayed line.  The default valueis 200.  The disadvantage of usinga largernumberis that redrawing can become slow.If you don't have much to synchronize on, displaying can be very slow.Toreduce this, the "sh_maxlines" internal variable can be set.  Example:let sh_maxlines = 100The defaultis to use the twice sh_minlines.  Setit toa smaller number tospeed up displaying.  The disadvantageis that highlighterrors may appear.syntax/sh.vim tries to flag certain problemsas errors; usually things likeunmatched "]", "done", "fi", etc.  If you find the error handling problematicfor your purposes, you may suppress such error highlighting by puttingthe following line in your .vimrc:let g:sh_no_error= 1sh-embedsh-awk Sh: EMBEDDING LANGUAGESYou may wish to embed languages into sh.  I'll give an example courtesy ofLorance Stinson on how todo this with awkas an example. Put the followingfile into $HOME/.vim/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 TypeThis 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 beextended to other languages.SPEEDUPspup.vimft-spup-syntax(AspenTech plant simulator)The Speedupsyntax file has some options:- strict_subsections: If this variableis defined, only keywords for  sections and subsections will be highlightedas 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 highlightedas Type, notasa  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 thesyntax 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 codestarting with the second#as  error.  Thisis the default setting.  oneline_comments= 3: Show the whole lineas error ifit contains  more than one #.Since especially OPERATION sections tend to become very large due toPRESETting variables, syncing may be critical.  If your computerisfast enough, you can increase minlines and/or maxlines near theend ofthesyntax file.SQLsql.vimft-sql-syntaxsqlinformix.vimft-sqlinformix-syntaxsqlanywhere.vimft-sqlanywhere-syntaxWhile thereis an ANSI standard for SQL, most database engines add their owncustom extensions.  Vim currently supports the Oracle and Informix dialects ofSQL.  Vim assumes "*.sql" files are Oracle SQL by default.Vim currently has SQL support fora variety of different vendors viasyntaxscripts.  You can change Vim's default from Oracle to any of the current SQLsupported types.  You can also easily alter the SQL dialect being used onabuffer by buffer basis.For more detailed instructions seeft_sql.txt.SQUIRRELsquirrel.vimft-squirrel-syntaxSquirrelisa high level imperative, object-oriented programming language,designed to bea light-weight scripting language that fits in the size, memorybandwidth, and real-time requirements of applications like video games.  Fileswith the following extensions are recognizedas squirrel files: .nut.TCSHtcsh.vimft-tcsh-syntaxThis covers the shell named "tcsh".  Itisa superset of csh.  Seecsh.vimfor how thefiletypeis detected.Tcsh does not allow \" in strings unless the "backslash_quote" shell variableis set.  If you want VIM to assume that nobackslashquote constructs existadd this line to your .vimrc::let tcsh_backslash_quote = 0If you notice highlightingerrors whilescrolling backwards, which are fixedwhen redrawing withCTRL-L, try setting the "tcsh_minlines" internal variabletoa larger number::let tcsh_minlines = 1000This will make thesyntax synchronization start 1000 lines before the firstdisplayed line.  If you set "tcsh_minlines" to "fromstart", thensynchronizationis done from the start of the file. The default value fortcsh_minlinesis 100.  The disadvantage of usinga larger numberis thatredrawing can become slow.TEXtex.vimft-tex-syntaxlatex-syntaxsyntax-texsyntax-latexTex ContentsTex: WantSyntax Folding?tex-foldingTex: No Spell Checking Wantedg:tex_nospellTex: Don't Want Spell Checking In Comments?tex-nospellTex: Want Spell Checking in Verbatim Zones?tex-verbTex: Run-on Comments or MathZonestex-runonTex: SlowSyntax Highlighting?tex-slowTex: Want To Highlight More Commands?tex-morecommandsTex: Excessive Error Highlighting?tex-errorTex: Needa new Math Group?tex-mathTex: Startinga New Style?tex-styleTex: Taking Advantage of Conceal Modetex-concealTex: Selective Conceal Modeg:tex_concealTex: Controlling iskeywordg:tex_iskTex: Fine Subscript and Superscript Controltex-supersubTex: Match Check Controltex-matchchecktex-foldingg:tex_fold_enabled Tex: Want Syntax Folding?As of version 28 of <syntax/tex.vim>, syntax-basedfolding of parts, chapters,sections, subsections, etc are supported.  Putlet g:tex_fold_enabled=1in your <.vimrc>, and:set fdm=syntax.I suggest doing the latter viaamodelineat theend of your LaTeX file:% vim: fdm=syntaxIf your system becomes too slow, then you might wish to look intohttps://vimhelp.org/vim_faq.txt.html#faq-29.7g:tex_nospell Tex: No Spell Checking WantedIf you don't wantspell checking anywhere in your LaTeX document,putlet g:tex_nospell=1into your .vimrc.  If you merely wish to suppressspell checking insidecomments only, seeg:tex_comment_nospell.tex-nospellg:tex_comment_nospell Tex: Don't Want Spell Checking In Comments?Some folks like to include things like source code in comments and so wouldprefer thatspell checking be disabled in comments in LaTeX files.  Todothis,put the following in your <.vimrc>:      let g:tex_comment_nospell= 1If you want to suppressspell checking everywhere inside your LaTeX document,seeg:tex_nospell.tex-verbg:tex_verbspell Tex: Want Spell Checking in Verbatim Zones?Often verbatim regions are used for things like source code; seldom doesone want source code spell-checked.  However, for those of you whodowant your verbatim zones spell-checked,put the following in your <.vimrc>:let g:tex_verbspell= 1tex-runontex-stopzone Tex: Run-on Comments or MathZonesThe <syntax/tex.vim> highlighting supports TeX, LaTeX, and some AmsTeX.  Thehighlighting supports three primary zones/regions: normal, texZone, andtexMathZone.  Although considerable effort has been made to have these zonesterminate properly, zones delineated by $..$ and $$..$$ cannot be synchronizedas there's no difference between start andend patterns.  Consequently,aspecial "TeX comment" has been provided%stopzonewhich will forcibly terminate the highlighting of eithera texZone oratexMathZone.tex-slowtex-sync Tex: Slow Syntax Highlighting?If you havea slow computer, you may wish to reduce the values for:syn sync maxlines=200:syn sync minlines=50(especially the latter).  If your computeris fast, you may wish toincrease them.This primarily affects synchronizing (i.e. just what group,if any,is the textat the top of the screen supposed to be in?).Another cause of slow highlightingis due to syntax-driven folding; seetex-folding fora way around this.g:tex_fastFinally, ifsyntax highlightingis still too slow, you may set:let g:tex_fast= ""in your .vimrc.  Used this way, theg:tex_fast variable causes thesyntaxhighlightingscript to avoid defining any regions and associatedsynchronization.  The result will be much fastersyntax highlighting; theprice: you will no longer haveas much highlighting or any syntax-basedfolding, and you will be missing syntax-based error checking.You may decide that somesyntaxis acceptable; you may use the following tableselectively to enable just somesyntax highlighting:    b : allow bold and italic syntax    c : allow texComment syntax    m : allow texMatcher syntax (ie. {...} and [...])    M : allow texMath syntax    p : allow parts, chapter, section, etc syntax    r : allow texRefZone syntax (nocite, bibliography, label, pageref, eqref)    s : allow superscript/subscript regions    S : allow texStyle syntax    v : allow verbatim syntax    V : allow texNewEnv and texNewCmd syntaxAs an example, let g:tex_fast= "M" will allow math-associated highlightingbut suppress all the other region-basedsyntax highlighting.(also see:g:tex_conceal andtex-supersub)tex-morecommandstex-package Tex: Want To Highlight More Commands?LaTeXisa programmable language, and so there are thousands ofpackages fullof specialized LaTeX commands, syntax, and fonts.  If you're using suchapackage you'll often wish that the distributed syntax/tex.vim would supportit.  However, clearly thisis impractical.  So please consider using thetechniques inmysyntaxfile-add to extend or modify the highlighting providedby syntax/tex.vim.  Please consider uploading any extensions that you write,which typically wouldgo in $HOME/after/syntax/tex/[pkgname].vim, tohttp://vim.sf.net/.I've included some support forvarious popularpackages on my website:http://www.drchip.org/astronaut/vim/index.html#LATEXPKGSThesyntax files therego into your .../after/syntax/tex/ directory.tex-errorg:tex_no_error Tex: Excessive Error Highlighting?The <tex.vim> supports lexical error checking ofvarious sorts.  Thus,although the error checkingis ofttimes very useful,it can indicateerrors where none actually are.  If this proves to bea problem for you,you mayput in your <.vimrc> the following statement:let g:tex_no_error=1and all error checking by <syntax/tex.vim> will be suppressed.tex-math Tex: Need a new Math Group?If you want to includea new math group in your LaTeX, the followingcode shows you an exampleas to how you mightdo so:call TexNewMathZone(sfx,mathzone,starform)You'll want to provide the new math group witha unique suffix(currently, A-L and V-Z are taken by <syntax/tex.vim> itself).As an example, consider how eqnarrayis set up by <syntax/tex.vim>:call TexNewMathZone("D","eqnarray",1)You'll need to change "mathzone" to the name of your new math group,and then to the call toit in .vim/after/syntax/tex.vim.The "starform" variable, if true, implies that your new math grouphasa starred form (ie. eqnarray*).tex-styleb:tex_stylish Tex: Starting a New Style?One may use "\makeatletter" in *.tex files, thereby making the use of "@" incommands available.  However, since the *.tex file doesn't have one of thefollowing suffices: sty cls clo dtx ltx, thesyntax highlighting will flagsuch use of@as an error.  To solve this::let b:tex_stylish = 1:set ft=texPutting "let g:tex_stylish=1" into your <.vimrc> will make <syntax/tex.vim>always accept such use of @.tex-cchartex-coletex-conceal Tex: Taking Advantage of Conceal ModeIf you have'conceallevel' set to 2 and if your encodingis utf-8, thenanumber of character sequences can be translated into appropriateutf-8 glyphs,includingvarious accented characters, Greek characters in MathZones, andsuperscripts and subscripts in MathZones.  Not all characters can be made intosuperscripts or subscripts; the constraintis due to whatutf-8 supports.In fact, onlya few characters are supportedas subscripts.One way to use thisis to have vertically splitwindows (seeCTRL-W_v); onewith'conceallevel'at0 and the otherat 2; and both using'scrollbind'.g:tex_conceal Tex: Selective Conceal ModeYou may selectively useconceal mode by settingg:tex_conceal in your<.vimrc>.  By default,g:tex_concealis set to "admgs" to enable concealmentfor the following sets of characters:a = accents/ligaturesb = bold and italicd = delimitersm = math symbolsg = Greeks = superscripts/subscriptsBy leaving one or more of these out, the associated conceal-charactersubstitution will not be made.g:tex_iskg:tex_stylish Tex: Controlling iskeywordNormally, LaTeX keywords support 0-9, a-z, A-z, and 192-255 only. Latexkeywords don't support the underscore- except when in *.sty files.  Thesyntax highlightingscript handles this with the following logic:* Ifg:tex_stylish exists andis 1then the file will be treatedasa "sty" file, so the "_"will be allowedas part of keywords(regardless of g:tex_isk)* Else if the file's suffixis sty, cls, clo, dtx, or ltx,then the file will be treatedasa "sty" file, so the "_"will be allowedas part of keywords(regardless of g:tex_isk)* Ifg:tex_isk exists, thenit will be used for the local'iskeyword'* Else the local'iskeyword' will be set to 48-57,a-z,A-Z,192-255tex-supersubg:tex_superscriptsg:tex_subscripts Tex: Fine Subscript and Superscript ControlSeetex-conceal for how to enable concealed character replacement.Seeg:tex_conceal for selectively concealing accents, bold/italic,math, Greek, and superscripts/subscripts.One may exert finecontrol over which superscripts and subscripts onewants syntax-based concealment for (see:syn-cchar).  Since not allfonts support all characters, one may override theconcealed-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 supportsubscriptcharacters for "hklmnpst", soIputlet g:tex_subscripts= "[0-9aeijoruvx,+-/().]"in ~/.vim/ftplugin/tex/tex.vim in order to avoid having inscrutableutf-8 glyphs appear.tex-matchcheckg:tex_matchcheck Tex: Match Check ControlSometimes one actually wants mismatched parentheses, square braces,and or curly braces; for example, \text{(1,10]}isa range from butnot including 1 to and including 10.  This wish, of course, conflictswith the desire to provide delimiter mismatch detection.  Toaccommodate these conflicting goals, syntax/tex.vim providesg:tex_matchcheck = '[({[]'whichis shown along with its default setting.  So, if one doesn'twant[] and () to be checked for mismatches, try usinglet g:tex_matchcheck= '[{}]'If you don't want matching to occur insidebold and italicizedregions,let g:tex_excludematcher= 1will prevent the texMatcher group from being included in those regions.TFtf.vimft-tf-syntaxThereis one option for the tfsyntax highlighting.For syncing, minlines defaults to 100.If you prefer another value, you canset "tf_minlines" to the value you desire.  Example::let tf_minlines = your choiceTYPESCRIPTtypescript.vimft-typescript-syntaxtypescriptreact.vimft-typescriptreact-syntaxThereis one option tocontrol the TypeScriptsyntax highlighting.g:typescript_host_keywordWhen this variableis set to 1, host-specific APIs suchasaddEventListenerare highlighted. To disable setit to zero in your .vimrc:let g:typescript_host_keyword = 0The default valueis 1.TYPSTft-typst-syntaxg:typst_embedded_languagesTypst files can embedsyntax highlighting for other languages by setting theg:typst_embedded_languages variable. This variableisalist of languagenames whosesyntaxdefinitions will be included in Typst files. Example:    let g:typst_embedded_languages = ['python', 'r']VIMvim.vimft-vim-syntaxg:vimsyn_minlinesg:vimsyn_maxlinesThereisa trade-off between more accuratesyntax highlighting versus screenupdating speed.  To improve accuracy, you may wish to increase theg:vimsyn_minlines variable.  Theg:vimsyn_maxlines variable may be used toimprove screen updating rates (see:syn-sync for more on this).g:vimsyn_minlines : used to set synchronization minlinesg:vimsyn_maxlines : used to set synchronization maxlines(g:vim_minlines and g:vim_maxlines are deprecated variants ofthese two options)g:vimsyn_embedTheg:vimsyn_embed option allows users to select what, if any, types ofembeddedscript highlighting they wish to have.   g:vimsyn_embed == 0   : don't support any embedded scripts   g:vimsyn_embed =~ 'l' : support embedded Lua   g:vimsyn_embed =~ 'm' : support embedded MzScheme   g:vimsyn_embed =~ 'p' : support embedded Perl   g:vimsyn_embed =~ 'P' : support embedded Python   g:vimsyn_embed =~ 'r' : support embedded Ruby   g:vimsyn_embed =~ 't' : support embedded TclBy default,g:vimsyn_embedis unset, and theLua andPythonscript interfacesare supported.g:vimsyn_foldingSomefoldingis now supported with when'foldmethod'is set to "syntax":   g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding   g:vimsyn_folding =~ 'a' : fold augroups   g:vimsyn_folding =~ 'c' : fold Vim9 classes   g:vimsyn_folding =~ 'e' : fold Vim9 enums   g:vimsyn_folding =~ 'f' : fold functions   g:vimsyn_folding =~ 'h' : fold let heredocs   g:vimsyn_folding =~ 'i' : fold Vim9 interfaces   g:vimsyn_folding =~ 'H' : fold Vim9 legacy headers   g:vimsyn_folding =~ 'l' : fold Lua      heredocs   g:vimsyn_folding =~ 'm' : fold MzScheme heredocs   g:vimsyn_folding =~ 'p' : fold Perl     heredocs   g:vimsyn_folding =~ 'P' : fold Python   heredocs   g:vimsyn_folding =~ 'r' : fold Ruby     heredocs   g:vimsyn_folding =~ 't' : fold Tcl      heredocsBy default,g:vimsyn_foldingis unset.  Concatenate the indicated charactersto supportfolding of multiplesyntax constructs (e.g.,g:vimsyn_folding= "fh" will enablefolding of bothfunctions and heredocs).g:vimsyn_comment_stringsBy default, strings are highlighted inside comments.  This may be disabled bysettingg:vimsyn_comment_strings to false.g:vimsyn_noerrorNot all error highlighting that syntax/vim.vim does may be correct; Vimscriptisa difficult language to highlight correctly.A way to suppress errorhighlightingis toput the following line in yourvimrc:let g:vimsyn_noerror = 1To suppress only specific errors, define the following variables:   g:vimsyn_nobehaveerror = 1        " :behave error   g:vimsyn_vimFTError = 1           " :filetype error   g:vimsyn_noaugrouperror = 1       " :augroup error   g:vimsyn_noopererror = 1          " operator error   g:vimsyn_notypealiaserror = 1     " Vim9 type alias error   g:vimsyn_novimfunctionerror = 1   " Vim9 method error   g:vimsyn_nousercmderror = 1       " :com error   g:vimsyn_novimsynerror = 1        " :syn error   g:vimsyn_novimsyncaseerror = 1    " :syn case error   g:vimsyn_novimsynconcealerror = 1 " :syn conceal error   g:vimsyn_novimsynfoldlevelerror = 1 " :syn foldlevel error   g:vimsyn_novimsynspellerror = 1   " :syn spell error   g:vimsyn_novimsyncerror = 1       " :syn sync error   g:vimsyn_novimhictermerror = 1    " :hi error   g:vimsyn_vimhikeyerror = 1        " :hi key=arg errorTo force highlighting ofNeovim specific Vimscript elements (even if notusing Neovim), setlet g:vimsyn_vim_features = ['nvim']WDLwdl.vimwdl-syntaxThe Workflow Description Languageisa way to specify data processing workflowswitha human-readable and writeable syntax.  Thisis useda lot inbioinformatics.  More info on the spec can be found here:https://github.com/openwdl/wdlXF86CONFIGxf86conf.vimft-xf86conf-syntaxThesyntax of XF86Config file differs in XFree86 v3.x and v4.x.  Bothvariants are supported.  Automatic detectionis used, butis far from perfect.You may need to specify the version manually.  Set the variablexf86conf_xfree86_version to 3 or 4 according to your XFree86 version inyour .vimrc.  Example::let xf86conf_xfree86_version=3When usinga mix of versions, set the b:xf86conf_xfree86_version variable.Note that spaces and underscores in option names are not supported.  Use"SyncOnGreen" instead of "__s yn con gr_e_e_n" if you want the option namehighlighted.XMLxml.vimft-xml-syntaxXml namespaces are highlighted by default.  This can be inhibited bysettinga global variable::let g:xml_namespace_transparent=1xml-foldingThe xmlsyntax file providessyntaxfolding (see:syn-fold) betweenstart andend tags.  This can be turned on by:let g:xml_syntax_folding = 1:set foldmethod=syntaxNote:Syntaxfolding might slow downsyntax highlighting significantly,especially for large files.X Pixmaps (XPM)xpm.vimft-xpm-syntaxxpm.vim creates itssyntax items dynamically based upon the contents of theXPM file.  Thus if you make changes e.g. in the color specification strings,you have to sourceit again e.g. with ":set syn=xpm".To copya pixel with one of the colors,yanka "pixel" with "yl" andinsertitsomewhere else with "P".Do you want to draw with the mouse?  Try the following:   :function! GetPixel()   :   let c = getline(".")[col(".") - 1]   :   echo c   :   exe "noremap <LeftMouse> <LeftMouse>r" .. c   :   exe "noremap <LeftDrag><LeftMouse>r" .. c   :endfunction   :noremap <RightMouse> <LeftMouse>:call GetPixel()<CR>   :set guicursor=n:hor20   " to see the color beneath the cursorThis turns the right button intoa pipette and the left button intoa pen.It will work with XPM files that have one character per pixel only and youmust not click outside of the pixel strings, but feel free to improve it.It will look much better witha font ina quadratic cell size, e.g. for X::set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-*YAMLyaml.vimft-yaml-syntaxg:yaml_schemab:yaml_schemaA YAML schemaisa combination ofa set oftags anda mechanism for resolvingnon-specific tags. For user this means that YAML parser may, depending onplain scalar contents, treat plain scalar (which can actually be onlystringand nothing else)asa value of the other type: null, boolean, floating-point,integer.g:yaml_schema option determines according to which schema valueswill be highlighted specially. Supported schemas areSchemaDescriptionfailsafeNo additional highlighting.jsonSupports JSON-style numbers, booleans and null.coreSupports more number,boolean andnull styles.pyyamlIn addition to core schema supports highlighting timestamps,but there are some differences in whatis recognizedasnumbers and many additionalboolean values not present in coreschema.Default schemaiscore.Note that schemas are not actually limited to plain scalars, but thisis theonly difference between schemas defined in YAML specification and the onlydifference defined in thesyntax file.ZSHzsh.vimft-zsh-syntaxThesyntaxscript for zsh allows for syntax-based folding::let g:zsh_fold_enable = 1==============================================================================6. Definingasyntax:syn-defineE410Vim understands three types ofsyntax items:1. Keyword   It can only contain keyword characters, according to the characters   specified with:syn-iskeyword or the'iskeyword' option.  It cannot   contain othersyntax items.  It will only match witha completeword (there   are no keyword characters before or after the match).  The keyword "if"   would match in "if(a=b)", but not in "ifdefx", because "("is nota   keyword character and "d" is.2. Match   Thisisa match witha singleregexp pattern.3. Region   This startsata match of the "start"regexppattern and ends witha match   with the "end"regexp pattern.  Any other text can appear in between.A   "skip"regexppattern can be used to avoid matching the "end" pattern.Severalsyntax ITEMs can beput into onesyntax GROUP.Forasyntax groupyou can give highlighting attributes.  For example, you could have an itemto definea "/* .. */" comment and another one that definesa "// .." comment,andput them both in the "Comment" group.  You can then specify thata"Comment" will be inbold font and havea blue color.  You are free to makeone highlight group for onesyntax item, orput all items into one group.This depends on how you want to specify your highlighting attributes.  Puttingeach item in its own group results in having to specify the highlightingfora lot of groups.Note thatasyntax group anda highlight group are similar.  Fora highlightgroup you will have given highlight attributes.  These attributes will be usedfor thesyntax group with the same name.Incase more than one item matchesat the same position, the one that wasdefined LAST wins.  Thus you can override previously definedsyntax items byusing an item that matches the same text.  Buta keyword always goes beforeamatch or region.  Anda keyword with matchingcase always goes beforeakeyword with ignoring case.PRIORITY:syn-priorityWhen severalsyntax items may match, these rules are used:1. When multiple Match or Region items start in the same position, the item   defined last has priority.2.A Keyword has priority over Match and Region items.3. An item that starts in an earlier position has priority over items that   start in later positions.DEFINING CASE:syn-caseE390:sy[ntax]case [match | ignore]This defines if the following ":syntax" commands will work withmatching case, when using "match", or with ignoring case, when using"ignore".Note that any items before this are not affected, and allitems until the next ":syntaxcase" command are affected.:sy[ntax]caseShow either "syntaxcase match" or "syntaxcase ignore".DEFINING FOLDLEVEL:syn-foldlevel:sy[ntax] foldlevel start:sy[ntax] foldlevel minimumThis defines how the foldlevel ofa lineis computed when usingfoldmethod=syntax (seefold-syntax and:syn-fold):start:Use level of item containing start of line.minimum:Use lowest local-minimum level of items on line.The defaultis "start".  Use "minimum" to searcha line horizontallyfor the lowest level contained on the line thatis followed byahigher level.  This produces more naturalfolds whensyntax itemsmay close and open horizontally withina line.:sy[ntax] foldlevelShow the current foldlevel method, either "syntax foldlevel start" or"syntax foldlevel minimum".{not meaningful when Vim was compiled without |+folding| feature}SPELL CHECKING:syn-spell:sy[ntax]spell toplevel:sy[ntax]spell notoplevel:sy[ntax]spell defaultThis defines wherespell checkingis to be done for text thatis notinasyntax item:toplevel:Textisspell checked.notoplevel:Textis notspell checked.default:When thereisa @Spell cluster nospell checking.For text insyntax items use the @Spell and @NoSpell clustersspell-syntax.  When thereis no @Spell and no @NoSpell cluster thenspell checkingis done for "default" and "toplevel".To activatespell checking the'spell' optionmust be set.:sy[ntax]spellShow the currentsyntaxspell checking method, either "syntaxspelltoplevel", "syntaxspell notoplevel" or "syntaxspell default".SYNTAX ISKEYWORD SETTING:syn-iskeyword:sy[ntax] iskeyword [clear |{option}]This defines the keyword characters.  It's like the'iskeyword' optionfor but only applies tosyntax highlighting.clear:Syntax specific iskeyword settingis disabled and thebuffer-local'iskeyword' settingis used.{option}Set thesyntax'iskeyword' option toa new value.Example:  :syntax iskeyword @,48-57,192-255,$,_This would set thesyntax specific iskeyword option to include allalphabetic characters, plus the numeric characters, all accentedcharacters and also includes the "_" and the "$".If no argumentis given, the current value will be output.Setting this option influences what/\k matches insyntax patternsand also determines where:syn-keyword will be checked fora newmatch.Itis recommended whenwritingsyntax files, to use this command toset the correct value for the specificsyntax language and not changethe'iskeyword' option.DEFINING KEYWORDS:syn-keyword:sy[ntax] keyword{group-name} [{options}]{keyword} .. [{options}]This definesa number of keywords.{group-name}Isasyntax group name suchas "Comment".[{options}]See:syn-arguments below.{keyword} ..Isalist of keywords which are part of this group.Example:  :syntax keyword   Type   int long charThe{options} can be given anywhere in the line.  They will apply toall keywords given, also foroptions that come aftera keyword.These examplesdo exactly the same:  :syntax keyword   Type   contained int long char  :syntax keyword   Type   int long contained char  :syntax keyword   Type   int long char containedE789E890When you havea keyword with an optional tail, likeEx commands inVim, you canput the optional characters inside [], to define all thevariationsat once:  :syntax keyword   vimCommand ab[breviate] n[ext]Don't forget thata keyword can only be recognized if all thecharacters are included in the'iskeyword' option.  If one characterisn't, the keyword will never be recognized.Multi-byte characters can also be used.  Thesedo not have to be in'iskeyword'.See:syn-iskeyword for definingsyntax specific iskeyword settings.A keyword always has higher priority thana match or region, thekeywordis used if more than one item matches.Keywordsdo not nestanda keyword can't contain anything else.Note that when you havea keyword thatis the sameas an option (evenone that isn't allowed here), you can not use it.  Usea matchinstead.The maximum length ofa keywordis 80 characters.The same keyword can be defined multiple times, when its containmentdiffers.  For example, you can define the keyword once not containedand use one highlight group, and once contained, and usea differenthighlight group.  Example:  :syn keyword vimCommand tag  :syn keyword vimSetting contained tagWhen finding "tag" outside of anysyntax item, the "vimCommand"highlight groupis used.  When finding "tag" inasyntax item thatcontains "vimSetting", the "vimSetting" groupis used.DEFINING MATCHES:syn-match:sy[ntax] match{group-name} [{options}][excludenl][keepend]{pattern}[{options}]This defines one match.{group-name}Asyntax group name suchas "Comment".[{options}]See:syn-arguments below.[excludenl]Don't makeapattern with the end-of-line "$"extenda containing match or region.  Must begiven before the pattern.:syn-excludenlkeependDon't allow contained matches togo pastamatch with theend pattern.  See:syn-keepend.{pattern}The searchpattern that defines the match.See:syn-pattern below.Note that thepattern may match more than oneline, which makes the match depend on whereVim starts searching for the pattern.  Youneed to make sure syncing takes care of this.Example (matcha character constant):  :syntax match Character /'.'/hs=s+1,he=e-1DEFINING REGIONS:syn-region:syn-start:syn-skip:syn-endE398E399:sy[ntax] region{group-name} [{options}][matchgroup={group-name}][keepend][extend][excludenl]start={start-pattern} ..[skip={skip-pattern}]end={end-pattern} ..[{options}]This defines one region.  It may span several lines.{group-name}Asyntax group name suchas "Comment".[{options}]See:syn-arguments below.[matchgroup={group-name}]  Thesyntax group to use for the followingstart orendpattern matches only.  Not usedfor the text in between the matched start andend patterns.  Use NONE to reset to not usinga different group for the start orend match.See:syn-matchgroup.keependDon't allow contained matches togo pastamatch with theend pattern.  See:syn-keepend.extendOverridea "keepend" for an item this regionis contained in.  See:syn-extend.excludenlDon't makeapattern with the end-of-line "$"extenda containing match or item.  Onlyuseful forend patterns.  Must be given beforethe patternsit applies to.:syn-excludenlstart={start-pattern}The searchpattern that defines the start ofthe region.  See:syn-pattern below.skip={skip-pattern}The searchpattern that defines text insidethe region where not to look for theendpattern.  See:syn-pattern below.end={end-pattern}The searchpattern that defines theend ofthe region.  See:syn-pattern below.Example:  :syntax region String   start=+"+  skip=+\\"+  end=+"+The start/skip/end patterns and theoptions can be given in any order.There can be zero or one skip pattern.Theremust be one or morestart andend patterns.  This means that you can omit the skippattern, but youmust giveat least one start and oneend pattern.  Itis allowed to have whitespace before and after the equal sign(althoughit mostly looks better without white space).When more than one startpatternis given,a match with one of theseis sufficient.This means thereis an OR relation between the startpatterns.  The last one that matchesis used.  The sameistrue fortheend patterns.The search for theendpattern starts right after the start pattern.Offsets are not used for this.This implies that the match for theendpattern will never overlap with the start pattern.The skip andendpattern can match across line breaks, but since thesearch for thepattern can start in any lineit often does notdo whatyou want.  The skippattern doesn't avoida match of anendpattern inthe next line.Use single-line patterns to avoid trouble.Note: The decision to starta regionis only based ona matching startpattern.  Thereis no check fora matchingend pattern.  This does NOTwork::syn region First  start="("  end=":":syn region Second start="("  end=";"The Second always matches before the First (last definedpattern hashigher priority).  The Second region then continues until the next';', no matter if thereisa ':' before it.  Usinga match does work::syn match First  "(\_.\{-}:":syn match Second "(\_.\{-};"Thispattern matches any character or line break with "\_." andrepeats that with "\{-}" (repeatas fewas possible).:syn-keependBy default,a contained match can obscurea match for theend pattern.Thisis useful for nesting.  For example,a region that starts with"{" and ends with "}", can contain another region.  An encountered "}"will thenend the contained region, but not the outer region:{starts outer "{}" region{starts contained "{}" region}ends contained "{}" region}ends outer "{} regionIf you don't want this, the "keepend" argument will make the matchingof anendpattern of the outer region alsoend any contained item.This makesit impossible to nest the same region, but allows forcontained items to highlight parts of theend pattern, without causingthat to skip the match with theend pattern.  Example:  :syn match  vimComment +"[^"]\+$+  :syn region vimCommand start="set" end="$" contains=vimComment keependThe "keepend" makes the vimCommand alwaysendat theend of the line,even though the contained vimComment includesa match with the<EOL>.When "keepend"is not used,a match with anendpatternis retriedafter each contained match.  When "keepend"is included, the firstencountered match with anendpatternis used, truncating anycontained matches.:syn-extendThe "keepend" behavior can be changed by using the "extend" argument.When an item with "extend"is contained in an item that uses"keepend", the "keepend"is ignored and the containing region will beextended.This can be used to have some contained items extenda region whileothers don't.  Example:   :syn region htmlRef start=+<a>+ end=+</a>+ keepend contains=htmlItem,htmlScript   :syn match htmlItem +<[^>]*>+ contained   :syn region htmlScript start=+<script+ end=+</script[^>]*>+ contained extendHere the htmlItem item does not make the htmlRef item continuefurther,itis only used to highlight the<> items.  The htmlScriptitem does extend the htmlRef item.Another example:   :syn region xmlFold start="<a>" end="</a>" fold transparent keepend extendThis definesa region with "keepend", so that itsend cannot bechanged by contained items, like when the "</a>"is matched tohighlightit differently.  But when the xmlFold regionis nested (itincludes itself), the "extend" applies, so that the "</a>" ofa nestedregion only ends that region, and not the oneitis contained in.:syn-excludenlWhenapattern fora match orendpattern ofa region includesa '$'to match the end-of-line,it will makea region item thatitiscontained in continue on the next line.  For example,a match with"\\$" (backslashat theend of the line) can makea region continuethat would normally stopat theend of the line.  Thisis the defaultbehavior.  If thisis not wanted, there are two ways to avoid it:1. Use "keepend" for the containing item.  This will keep all   contained matches from extending the match or region.  It can be   used when all contained itemsmust not extend the containing item.2. Use "excludenl" in the contained item.  This will keep that match   from extending the containing match or region.  It can be used if   only some contained itemsmust not extend the containing item.   "excludenl"must be given before thepatternit applies to.:syn-matchgroup"matchgroup" can be used to highlight the start and/orendpatterndifferently than the body of the region.  Example:  :syntax region String matchgroup=Quote start=+"+  skip=+\\"+end=+"+This will highlight thequotes with the "Quote" group, and the text inbetween with the "String" group.The "matchgroup"is used for all start andend patterns that follow,until the next "matchgroup".  Use "matchgroup=NONE" togo back to notusinga matchgroup.Ina start orendpattern thatis highlighted with "matchgroup" thecontained items of the region are not used.  This can be used to avoidthata contained item matches in the start orendpattern match.  Whenusing "transparent", this does not apply toa start orendpatternmatch thatis highlighted with "matchgroup".Hereis an example, which highlights three levels of parentheses indifferent colors:   :sy region par1 matchgroup=par1 start=/(/ end=/)/ contains=par2   :sy region par2 matchgroup=par2 start=/(/ end=/)/ contains=par3 contained   :sy region par3 matchgroup=par3 start=/(/ end=/)/ contains=par1 contained   :hi par1 ctermfg=red guifg=red   :hi par2 ctermfg=blue guifg=blue   :hi par3 ctermfg=darkgreen guifg=darkgreenE849The maximum number ofsyntax groupsis 19999.==============================================================================7.:syntax arguments:syn-argumentsThe:syntax commands that definesyntax items takea number of arguments.The common ones are explained here.  The arguments may be given in any orderand may be mixed with patterns.Not all commands accept all arguments.This table shows which argumentscan not be used for all commands:E395    contains  onelinefold  display  extend concealends:syntax keyword------:syntax matchyes-yesyesyes-:syntax regionyesyesyesyesyes    yesThese arguments can be used for all three commands:concealccharcontainedcontainedinnextgrouptransparentskipwhiteskipnlskipemptyconcealconceal:syn-concealWhen the "conceal" argumentis given, the itemis markedas concealable.Whether or notitis actually concealed depends on the value of the'conceallevel' option.  The'concealcursor' optionis used to decide whetherconcealable items in the current line are displayed unconcealed to be able toedit the line.Another way toconceal textis withmatchadd(), but internally this worksabit differentlysyntax-vs-match.concealends:syn-concealendsWhen the "concealends" argumentis given, the start andend matches ofthe region, but not the contents of the region, are markedas concealable.Whether or not they are actually concealed depends on the setting on the'conceallevel' option. The ends ofa region can only be concealed separatelyin this way when they have their own highlighting via "matchgroup".  Thesynconcealed() function can be used to retrieve information about conealeditems.cchar:syn-ccharE844The "cchar" argument defines the character shown in place of the itemwhenitis concealed (setting "cchar" only makes sense when theconcealargumentis given.) If "cchar"is not set then the defaultconcealcharacter defined in the'listchars' optionis used.  The character cannot beacontrol character suchas Tab.  Example:   :syntax match Entity "&amp;" conceal cchar=&Seehl-Conceal for highlighting.contained:syn-containedWhen the "contained" argumentis given, this item will not be recognizedatthe top level, but only whenitis mentioned in the "contains" field ofanother match.Example:   :syntax keyword Todo    TODO    contained   :syntax match   Comment "//.*"  contains=Tododisplay:syn-displayIf the "display" argumentis given, this item will be skipped when thedetected highlighting will not be displayed.  This will speed up highlighting,by skipping this item when only finding thesyntax state for the text thatisto be displayed.Generally, you can use "display" for match and region items that meet theseconditions:- The item does not continue past theend ofa line.  Example for C:A region  fora "/*" comment can't contain "display", becauseit continues on the next  line.- The item does not contain items that continue past theend of the line or  makeit continue on the next line.- The item does not change the size of any itemitis contained in.  Example  for C:A match with "\\$" ina preprocessor match can't have "display",  becauseit may make that preprocessor match shorter.- The item does not allow other items to match that didn't match otherwise,  and that item may extend the match too far.  Example for C:A match fora  "//" comment can't use "display", becausea "/*" inside that comment would  match then and starta comment whichextends past theend of the line.Examples, for theC language, where "display" can be used:- match witha number- match witha labeltransparent:syn-transparentIf the "transparent" argumentis given, this item will not be highlighteditself, but will take the highlighting of the itemitis contained in.Thisis useful forsyntax items that don't need any highlighting but are usedonly to skip overa part of the text.The "contains=" argumentis also inherited from the itemitis contained in,unlessa "contains" argumentis given for the transparent item itself.Toavoid that unwanted items are contained, use "contains=NONE".  Example, whichhighlights words in strings, but makes an exception for "vim"::syn match myString /'[^']*'/ contains=myWord,myVim:syn match myWord   /\<[a-z]*\>/ contained:syn match myVim    /\<vim\>/ transparent contained contains=NONE:hi link myString String:hi link myWord   CommentSince the "myVim" match comes after "myWord"itis the preferred match (lastmatch in the same position overrules an earlier one).  The "transparent"argument makes the "myVim" match use the same highlightingas "myString".  Butit does not contain anything.  If the "contains=NONE" argument would be leftout, then "myVim" would use the contains argument from myString and allow"myWord" to be contained, which will be highlightedasa Comment.  Thishappens becausea contained match doesn't match inside itself in the sameposition, thus the "myVim" match doesn't overrule the "myWord" match here.When you lookat the colored text,itis like lookingat layers of containeditems.The contained itemis on top of the itemitis contained in, thus yousee the contained item.  Whena contained itemis transparent, you can lookthrough, thus you see the itemitis contained in.  Ina picture:look from here    ||   ||   ||VVVVVV       xxxx  yyymore contained items    ....................contained item (transparent)=============================first itemThe 'x', 'y' and '=' representa highlightedsyntax item.  The '.' representatransparent group.What you see is:=======xxxx=======yyy========Thus you look through the transparent "....".oneline:syn-onelineThe "oneline" argument indicates that the region does not crossa lineboundary.  Itmust match completely in the current line.  However, when theregion hasa contained item that does crossa line boundary,it continues onthe next line anyway.A contained item can be used to recognizea linecontinuation pattern.  But the "end"patternmust still match in the firstline, otherwise the region doesn't even start.When the startpattern includesa "\n" to match an end-of-line, theendpatternmust be found in the same lineas where the startpattern ends.  Theendpattern may also include an end-of-line.  Thus the "oneline" argumentmeans that theend of the startpattern and the start of theendpatternmustbe within one line.  This can't be changed bya skippattern that matchesaline break.fold:syn-foldThe "fold" argument makes the fold level increase by one for this item.Example:   :syn region myFold start="{" end="}" transparent fold   :syn sync fromstart   :set foldmethod=syntaxThis will make each{} block form one fold.The fold will start on the line where the item starts, andend where the itemends.  If the start andend are within the same line, thereis no fold.The'foldnestmax' optionlimits the nesting ofsyntax folds.See:syn-foldlevel tocontrol how the foldlevel ofa lineis computedfrom itssyntax items.{not available when Vim was compiled without |+folding| feature}:syn-containsE405E406E407E408E409contains={group-name},..The "contains" argumentis followed byalist ofsyntax group names.  Thesegroups will be allowed to begin inside the item (they may extend past thecontaining group's end).  This allows for recursive nesting of matches andregions.  If thereis no "contains" argument, no groups will be contained inthis item.  The group namesdo not need to be defined before they can be usedhere.contains=ALLIf the only item in the containslistis "ALL", then allgroups will be accepted inside the item.contains=ALLBUT,{group-name},..If the first item in the containslistis "ALLBUT", then allgroups will be accepted inside the item, except the ones thatare listed.  Example:  :syntax region Block start="{" end="}" ... contains=ALLBUT,Functioncontains=TOPIf the first item in the containslistis "TOP", then allgroups will be accepted that don't have the "contained"argument.contains=TOP,{group-name},..Like "TOP", but excluding the groups that are listed.contains=CONTAINEDIf the first item in the containslistis "CONTAINED", thenall groups will be accepted that have the "contained"argument.contains=CONTAINED,{group-name},..Like "CONTAINED", but excluding the groups that arelisted.The{group-name} in the "contains"list can bea pattern.  All group namesthat match thepattern will be included (or excluded, if "ALLBUT"is used).Thepattern cannot contain whitespace ora ','.  Example:   ... contains=Comment.*,Keyw[0-3]The matching will be doneat moment thesyntax commandis executed.  Groupsthat are defined later will not be matched.  Also, if the currentsyntaxcommand definesa new group,itis not matched.  Be careful: When puttingsyntax commands ina file you can't rely on groups NOT being defined, becausethe file may have been sourced before, and ":syn clear" doesn't remove thegroup names.The contained groups will also match in the start andend patterns ofaregion.  If thisis not wanted, the "matchgroup" argument can be used:syn-matchgroup.  The "ms=" and "me=" offsets can be used to change theregion where contained itemsdo match.Note that this may also limit thearea thatis highlightedcontainedin={group-name}...:syn-containedinThe "containedin" argumentis followed byalist ofsyntax group names.  Theitem will be allowed to begin inside these groups.  This worksas if thecontaining item hasa "contains=" argument that includes this item.The{group-name}... can be used just like for "contains",as explained above.Thisis useful when addingasyntax item afterwards.  An item can be told tobe included inside an already existing item, withoutchanging the definitionof that item.  For example, to highlightaword inaC comment after loadingtheC syntax::syn keyword myword HELP containedin=cComment containedNote that "contained"is also used, to avoid that the item matchesat the toplevel.Matches for "containedin" are added to the other places where the item canappear.A "contains" argument may also be addedas usual.  Don't forget thatkeywords never contain another item, thus adding them to "containedin" won'twork.nextgroup={group-name},..:syn-nextgroupThe "nextgroup" argumentis followed byalist ofsyntax group names,separated by commas (just like with "contains", so you can also use patterns).If the "nextgroup" argumentis given, the mentionedsyntax groups will betried fora match, after the match or region ends.  If none of the groups havea match, highlighting continues normally.  If thereisa match, this groupwill be used, even whenitis not mentioned in the "contains" field of thecurrent group.Thisis like giving the mentioned group priority over allother groups.  Example:   :syntax match  ccFoobar  "Foo.\{-}Bar"  contains=ccFoo   :syntax match  ccFoo     "Foo"    contained nextgroup=ccFiller   :syntax region ccFiller  start="."  matchgroup=ccBar  end="Bar"  containedThis will highlight "Foo" and "Bar" differently, and only when thereisa"Bar" after "Foo".  In the text line below, "f" shows where ccFoois used forhighlighting, and "bbb" where ccBaris used.   Foo asdfasd Bar asdf Foo asdf Bar asdf   fff       bbbfff bbbNote the use of ".\{-}" to skipas littleas possible until the next Bar.when ".*" would be used, the "asdf" in between "Bar" and "Foo" would behighlighted according to the "ccFoobar" group, because the ccFooBar matchwould include the first "Foo" and the last "Bar" in the line (seepattern).skipwhite:syn-skipwhiteskipnl:syn-skipnlskipempty:syn-skipemptyThese arguments are only used in combination with "nextgroup".They can beused to allow the next group to match after skipping some text:skipwhiteskip overspace andtab charactersskipnlskip over theend ofa lineskipemptyskip over empty lines (impliesa "skipnl")When "skipwhite"is present, the whitespaceis only skipped if thereis nonext group that matches the white space.When "skipnl"is present, the match with nextgroup may be found in the nextline.  This only happens when the current item endsat theend of the currentline!  When "skipnl"is not present, the nextgroup will only be found afterthe current item in the same line.When skipping text while looking fora next group, the matches for othergroups are ignored.  Only when no next group matches, other items are triedfora match again.  This means that matchinga next group and skipping whitespace and<EOL>s hasa higher priority than other items.Example:  :syn match ifstart "\<if.*"  nextgroup=ifline skipwhite skipempty  :syn match ifline  "[^ \t].*" nextgroup=ifline skipwhite skipempty contained  :syn match ifline  "endif"containedNote that the "[^ \t].*" match matches all non-white text.  Thusit would alsomatch "endif".Therefore the "endif" matchisput last, so thatit takesprecedence.Note that this example doesn't work for nested "if"s.  You need to add"contains" arguments to make that work (omitted for simplicity of theexample).IMPLICIT CONCEAL:syn-conceal-implicit:sy[ntax]conceal [on|off]This defines if the following ":syntax" commands will define keywords,matches or regions with the "conceal" flag set. After ":synconcealon", all subsequent ":syn keyword", ":syn match" or ":syn region"defined will have the "conceal" flag set implicitly. ":synconcealoff" returns to the normal state where the "conceal" flagmust begiven explicitly.:sy[ntax]concealShow either "syntaxconceal on" or "syntaxconceal off".==============================================================================8.Syntax patterns:syn-patternE401E402In thesyntax commands,apatternmust be surrounded by two identicalcharacters.  Thisis likeit works for the ":s" command.  The most common touseis the doublequote.  But if thepattern containsa double quote, you canuse another character thatis not used in the pattern.Examples:  :syntax region Comment  start="/\*"  end="\*/"  :syntax region String   start=+"+    end=+"+ skip=+\\"+Seepattern for the explanation of whatapattern is.Syntax patterns arealways interpreted like the'magic' optionis set, no matter what the actualvalue of'magic' is.  And the patterns are interpreted like the 'l' flagisnot included in'cpoptions'.  This was done to makesyntax files portable andindependent of'compatible' and'magic' settings.Try to avoid patterns that can match an empty string, suchas "[a-z]*".This slows down the highlightinga lot, becauseit matches everywhere.:syn-pattern-offsetThepattern can be followed bya character offset.  This can be used tochange the highlighted part, and to change the text area included in thematch or region (which only matters when trying to match other items).Bothare relative to the matched pattern.  The character offset fora skippattern can be used to tell where to continue looking for anend pattern.The offset takes the form of "{what}={offset}"The{what} can be one of seven strings:msMatch Startoffset for the start of the matched textmeMatch Endoffset for theend of the matched texthsHighlight Startoffset for where the highlighting startsheHighlight Endoffset for where the highlighting endsrsRegion Startoffset for where the body ofa region startsreRegion Endoffset for where the body ofa region endslcLeading Contextoffset past "leading context" ofpatternThe{offset} can be:sstart of the matchedpatterns+{nr}start of the matchedpattern plus{nr} chars to the rights-{nr}start of the matchedpattern plus{nr} chars to the lefteend of the matchedpatterne+{nr}end of the matchedpattern plus{nr} chars to the righte-{nr}end of the matchedpattern plus{nr} chars to the left{nr}(for "lc" only): start matching{nr} chars right of the startExamples: "ms=s+1", "hs=e-2", "lc=3".Although all offsets are accepted after any pattern, they are not alwaysmeaningful.  This table shows which offsets are actually used:    ms me   hs   hers   re  lcmatch item    yes  yes  yes  yes--  yesregion item start   yes-    yes-yes-  yesregion item skip- yes----  yesregion itemend- yes-    yes-    yes  yesOffsets can be concatenated, witha ',' in between.  Example:  :syn match String  /"[^"]*"/hs=s+1,he=e-1    some "string" text  ^^^^^^highlightedNotes:- Theremust be no whitespace between thepattern and the character  offset(s).- The highlighted area will never be outside of the matched text.-A negative offset for anendpattern may not always work, because theendpattern may be detected when the highlighting should already have stopped.- Before Vim 7.2 the offsets were counted in bytes instead of characters.  This didn't work well formultibyte characters, soit was changed with the  Vim 7.2 release.- The start ofa match cannot be ina line other than where thepattern  matched.  This doesn't work: "a\nb"ms=e.  You can make the highlighting  start in another line, this does work: "a\nb"hs=e.Example (matcha comment but don't highlight the/* and */):  :syntax region Comment start="/\*"hs=e+1 end="\*/"he=s-1/* thisisa comment */  ^^^^^^^^^^^^^^^^^^^  highlightedA more complicated Example:  :syn region Exa matchgroup=Foo start="foo"hs=s+2,rs=e+2 matchgroup=Bar end="bar"me=e-1,he=e-1,re=s-1 abcfoostringbarabc    mmmmmmmmmmm    match      sssrrreee    highlight start/region/end("Foo", "Exa" and "Bar")Leading context:syn-lc:syn-leading:syn-contextNote: Thisis an obsolete feature, only included for backwards compatibilitywith previous Vim versions.  It's now recommended to use the/\@<= constructin the pattern.  You can also often use/\zs.The "lc" offsetspecifies leading context--a part of thepattern thatmustbe present, butis not considered part of the match.  An offset of "lc=n" willcause Vim to step backn columns before attempting thepattern match, allowingcharacters which have already been matched in previous patterns to also beusedas leading context for this match.  This can be used, for instance, tospecify that an "escaping" charactermust not precede the match:  :syn match ZNoBackslash "[^\\]z"ms=s+1  :syn match WNoBackslash "[^\\]w"lc=1  :syn match Underline "_\+"  ___zzzz ___wwww  ^^^  ^^^  matches Underline^^  matches ZNoBackslash     ^^^^ matches WNoBackslashThe "ms" offsetis automatically set to the same valueas the "lc" offset,unless you set "ms" explicitly.Multi-line patterns:syn-multi-lineThe patterns can include "\n" to match an end-of-line.Mostly this worksasexpected, but there area few exceptions.When usinga startpattern with an offset, the start of the matchis notallowed to start ina following line.  The highlighting can start inafollowing line though.  Using the "\zs" item also requires that the start ofthe match doesn't move to another line.The skippattern can include the "\n", but the search for anendpattern willcontinue in the first character of the next line, also when that characterismatched by the skip pattern.  Thisis because redrawing may start in any linehalfwaya region and thereis no check if the skippattern started inaprevious line.For example, if the skippatternis "a\nb" and anendpatternis "b", theendpattern does match in the second line of this: x x a b x xGenerally this means that the skippattern should not match any charactersafter the "\n".External matches:syn-ext-matchThese extra regularexpression items are available in region patterns:/\z(/\z(\)E50E52E879    \z(\)Marks the sub-expressionas "external", meaning thatit can beaccessed from anotherpattern match.  Currently only usable indefiningasyntax region start pattern./\z1/\z2/\z3/\z4/\z5    \z1...  \z9/\z6/\z7/\z8/\z9E66E67Matches the samestring that was matched by the correspondingsub-expression ina previous startpattern match.Sometimes the start andend patterns ofa region need to sharea commonsub-expression.A common exampleis the "here" document inPerl and manyUnixshells.  This effect can be achieved with the "\z" special regularexpressionitems, which marksa sub-expressionas "external", in the sense thatit can bereferenced from outside thepattern in whichitis defined.  The here-documentexample, for instance, can be done like this:  :syn region hereDoc start="<<\z(\I\i*\)" end="^\z1$"As can be seen here, the \z actually does double duty.In the start pattern,it marks the "\(\I\i*\)" sub-expressionas external; in theend pattern,itchanges the \z1 back-reference into an externalreference referring to thefirst external sub-expression in the start pattern.  External references canalso be used in skip patterns:  :syn region foo start="start \z(\I\i*\)" skip="not end \z1" end="end \z1"Note that normal and external sub-expressions are completely orthogonal andindexed separately; for instance, if thepattern "\z(..\)\(..\)"is appliedto thestring "aabb", then \1 will refer to "bb" and \z1 will refer to "aa".Note also that external sub-expressions cannot be accessedas back-referenceswithin the samepattern like normal sub-expressions.  If you want to use onesub-expressionas botha normal and an external sub-expression, you can nestthe two,as in "\(\z(...\)\)".Note that only matches withina single line can be used.  Multi-line matchescannot be referred to.==============================================================================9.Syntax clusters:syn-clusterE400:sy[ntax] cluster{cluster-name} [contains={group-name}..] [add={group-name}..] [remove={group-name}..]This command allows you to clusteralist ofsyntax groups together underasingle name.contains={group-name}..The clusteris set to the specifiedlist of groups.add={group-name}..The specified groups are added to the cluster.remove={group-name}..The specified groups are removed from the cluster.A cluster so defined may be referred to ina contains=.., containedin=..,nextgroup=.., add=..  or remove=..list witha "@" prefix.  You can also usethisnotation to implicitly declarea cluster before specifying its contents.Example:   :syntax match Thing "# [^#]\+ #" contains=@ThingMembers   :syntax cluster ThingMembers contains=ThingMember1,ThingMember2As the previous example suggests, modifications toa cluster are effectivelyretroactive; the membership of the clusteris checkedat the last minute, soto speak:   :syntax keyword A aaa   :syntax keyword B bbb   :syntax cluster AandB contains=A   :syntax match Stuff "( aaa bbb )" contains=@AandB   :syntax cluster AandB add=B  " now both keywords are matched in StuffThis also has implications for nested clusters:   :syntax keyword A aaa   :syntax keyword B bbb   :syntax cluster SmallGroup contains=B   :syntax cluster BigGroup contains=A,@SmallGroup   :syntax match Stuff "( aaa bbb )" contains=@BigGroup   :syntax cluster BigGroup remove=B" no effect, since B isn't in BigGroup   :syntax cluster SmallGroup remove=B" now bbb isn't matched within StuffE848The maximum number of clustersis 9767.==============================================================================10. Includingsyntax files:syn-includeE397Itis often useful for one language'ssyntax file to includeasyntax file fora related language.  Depending on the exact relationship, this can be done intwo different ways:- If top-levelsyntax items in the includedsyntax file are to be  allowedat the top level in the including syntax, you can simply use  the:runtime command:  " In cpp.vim:  :runtime! syntax/c.vim  :unlet b:current_syntax- If top-levelsyntax items in the includedsyntax file are to be  contained withina region in the including syntax, you can use the  ":syntax include" command::sy[ntax] include [@{grouplist-name}]{file-name}  Allsyntax items declared in the included file will have the  "contained" flag added.  In addition, ifa grouplistis specified,  all top-levelsyntax items in the included file will be added to  that list.   " In perl.vim:   :syntax include @Pod <sfile>:p:h/pod.vim   :syntax region perlPOD start="^=head" end="^=cut" contains=@Pod  When{file-name}is an absolute path (starts with "/", "c:", "$VAR"  or "<sfile>") that fileis sourced.  Whenitisa relative path  (e.g., "syntax/pod.vim") the fileis searched for in'runtimepath'.  All matching files are loaded.  Usinga relative pathis  recommended, becauseit allowsa user to replace the included file  with their own version, withoutreplacing the file that does the  ":syn include".E847The maximum number of includesis 999.==============================================================================11. Synchronizing:syn-syncE403E404Vim wants to be able to start redrawing in any position in the document.  Tomake this possibleit needs to know thesyntax stateat the position whereredrawing starts.:sy[ntax] sync [ccomment[group-name] | minlines={N} | ...]There are four ways to synchronize:1. Always parse from the start of the file.:syn-sync-first2. Based on C-style comments.  Vim understands how C-comments work and can   figure out if the current line starts inside or outsidea comment.:syn-sync-second3. Jumping backa certain number of lines and start parsing there.:syn-sync-third4. Searching backwards in the text forapattern to sync on.:syn-sync-fourth:syn-sync-maxlines:syn-sync-minlinesFor the last three methods, the line range where the parsing can startislimited by "minlines" and "maxlines".If the "minlines={N}" argumentis given, the parsing always startsat leastthat many lines backwards.  This can be used if the parsing may takea fewlines before it's correct, or when it's not possible to use syncing.If the "maxlines={N}" argumentis given, the number of lines that are searchedfora comment or syncingpatternis restricted toN lines backwards (afteradding "minlines").  Thisis useful if you have few things to sync on andaslow machine.  Example:   :syntax sync maxlines=500 ccomment:syn-sync-linebreaksWhen usingapattern that matches multiple lines,a change in one line maycauseapattern to no longer match ina previous line.This means has tostart above where the change was made.How many lines can be specified withthe "linebreaks" argument.  For example, whenapattern may include one linebreak use this:   :syntax sync linebreaks=1The resultis that redrawing always startsat least one line before whereachange was made.  The default value for "linebreaks"is zero.  Usually thevalue for "minlines"is bigger than "linebreaks".First syncing method::syn-sync-first   :syntax sync fromstartThe file will be parsed from the start.  This makessyntax highlightingaccurate, but can be slow for long files.  Vim caches previously parsed text,so that it's only slow when parsing the text for the first time.  However,when making changes some part of the text needs to be parsed again (worstcase: to theend of the file).Using "fromstart"is equivalent to using "minlines" witha very large number.Second syncing method::syn-sync-second:syn-sync-ccommentFor the second method, only the "ccomment" argument needs to be given.Example:   :syntax sync ccommentWhen Vim finds that the line where displaying startsis insidea C-stylecomment, the last regionsyntax item with thegroup-name "Comment" will beused.  This requires that thereisa region with thegroup-name "Comment"!An alternate group name can be specified, for example:   :syntax sync ccomment javaCommentThis means that the last item specified with "syn region javaComment" will beused for the detectedC comment region.  This only works properly if thatregion does havea startpattern "\/*" and anendpattern "*\/".The "maxlines" argument can be used to restrict the search toa number oflines.The "minlines" argument can be used toat least starta number oflines back (e.g., for when thereis some construct that only takesa fewlines, butit hard to sync on).Note: Syncing onaC comment doesn't work properly when strings are usedthat crossa line and containa "*/".  Since letting strings crossa lineisa bad programming habit (many compilers givea warning message), and thechance ofa "*/" appearing insidea commentis very small, this restrictionis hardly ever noticed.Third syncing method::syn-sync-thirdFor the third method, only the "minlines={N}" argument needs to be given.Vim will subtract{N} from the line number and start parsing there.  Thismeans{N} extra lines need to be parsed, which makes thismethoda bit slower.Example:   :syntax sync minlines=50"lines"is equivalent to "minlines" (used by older versions).Fourth syncing method::syn-sync-fourthThe ideais to synchronize on theend ofa few specific regions, calledasync pattern.  Only regions can cross lines, so when we find theend of someregion, we might be able to know in whichsyntax item we are.  The searchstarts in the line just above the one where redrawing starts.  From therethe search continues backwards in the file.This works just like the non-syncingsyntax items.  You can use containedmatches, nextgroup, etc.  But there area few differences:- Keywords cannot be used.- Thesyntax items with the "sync" keyword forma completely separated group  ofsyntax items.  You can't mix syncing groups and non-syncing groups.- The matching works backwards in the buffer (line by line), instead of  forwards.-A line continuationpattern can be given.  Itis used to decide which group  of lines need to be searched like they were one line.  This means that the  search fora match with the specified items starts in the first of the  consecutive lines that contain the continuation pattern.- When using "nextgroup" or "contains", this only works within one line (or  group of continued lines).- When usinga region,itmust start andend in the same line (or group of  continued lines).  Otherwise theendis assumed to beat theend of the  line (or group of continued lines).- Whena match witha syncpatternis found, the rest of the line (or group of  continued lines)is searched for another match.  The last matchis used.  Thisis used whena line can contain both the start and theend ofa region  (e.g., ina C-comment like/* this */, the last "*/"is used).There are two ways howa match witha syncpattern can be used:1. Parsing for highlighting starts where redrawing starts (and where the   search for the syncpattern started).  Thesyntax group thatis expected   to be valid theremust be specified.  This works well when the regions   that cross lines cannot contain other regions.2. Parsing for highlighting continues just after the match.  Thesyntax group   thatis expected to be present just after the matchmust be specified.   This can be used when the previousmethod doesn't work well.  It's much   slower, because more text needs to be parsed.Both types of sync patterns can be usedat the same time.Besides the sync patterns, other matches and regions can be specified, toavoid finding unwanted matches.[The reason that the sync patterns are given separately,is that mostly thesearch for the sync point can be much simpler than figuring out thehighlighting.  The reduced number of patterns meansit willgo (much)faster.]syn-sync-grouphereE393E394:syntax sync match{sync-group-name} grouphere{group-name} "pattern" ..Definea match thatis used for syncing.{group-name}is thename ofasyntax group that follows just after the match.  Parsingof the text for highlighting starts just after the match.A regionmust exist for this{group-name}.  The first one defined will be used."NONE" can be used for when thereis nosyntax group after the match.syn-sync-groupthere:syntax sync match{sync-group-name} groupthere{group-name} "pattern" ..Like "grouphere", but{group-name}is the name ofasyntax group thatis to be usedat the start of the line where searching for the syncpoint started.The text between the match and the start of the syncpattern searchingis assumed not to change thesyntax highlighting.For example, inC you could search backwards for "/*" and "*/".  If"/*"is found first, you know that you are insidea comment, so the"groupthere"is "cComment".  If "*/"is found first, you know that youare not ina comment, so the "groupthere"is "NONE".  (in practiceit'sa bit more complicated, because the "/*" and "*/" could appearinsidea string.  That's leftas an exercise to the reader...).:syntax sync match ..:syntax sync region ..Withouta "groupthere" argument.  Definea region or match thatisskipped while searching fora sync point.syn-sync-linecont:syntax sync linecont{pattern}When{pattern} matches ina line,itis considered to continue inthe next line.This means that the search fora sync point willconsider the lines to be concatenated.If the "maxlines={N}" argumentis given too, the number of lines that aresearched fora matchis restricted to N.  Thisis useful if you have veryfew things to sync on anda slow machine.  Example:   :syntax sync maxlines=100You can clear all sync settings with:   :syntax sync clearYou can clear specific sync patterns with:   :syntax sync clear {sync-group-name} ..==============================================================================12. Listingsyntax items:syntax:sy:syn:syn-listThis command lists all thesyntax items:    :sy[ntax] [list]To show thesyntax items for onesyntax group:    :sy[ntax] list {group-name}Tolist thesyntax groups in one cluster:E392    :sy[ntax] list @{cluster-name}See above for other arguments for the ":syntax" command.Note that the ":syntax" command can be abbreviated to ":sy", although ":syn"is mostly used, becauseit looks better.==============================================================================13. Colorschemescolor-schemesIn the nextsection you can find information about individual highlight groupsand how to specify colors for them.  Most likely you want to just selecta setof colors by using the:colorscheme command, for example:    colorscheme pablo:colo:colorschemeE185:colo[rscheme]Output the name of the currently active color scheme.Thisis basically the sameas:echo g:colors_nameIncaseg:colors_name has not been defined:colo willoutput "default".  Its paletteis defined in the file"$VIMRUNTIME/syntax/syncolor.vim" andis based onlegacy versions of peachpuff and desert.  When compiledwithout the+eval featureit will output "unknown".:colo[rscheme]{name}Load color scheme{name}.  This searches'runtimepath'for the file "colors/{name}.vim".  The first one thatis foundis loaded.Use `:colo default` to load the default colorscheme.Also searches all plugins in'packpath', first below"start" and then under "opt".Doesn't work recursively, thus you can't use":colorscheme" ina color scheme script.You have twooptions for customizinga color scheme.  Forchanging theappearance of specific colors, you can redefinea color name before loadingthe scheme.  The desert scheme uses the khaki color for the cursor.  To useadarker variation of the same color:let v:colornames['khaki'] = '#bdb76b'colorscheme desertFor further customization, suchaschanging:highlight-link associations,use another name, e.g.  "~/.vim/colors/mine.vim", and use:runtime to loadthe original color scheme:runtime colors/evening.vimhi Statement ctermfg=Blue guifg=BlueBefore the color scheme will be loaded all default colorlist scripts(`colors/lists/default.vim`) will be executed and then theColorSchemePreautocommand eventis triggered.  After the color scheme has been loaded theColorSchemeautocommand eventis triggered.colorscheme-overrideIfa color schemeis almost right, you can add modifications on top ofit byusing theColorScheme autocommand.  For example, to remove the backgroundcolor (can makeit transparent in some terminals):augroup my_colorschemes  au!  au Colorscheme pablo hi Normal ctermbg=NONEaugroup ENDChangea couple more colors:augroup my_colorschemes  au!  au Colorscheme pablo hi Normal ctermbg=NONE      \ | highlight Special ctermfg=63      \ | highlight Identifier ctermfg=44augroup ENDIf you makea lot of changesit might be better to copy the distributedcolorscheme to yourhome directory and change it::!cp $VIMRUNTIME/colors/pablo.vim ~/.vim/colors:edit ~/.vim/colors/pablo.vimWith Vim 9.0 the collection of color schemes was updated and made work in manydifferent terminals.  One change was to often define theNormal highlightgroup to make sure the colors work well.  Incase you prefer the old version,you can find them here:https://github.com/vim/colorschemes/blob/master/legacy_colors/For info aboutwritinga color scheme file::edit $VIMRUNTIME/colors/README.txt==============================================================================14. Highlight command:highlight:hiE28E411E415There are three types of highlight groups:- The ones used for specific languages.  For these the name starts with the  name of the language.  Many of these don't have any attributes, but are  linked toa group of the second type.- The ones used for allsyntax languages.- The ones used for the'highlight' option.hitest.vimYou can see all the groups currently active with this command:    :so $VIMRUNTIME/syntax/hitest.vimThis will opena newwindow containing all highlight group names, displayedin their own color.:hi[ghlight]List all the current highlight groups that haveattributes set.:hi[ghlight]{group-name}List one highlight group.highlight-clear:hi-clear:hi[ghlight] clearReset all highlighting to the defaults.  Removes allhighlighting for groups added by the user.Uses the current value of'background' to decide whichdefault colors to use.If there wasa default link, restore it.:hi-link:hi[ghlight] clear{group-name}:hi[ghlight]{group-name} NONEDisable the highlighting for one highlight group.  Itis _not_ set back to the default colors.:hi[ghlight][default]{group-name}{key}={arg} ..Adda highlight group, or change the highlighting foran existing group. Ifa given color nameis notrecognized, eachcolors/lists/default.vim found on'runtimepath' will be loaded.Seehighlight-args for the{key}={arg} arguments.See:highlight-default for the optional[default]argument.:hi[ghlight][!][default] link{from-group}{to-group}:hi[ghlight][!][default] link{from-group} NONESee:hi-link.Normallya highlight groupis added once whenstarting up.  This sets thedefault values for the highlighting.  After that, you can use additionalhighlight commands to change the arguments that you want to set to non-defaultvalues.  The value "NONE" can be used to switch the value off orgo back tothe default value.A simple way to change colorsis with the:colorscheme command.  This loadsa file with ":highlight" commands suchas this:   :hi Commentgui=boldNote that all settings that are not included remain the same, only thespecified fieldis used, and settings are merged with previous ones.  So, theresultis like this single command has been used:   :hi Commentterm=bold ctermfg=Cyan guifg=#80a0ff gui=bold:highlight-verboseWhen listinga highlight group and'verbose'is non-zero, the listing willalso tell whereit was last set.  Example::verbose hi CommentComment        xxx term=bold ctermfg=4 guifg=Blue   Last set from /home/mool/vim/vim7/runtime/syntax/syncolor.vimWhen ":hi clear"is used then thescript where this commandis used will bementioned for the default values. See:verbose-cmd for more information.highlight-argsE416E417E423There are three types of terminals for highlighting:terma normalterminal (vt100, xterm)cterma colorterminal (MS-Windows console, color-xterm, these have the "Co"termcap entry)guitheGUIFor each type the highlighting can be given.  This makesit possible to usethe samesyntax file on all terminals, and use the optimal highlighting.1. highlight arguments for normal terminalsboldunderlineundercurlunderdoubleunderdottedunderdashedinverseitalicstandoutnocombinestrikethroughterm={attr-list}attr-listhighlight-termE418attr-listisa comma-separatedlist (without spaces) of thefollowing items (in any order):boldunderlineundercurlnot always availableunderdoublenot always availableunderdottednot always availableunderdashednot always availablestrikethroughnot always availablereverseinversesameas reverseitalicstandoutnocombineoverride attributes instead of combining themNONEno attributes used (used to reset it)Note that "bold" can be used here and by usingabold font.  Theyhave the same effect.underline-codes"undercurl"isa curly underline.  When "undercurl"is not possiblethen "underline"is used.  In general "undercurl" and "strikethrough"are only available in theGUI and some terminals.  The coloris setwithhighlight-guisp orhighlight-ctermul.  You can try thesetermcap entries to makeundercurl work ina terminal:    let &t_Cs = "\e[4:3m"    let &t_Ce = "\e[4:0m""underdouble"isa double underline, "underdotted"isa dottedunderline and "underdashed"isa dashed underline.  These are onlysupported by some terminals.  If yourterminal supports them you mayhave to specify the codes like this:    let &t_Us = "\e[4:2m"    let &t_ds = "\e[4:4m"    let &t_Ds = "\e[4:5m"They are reset witht_Ce, the sameas curlyunderline (undercurl).When t_Us,t_ds ort_Dsis not set thenunderline will be usedasafallback.start={term-list}highlight-startE422stop={term-list}term-listhighlight-stopThese lists ofterminal codes can be used to getnon-standard attributes ona terminal.Theescape sequence specified with the "start" argumentis written before the characters in the highlightedarea.  It can be anything that you want to send to theterminal to highlight this area.  Theescape sequencespecified with the "stop" argumentis written after thehighlighted area.  This shouldundo the "start" argument.Otherwise the screen will look messed up.The{term-list} can have two forms:1.Astring withescape sequences.   Thisis anystring of characters, except thatit can't start with   "t_" and blanks are not allowed.  The<>notationis recognized   here, so you can use things like "<Esc>" and "<Space>".  Example:start=<Esc>[27h;<Esc>[<Space>r;2.Alist ofterminal codes.   Eachterminal code has the form "t_xx", where "xx"is the name of   thetermcap entry.  The codes have to be separated with commas.   Whitespaceis not allowed.Example:start=t_C1,t_BL   Theterminal codesmust exist for this to work.2. highlight arguments for color terminalscterm={attr-list}highlight-ctermSee above for the description of{attr-list}attr-list.The "cterm" argumentis likely to be different from "term", whencolors are used.  For example, ina normalterminal comments couldbe underlined, ina colorterminal they can be made Blue.Note: Some terminals (e.g.,DOS console) can't mix these attributeswith coloring.To be portable, use only one of "cterm=" OR "ctermfg="OR "ctermbg=".ctermfg={color-nr}highlight-ctermfgE421ctermbg={color-nr}highlight-ctermbgctermul={color-nr}highlight-ctermulThese give the foreground (ctermfg), background (ctermbg) andunderline (ctermul) color to use in the terminal.The{color-nr} argumentisa color number.  Its rangeis zero to(not including) the number given by thetermcap entry "Co".The actual color with this number depends on the type ofterminaland its settings.  Sometimes the color also depends on the settings of"cterm".  For example, on some systems "cterm=bold ctermfg=3" givesanother color, on others you just get color 3.For an xterm this depends on your resources, andisa bitunpredictable.See your xterm documentation for the defaults.Thecolors foracolor-xterm can be changed from the.Xdefaults file.Unfortunately this means that it's not possible to get the same colorsfor each user.Seexterm-color for info about color xterms.tmuxWhen usingtmux you may want to use this in thetmux config:    # tmux colors    set -s default-terminal "tmux-256color"    set -as terminal-overrides ",*-256color:Tc"More info at:https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminalhttps://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colourTheMS-Windows standard colors are fixed (ina console window), sothese have been used for the names.  But the meaning of color names inX11 are fixed, so these color settings have been used, to make thehighlighting settings portable (complicated, isn't it?).  Thefollowing names are recognized, with the color number used:cterm-colors    NR-16   NR-8    COLOR NAME00    Black    1    4    DarkBlue    2    2    DarkGreen    3    6    DarkCyan    4    1    DarkRed    5    5    DarkMagenta    6    3    Brown, DarkYellow    7    7    LightGray, LightGrey, Gray, Grey    80*    DarkGray, DarkGrey    9    4*    Blue, LightBlue    10    2*    Green, LightGreen    11    6*    Cyan, LightCyan    12    1*    Red, LightRed    13    5*    Magenta, LightMagenta    14    3*    Yellow, LightYellow    15    7*    WhiteThe number under "NR-16"is used for 16-color terminals ('t_Co'greater than or equal to 16).  The number under "NR-8"is used for8-color terminals ('t_Co'less than 16).  The'*' indicates that thebold attributeis set for ctermfg.  In many 8-color terminals (e.g.,"linux"), this causes the bright colors to appear.  This doesn't workfor background colors!Without the'*' thebold attributeis removed.If you want to set thebold attribute ina different way,puta"cterm=" argument AFTER the "ctermfg=" or "ctermbg=" argument.Or usea number instead ofa color name.Thecase of the color namesis ignored, however Vim will use lowercase color names when reading from thev:colornames dictionary.Note that for 16 color ansi style terminals (including xterms), thenumbers in the NR-8 columnis used.  Here'*' means 'add 8' so thatBlueis 12, DarkGrayis 8 etc.Note that for some color terminals these names may result in the wrongcolors!You can also use "NONE" to remove the color.:hi-normal-ctermWhen setting the "ctermfg" or "ctermbg" colors for theNormal group,these will become the colors used for the non-highlighted text.Example::highlight Normal ctermfg=grey ctermbg=darkblueWhen setting the "ctermbg" color for theNormal group, the'background' option will be adjusted automatically, under thecondition that the coloris recognized and'background' was not setexplicitly.  This causes the highlight groups that depend on'background' to change!  This means you should set the colors forNormal first, before setting other colors.Whena color schemeis being used,changing'background' causesit tobe reloaded, which may reset all colors (including Normal).  Firstdelete the "g:colors_name" variable when you don't want this.When you have set "ctermfg" or "ctermbg" for theNormal group, Vimneeds to reset the color when exiting.Thisis done with the "op"termcap entryt_op.  If this doesn't work correctly, try setting the't_op' option in your .vimrc.E419E420E453When Vim knows the normal foreground, background andunderline colors,"fg", "bg" and "ul" can be usedas color names.  This only works aftersetting the colors for theNormal group and for theMS-Windowsconsole.  Example, for reverse video:    :highlight Visual ctermfg=bg ctermbg=fgNote that the colors are used that are validat the moment thiscommandis given.  If theNormal group colors are changed later, the"fg" and "bg" colors will not be adjusted.ctermfont={font-nr}highlight-ctermfontThis gives the alternative font number to use in the terminal. Theavailable fonts depend on the terminal, and if theterminalis not setup for alternative fonts this simply won'tdo anything. The range of{font-nr}is 0-10 where0 resets the font to the default font, 1-9selects one of the 9 alternate fonts, and 10 selects the Fraktur font.For more information see your terminal's handling of SGR parameters10-20.t_CF3. highlight arguments for theGUIgui={attr-list}highlight-guiThese give the attributes to use in theGUI mode.Seeattr-list fora description.Note that "bold" can be used here and by usingabold font.  Theyhave the same effect.Note that the attributes are ignored for the "Normal" group.font={font-name}highlight-fontfont-nameis the name ofa font,asitis used on the system Vimruns on.  ForX11 thisisa complicated name, for example:   font=-misc-fixed-bold-r-normal--14-130-75-75-c-70-iso8859-1The font-name "NONE" can be used to revert to the default font.When setting the font for the "Normal" group, this becomes the defaultfont (until the'guifont' optionis changed; the last one setisused).The following only works with Motif, not with other GUIs:When setting the font for the "Menu" group, themenus will be changed.When setting the font for the "Tooltip" group, thetooltips will bechanged.All fonts used, except for Menu and Tooltip, should be of the samecharacter sizeas the default font!  Otherwise redrawing problems willoccur.To usea font name with an embeddedspace or other special character,putit in single quotes.  The singlequote cannot be used then.Example:    :hi comment font='Monospace 10'guifg={color-name}highlight-guifgguibg={color-name}highlight-guibgguisp={color-name}highlight-guispThese give the foreground (guifg), background (guibg) and special(guisp) color to use in the GUI.  "guisp"is used forundercurl andstrikethrough.There area few special names:NONEno color (transparent)E1361bguse normal background colorbackgrounduse normal background colorfguse normal foreground colorforegrounduse normal foreground colorTo usea color name with an embeddedspace or other special character,putit in single quotes.  The singlequote cannot be used then.Example:    :hi comment guifg='salmon pink'gui-colorsSuggested color names (these are available on most systems):    RedLightRedDarkRed    GreenLightGreenDarkGreenSeaGreen    BlueLightBlueDarkBlueSlateBlue    CyanLightCyanDarkCyan    MagentaLightMagentaDarkMagenta    YellowLightYellowBrownDarkYellow    GrayLightGrayDarkGray    BlackWhite    OrangePurpleVioletIn theWin32GUI version, additional system colors are available.  Seewin32-colors.You can also specifya color by its Red, Green and Blue values.The formatis "#rrggbb", where"rr"is the Red value"gg"is the Green value"bb"is the Blue valueAll values are hexadecimal, range from "00" to "ff".  Examples:    :highlight Comment guifg=#11f0c3 guibg=#ff00ffIf you are authoringa color scheme and use the same hexadecimal valuerepeatedly, you can definea (lower case) name forit inv:colornames.  For example:    # provide a default value for this color but allow the user to    # override it.    :call extend(v:colornames, {'alt_turquoise': '#11f0c3'}, 'keep')    :highlight Comment guifg=alt_turquoise guibg=magentaIf you are usinga color scheme that relies on named colors and youwould like to adjust the precise appearance of those colors, you cando so by overriding the values inv:colornames prior to loading thescheme:    let v:colornames['alt_turquoise'] = '#22f0d3'    colorscheme altIf you want to developa colorlist that can be relied on by others,itis best to prefix your color names. By convention these color listsare placed in the colors/lists directory. You can see an example in'$VIMRUNTIME/colors/lists/csscolors.vim'. Thislist would be sourcedbya color scheme using:    :runtime colors/lists/csscolors.vim    :highlight Comment guifg=css_turquoisehighlight-groupshighlight-defaultThese are the default highlighting groups.  These groups are used by the'highlight' option default.Note that the highlighting depends on the valueof'background'.  You can see the current settings with the ":highlight"command.When possible the nameis highlighted in the used colors.  If this makesitunreadable useVisual selection.hl-ColorColumnColorColumnUsed for the columns set with'colorcolumn'.hl-ConcealConcealPlaceholder characters substituted for concealedtext (see'conceallevel').hl-Cursorhl-lCursorCursorCharacter under the cursor.lCursorCharacter under the cursor whenlanguage-mappingis used (see'guicursor').hl-CursorIMCursorIMLike Cursor, but used when inIME mode.CursorIMhl-CursorColumnCursorColumnScreen column that the cursoris in when'cursorcolumn'is set.hl-CursorLineCursorLineScreen line that the cursoris in when'cursorline'is set.hl-DirectoryDirectoryDirectory names (and other special names in listings).hl-DiffAddDiffAddDiff mode: Added line.diff.txthl-DiffChangeDiffChangeDiff mode: Changed line.diff.txthl-DiffDeleteDiffDeleteDiff mode: Deleted line.diff.txthl-DiffTextDiffTextDiff mode: Changed text withina changed line.diff.txthl-DiffTextAddDiffTextAddDiff mode: Added text withina changed line.  Linked tohl-DiffText by default.diff.txthl-EndOfBufferEndOfBufferFiller lines (~) after the last line in the buffer.By default, thisis highlighted likehl-NonText.hl-ErrorMsgErrorMsgErrormessages on the command line.hl-VertSplitVertSplitColumn separating vertically split windows.hl-FoldedFoldedLine used for closed folds.hl-FoldColumnFoldColumn'foldcolumn'hl-SignColumnSignColumnColumn wheresigns are displayed.hl-IncSearchIncSearch'incsearch' highlighting; also used for the text replaced with":s///c".hl-LineNrLineNrLine number for ":number" and ":#" commands, and when'number'or'relativenumber' optionis set.hl-LineNrAboveLineNrAboveLine number for when the'relativenumber'optionis set, above the cursor line.hl-LineNrBelowLineNrBelowLine number for when the'relativenumber'optionis set, below the cursor line.hl-CursorLineNrCursorLineNrLike LineNr when'cursorline'is set and'cursorlineopt'contains "number" oris "both", for the cursor line.hl-CursorLineFoldCursorLineFoldLike FoldColumn when'cursorline'is set for the cursor line.hl-CursorLineSignCursorLineSignLike SignColumn when'cursorline'is set for the cursor line.hl-MatchParenMatchParenCharacter under the cursor or just before it, ifitisa paired bracket, and its match.pi_paren.txthl-MessageWindowMessageWindowMessagespopupwindow used by:echowindow.  Linked tohl-WarningMsg by default.hl-ModeMsgModeMsg'showmode' message (e.g., "-- INSERT--").hl-MsgAreaMsgAreaCommand-line area, also used for outputting messages, see also'cmdheight'hl-MoreMsgMoreMsgmore-prompthl-NonTextNonText'@'at theend of the window, "<<<"at the start of thewindowfor'smoothscroll', characters from'showbreak' and othercharacters thatdo not really exist in the text, suchas the">" displayed whena double-wide character doesn't fitat theend of the line.hl-NormalNormalNormal text.hl-PmenuPmenuPopup menu:Normal item.hl-PmenuSelPmenuSelPopup menu: Selected item.hl-PmenuKindPmenuKindPopup menu:Normal item "kind".hl-PmenuKindSelPmenuKindSelPopup menu: Selected item "kind".hl-PmenuExtraPmenuExtraPopup menu:Normal item "extra text".hl-PmenuExtraSelPmenuExtraSelPopup menu: Selected item "extra text".hl-PmenuSbarPmenuSbarPopup menu: Scrollbar.hl-PmenuThumbPmenuThumbPopup menu: Thumb of the scrollbar.hl-PmenuMatchPmenuMatchPopup menu: Matched text in normal item. Applied incombination withhl-Pmenu.hl-PmenuMatchSelPmenuMatchSelPopup menu: Matched text in selected item. Applied incombination withhl-PmenuSel.hl-ComplMatchInsComplMatchInsMatched text of the currently inserted completion.hl-PopupSelectedPopupSelectedPopupwindow created withpopup_menu().  Linked tohl-PmenuSel by default.hl-PopupNotificationPopupNotificationPopupwindow created withpopup_notification().  Linked tohl-WarningMsg by default.hl-QuestionQuestionhit-enter prompt and yes/no questions.hl-QuickFixLineQuickFixLineCurrentquickfix item in thequickfix window.hl-SearchSearchLast searchpattern highlighting (see'hlsearch').Also used for similar items that need to stand out.hl-CurSearchCurSearchCurrent match for the last searchpattern (see'hlsearch').Note: Thisis correct aftera search, but may get outdated ifchanges are made or the screenis redrawn.hl-SpecialKeySpecialKeyMeta and special keys listed with ":map", also for text usedto show unprintable characters in the text,'listchars'.Generally: Text thatis displayed differently from whatitreally is.hl-SpellBadSpellBadWord thatis not recognized by the spellchecker.spellThis will be combined with the highlighting used otherwise.hl-SpellCapSpellCapWord that should start witha capital.spellThis will be combined with the highlighting used otherwise.hl-SpellLocalSpellLocalWord thatis recognized by the spellcheckeras one thatisused in another region.spellThis will be combined with the highlighting used otherwise.hl-SpellRareSpellRareWord thatis recognized by the spellcheckeras one thatishardly ever used.spellThis will be combined with the highlighting used otherwise.hl-StatusLineStatusLineStatus line of current window.hl-StatusLineNCStatusLineNCstatus lines of not-currentwindowsNote: If thisis equal to "StatusLine", Vim will use "^^^" inthe status line of the current window.hl-StatusLineTermStatusLineTermStatus line of current window, ifitisaterminal window.hl-StatusLineTermNCStatusLineTermNCStatus lines of not-currentwindows thatisaterminal window.hl-TabLineTabLineTab pages line, not activetab page label.hl-TabLineFillTabLineFillTab pages line, where there are no labels.hl-TabLineSelTabLineSelTab pages line, activetab page label.hl-TabPanelTabPanelTabPanel, not activetab page label.hl-TabPanelFillTabPanelFillTabPanel, where there are no labels.hl-TabPanelSelTabPanelSelTabPanel, activetab page label.hl-TerminalTerminalterminalwindow (seeterminal-size-color).hl-TitleTitleTitles for output from ":set all", ":autocmd" etc.hl-VisualVisualVisual mode selection.hl-VisualNOSVisualNOSVisual mode selection when vimis "Not Owning the Selection".OnlyX11 Gui'sgui-x11 andxterm-clipboard supports this.hl-WarningMsgWarningMsgWarning messages.hl-WildMenuWildMenuCurrent match in'wildmenu' completion.hl-User1hl-User1..9hl-User9The'statusline'syntax allows the use of 9 different highlights in thestatusline and ruler (via'rulerformat').  The names are User1 to User9.For theGUI you can use the following groups to set the colors for the menu,scrollbars and tooltips.  They don't have defaults.  This doesn't work for theWin32 GUI.  Only three highlight arguments have any effect here: font, guibg,and guifg.hl-MenuMenuCurrent font, background and foreground colors of the menus.Also used for the toolbar.Applicable highlight arguments: font, guibg, guifg.NOTE: ForMotif the font argument actuallyspecifiesafontsetat all times, no matter if'guifontset'isempty, andas suchitis tied to the current:language whenset.hl-ScrollbarScrollbarCurrent background and foreground of the main window'sscrollbars.Applicable highlight arguments: guibg, guifg.hl-TooltipTooltipCurrent font, background and foreground of the tooltips.Applicable highlight arguments: font, guibg, guifg.NOTE: ForMotif the font argument actuallyspecifiesafontsetat all times, no matter if'guifontset'isempty, andas suchitis tied to the current:language whenset.==============================================================================15. Linking groups:hi-link:highlight-linkE412E413When you want to use the same highlighting for severalsyntax groups, youcando this more easily by linking the groups into one common highlightgroup, and give the color attributes only for that group.To seta link:    :hi[ghlight][!][default] link{from-group}{to-group}To removea link:    :hi[ghlight][!][default] link{from-group} NONENotes:E414- If the{from-group} and/or{to-group} doesn't exist,itis created.  You  don't get an error message fora non-existing group.- As soonas you usea ":highlight" command fora linked group, the linkis  removed.- If there are already highlight settings for the{from-group}, the linkis  not made, unless the '!'is given.  Fora ":highlight link" command ina  sourced file, you don't get an error message.  This can be used to skip  links for groups that already have settings.:hi-default:highlight-defaultThe[default] argumentis used for setting the default highlighting foragroup.If highlighting has already been specified for the group the commandwill be ignored.  Also when thereis an existing link.Using[default]is especially useful to overrule the highlighting ofaspecificsyntax file.  For example, theCsyntax file contains::highlight default link cComment CommentIf you like Question highlighting forC comments,put this in yourvimrc file::highlight link cComment QuestionWithout the "default" in theCsyntax file, the highlighting would beoverruled when thesyntax fileis loaded.To havea link survive `:highlight clear`, whichis useful if you havehighlighting fora specificfiletype and you want to keepit when selectinganother color scheme,puta command like this in the"after/syntax/{filetype}.vim" file:    highlight! default link cComment Question==============================================================================16. Cleaning up:syn-clearE391If you want to clear thesyntax stuff for the current buffer, you can use thiscommand:  :syntax clearThis command should be used when you want to switch offsyntax highlighting,or when you want to switch to using another syntax.  It's normally not neededinasyntax file itself, becausesyntaxis cleared by theautocommands thatload thesyntax file.The command also deletes the "b:current_syntax" variable, since nosyntaxisloaded after this command.To clean up specificsyntax groups for the current buffer:  :syntax clear {group-name} ..This removes all patterns and keywords for{group-name}.To clean up specificsyntax group lists for the current buffer:  :syntax clear @{grouplist-name} ..This sets{grouplist-name}'s contents to an empty list.:syntax-off:syn-offIf you want to disablesyntax highlighting for all buffers, you need to removetheautocommands that load thesyntax files:  :syntax offWhat this command actually does,is executing the command  :source $VIMRUNTIME/syntax/nosyntax.vimSee the "nosyntax.vim" file for details.Note that for this to work$VIMRUNTIMEmust be valid.  See$VIMRUNTIME.:syntax-reset:syn-resetIf you have changed the colors and messed them up, use this command to get thedefaults back:  :syntax resetItisa bit ofa wrong name, sinceit does not reset anysyntax items,it onlyaffects the highlighting.This doesn't change the colors for the'highlight' option.Note that thesyntax colors that you set in yourvimrc file will also be resetback to their Vim default.Note that if you are usinga color scheme, the colors defined by the colorscheme forsyntax highlighting will be lost.What this actually does is:let g:syntax_cmd = "reset"runtime! syntax/syncolor.vimNote that this uses the'runtimepath' option.syncolorIf you want to use different colors forsyntax highlighting, you can adda Vimscript file to set these colors.  Put this file ina directory in'runtimepath' which comes after $VIMRUNTIME, so that your settings overrulethe default colors.  This way these colors will be used after the ":syntaxreset" command.ForUnix you can use the file ~/.vim/after/syntax/syncolor.vim.  Example:if &background == "light"  highlight comment ctermfg=darkgreen guifg=darkgreenelse  highlight comment ctermfg=green guifg=greenendifE679Do make sure this syncolor.vimscript does not usea "syntax on", set the'background' option or usesa "colorscheme" command, becauseit results in anendless loop.Note that whena color schemeis used, there might be some confusion whetheryour defined colors are to be used or the colors from the scheme.  Thisdepends on the color scheme file.  See:colorscheme.syntax_cmdThe "syntax_cmd" variableis set to one of these values when thesyntax/syncolor.vim files are loaded:   "on"`:syntax on` command.  Highlight colors are overruled butlinks are kept   "enable"`:syntax enable` command.  Only define colors for groups thatdon't have highlighting yet.  Use `:highlight default`.   "reset"`:syntax reset` command or loadinga color scheme.  Define allthe colors.   "skip"Don't define colors.  Used to skip the default settings whenasyncolor.vim file earlier in'runtimepath' has already setthem.==============================================================================17. Highlightingtagstag-highlightIf you want to highlight all thetags in your file, you can use the followingmappings.<F11>-- Generate tags.vim file, and highlight tags.<F12>-- Just highlighttags based on existing tags.vim file.  :map <F11>  :sp tags<CR>:%s/^\([^:]*:\)\=\([^]*\).*/syntax keyword Tag \2/<CR>:wq! tags.vim<CR>/^<CR><F12>  :map <F12>  :so tags.vim<CR>WARNING: The longer thetags file, the slower this will be, and the morememory Vim will consume.Only highlighting typedefs, unions and structs can be done too.  For this youmust use Universal Ctags (foundathttps://ctags.io) or Exuberantctags (foundathttp://ctags.sf.net).Put these lines in your Makefile:# Makea highlight file for types.  Requires Universal/Exuberantctags and awktypes: types.vimtypes.vim: *.[ch]ctags --c-kinds=gstu -o- *.[ch] |\awk 'BEGIN{printf("syntax keyword Type\t")}\{printf("%s ", $$1)}END{print ""}'> $@Andput these lines in your .vimrc:   " load the types.vim highlighting file, if it exists   autocmd BufRead,BufNewFile *.[ch] let fname = expand('<afile>:p:h') .. '/types.vim'   autocmd BufRead,BufNewFile *.[ch] if filereadable(fname)   autocmd BufRead,BufNewFile *.[ch]   exe 'so ' .. fname   autocmd BufRead,BufNewFile *.[ch] endif==============================================================================18. Window-localsyntax:ownsyntaxNormally allwindows ona buffer share the samesyntax settings. Itispossible, however, to seta particularwindow ona file to have its ownprivatesyntax setting.A possible example would be to edit LaTeX sourcewith conventional highlighting in one window, while seeing the same sourcehighlighted differently (soas to hidecontrol sequences and indicate bold,italic etc regions) in another. The'scrollbind' optionis useful here.To set the currentwindow to have thesyntax "foo", separately from all otherwindows on the buffer:   :ownsyntax foow:current_syntaxThis will set the "w:current_syntax" variable to "foo".  The value of"b:current_syntax" does not change.  Thisis implemented by saving andrestoring "b:current_syntax", since thesyntax filesdo set"b:current_syntax".  The value set by thesyntax fileis assigned to"w:current_syntax".Note: This resets the'spell','spellcapcheck','spellfile' and'spelloptions'options.Onceawindow has its own syntax,syntax commands executed from otherwindowson the same buffer (including:syntax clear) have no effect. Conversely,syntax commands executed from thatwindowdo not affect otherwindows on thesame buffer.Awindow with its ownsyntax reverts to normal behavior when another bufferis loaded into thatwindow or the fileis reloaded.When splitting the window, the newwindow will use the original syntax.==============================================================================19. Color xtermsxterm-colorcolor-xtermMost color xterms have only eight colors.  If you don't get colors with thedefault setup,it should work with these lines in your .vimrc:   :if &term =~ "xterm"   :  if has("terminfo")   :set t_Co=8   :set t_Sf=<Esc>[3%p1%dm   :set t_Sb=<Esc>[4%p1%dm   :  else   :set t_Co=8   :set t_Sf=<Esc>[3%dm   :set t_Sb=<Esc>[4%dm   :  endif   :endif[<Esc>isa real escape, typeCTRL-V<Esc>]You might want to change the first "if" to match the name of your terminal,e.g. "dtterm" instead of "xterm".Note: Do these settings BEFORE doing ":syntax on".  Otherwise the colors maybe wrong.xitermrxvtThe above settings have been mentioned to work forxiterm andrxvt too.But for using 16 colors in anrxvt these should work with terminfo::set t_AB=<Esc>[%?%p1%{8}%<%t25;%p1%{40}%+%e5;%p1%{32}%+%;%dm:set t_AF=<Esc>[%?%p1%{8}%<%t22;%p1%{30}%+%e1;%p1%{22}%+%;%dmcolortest.vimTo test your color setup,a file has been included in the Vim distribution.To use it, execute this command:   :runtime syntax/colortest.vimSome versions of xterm (and other terminals, like the Linux console) canoutput lighter foreground colors, even though the number of colorsis definedat 8.  Therefore Vim sets the "cterm=bold" attribute for light foregroundcolors, when't_Co'is 8.xfree-xtermTo get 16 colors or more, get the newest xterm version (which should beincluded with XFree86 3.3 and later).  You can also find the latest versionat:http://invisible-island.net/xterm/xterm.htmlHereisa good way to configure it.  This uses 88 colors and enables thetermcap-query feature, which allows Vim to ask the xterm how many colorsitsupports../configure --disable-bold-color --enable-88-color --enable-tcap-queryIf you only get 8 colors, check the xterm compilation settings.(Also seeUTF8-xterm for using this xterm withUTF-8 character encoding).This xterm should work with these lines in your.vimrc (for 16 colors):   :if has("terminfo")   :  set t_Co=16   :  set t_AB=<Esc>[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm   :  set t_AF=<Esc>[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm   :else   :  set t_Co=16   :  set t_Sf=<Esc>[3%dm   :  set t_Sb=<Esc>[4%dm   :endif[<Esc>isa real escape, typeCTRL-V<Esc>]Without+terminfo, Vim will recognize these settings, and automaticallytranslate cterm colors of 8 and above to "<Esc>[9%dm" and "<Esc>[10%dm".Colors above 16 are also translated automatically.For 256 colors this has been reported to work:   :set t_AB=<Esc>[48;5;%dm   :set t_AF=<Esc>[38;5;%dmOr just set theTERM environment variable to "xterm-color" or "xterm-16color"and try if that works.You probably want to use theseX resources (in your ~/.Xdefaults file):XTerm*color0:#000000XTerm*color1:#c00000XTerm*color2:#008000XTerm*color3:#808000XTerm*color4:#0000c0XTerm*color5:#c000c0XTerm*color6:#008080XTerm*color7:#c0c0c0XTerm*color8:#808080XTerm*color9:#ff6060XTerm*color10:#00ff00XTerm*color11:#ffff00XTerm*color12:#8080ffXTerm*color13:#ff40ffXTerm*color14:#00ffffXTerm*color15:#ffffffXterm*cursorColor:Black[Note: The cursorColoris required to work arounda bug, which changes thecursor color to the color of the last drawn text.  This has been fixed byanewer version of xterm, but not everybodyis usingit yet.]To get these right away,reload the.Xdefaults file to theX Option databaseManager (you only need todo this when you just changed the.Xdefaults file):  xrdb -merge ~/.Xdefaultsxterm-blinkxterm-blinking-cursorTo make the cursor blink in an xterm, see tools/blink.c.  Or use ThomasDickey's xterm above patchlevel 107 (see above for where to get it), withthese resources:XTerm*cursorBlink:onXTerm*cursorOnTime:400XTerm*cursorOffTime:250XTerm*cursorColor:Whitehpterm-colorThese settings work (more or less) for an hpterm, which only supports 8foreground colors:   :if has("terminfo")   :  set t_Co=8   :  set t_Sf=<Esc>[&v%p1%dS   :  set t_Sb=<Esc>[&v7S   :else   :  set t_Co=8   :  set t_Sf=<Esc>[&v%dS   :  set t_Sb=<Esc>[&v7S   :endif[<Esc>isa real escape, typeCTRL-V<Esc>]Etermenlightened-terminalThese settings have been reported to work for the Enlightenedterminalemulator, or Eterm.  They might work for all xterm-like terminals that use thebold attribute to get bright colors.  Add an ":if" like above when needed.       :set t_Co=16       :set t_AF=^[[%?%p1%{8}%<%t3%p1%d%e%p1%{22}%+%d;1%;m       :set t_AB=^[[%?%p1%{8}%<%t4%p1%d%e%p1%{32}%+%d;1%;mTTpro-telnetThese settings should work for TTpro telnet.  Tera Term Proisa freeware/open-source program for MS-Windows.set t_Co=16set t_AB=^[[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{32}%+5;%;%dmset t_AF=^[[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{22}%+1;%;%dmAlso make sure TTpro's Setup/ Window/ Full Coloris enabled, and make surethat Setup/ Font/ Enable Boldis NOT enabled.(info provided by John Love-Jensen <eljay@Adobe.COM>)==============================================================================20. Whensyntaxis slow:syntimeThisis aimedat authors ofasyntax file.If yoursyntax causes redrawing to be slow, here area few hints on makingitfaster.  To see slowness switch on some features that usually interfere, suchas'relativenumber' andfolding.Note: Thisis only available when compiled with the+profile feature.You many need to build Vim with "huge" features.To find out what patterns are consuming most time, get an overview with thissequence::syntime on[ redraw the text at least once with CTRL-L ]:syntime reportThis will displayalist ofsyntax patterns that were used, sorted by the timeit took to match them against the text.:syntime onStart measuringsyntax times.  This will add someoverhead to compute the time spent onsyntaxpatternmatching.:syntime offStop measuringsyntax times.:syntime clearSet all the counters to zero, restart measuring.:syntime reportShow thesyntax items used since ":syntime on" in thecurrent window.  Usea wider display to see more ofthe output.Thelistis sorted by total time. The columns are:TOTALTotal time in seconds spent onmatching this pattern.COUNTNumber of times thepattern was used.MATCHNumber of times thepattern actuallymatchedSLOWESTThe longest time for one try.AVERAGEThe average time for one try.NAMEName of thesyntax item.Note thatthisis not unique.PATTERNThepattern being used.Pattern matching gets slow whenit has to try many alternatives.  Try toincludeas much literal textas possible to reduce the number of waysapattern does NOT match.When using the "\@<=" and "\@<!" items, adda maximum size to avoid tryingatall positions in the current and previous line.  For example, if the itemisliteral text specify the size of that text (in bytes):"<\@<=span"Matches "span" in "<span".  This tries matching with "<" inmany places."<\@1<=span"Matches the same, but only tries one byte before "span". vim:tw=78:sw=4:ts=8:noet:ft=help:norl:

Quick links:help overview ·quick reference ·user manual toc ·reference manual toc·faq


[8]ページ先頭

©2009-2025 Movatter.jp