1- *syntax.txt* For Vim version 9.1. Last change: 2025 Sep 10
1+ *syntax.txt* For Vim version 9.1. Last change: 2025 Sep 16
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2385,6 +2385,22 @@ set "lite_minlines" to the value you desire. Example: >
23852385
23862386 :let lite_minlines = 200
23872387
2388+ LOG *ft-log-syntax*
2389+
2390+ Vim comes with a simplistic generic log syntax highlighter. Because the log
2391+ file format is so generic, highlighting is not enabled by default, since it
2392+ can be distracting. If you want to enable this, simply set the "log" filetype
2393+ manually: >
2394+
2395+ :set ft=log
2396+
2397+ To enable this automatically for "*.log" files, add the following to your
2398+ personal `filetype .vim ` file (usually located in `~/.vim/filetype.vim ` on Unix
2399+ or `$HOME /vimfiles/ filetype .vim ` , see also | new-filetype | ): >
2400+
2401+ augroup filetypedetect
2402+ au! BufNewFile,BufRead *.log setfiletype log
2403+ augroup END
23882404
23892405 LPC *lpc.vim* *ft-lpc-syntax*
23902406
@@ -2504,21 +2520,26 @@ $VIMRUNTIME/syntax/syntax.vim).
25042520 MARKDOWN *ft-markdown-syntax* *g:markdown_minlines*
25052521 *g:markdown_fenced_languages* *g:markdown_syntax_conceal*
25062522
2507- If you have long regions there might be wrong highlighting. At the cost of
2523+ If you have long regions there may be incorrect highlighting. At the cost of
25082524slowing down displaying, you can have the engine look further back to sync on
25092525the start of a region, for example 500 lines (default is 50): >
25102526
25112527 :let g:markdown_minlines = 500
25122528
2513- If you want to enable fenced code block syntax highlighting in your markdown
2514- documents you can enable like this : >
2529+ If you want to enable fenced code block syntax highlighting in your Markdown
2530+ documents, set the following variable : >
25152531
25162532 :let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
25172533
2518- To disable markdown syntax concealing add the following to your vimrc: >
2534+ To disable Markdown syntax concealing, add the following to your vimrc: >
25192535
25202536 :let g:markdown_syntax_conceal = 0
25212537
2538+ For extended Markdown support with enhanced features such as citations,
2539+ footnotes, mathematical formulas, academic writing elements and embedded code
2540+ block highlighting, consider using the pandoc syntax plugin. Set
2541+ `g: filetype_md ` to 'pandoc' and see | ft-pandoc-syntax | for configuration
2542+ details.
25222543
25232544MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
25242545
@@ -4861,6 +4882,13 @@ The "containedin" argument is followed by a list of syntax group names. The
48614882item will be allowed to begin inside these groups. This works as if the
48624883containing item has a "contains=" argument that includes this item.
48634884
4885+ Only the immediate containing item (the one at the top of the syntax stack) is
4886+ considered. Vim does not search other ancestors. If the immediate container
4887+ neither contains this item via | :syn-contains | nor is named in this item's
4888+ "containedin=", the match will not start even if some ancestor would allow it.
4889+ Note that a | :syn-transparent | region still enforces its own | :syn-contains |
4890+ list.
4891+
48644892The {group-name} ... can be used just like for "contains", as explained above.
48654893
48664894This is useful when adding a syntax item afterwards. An item can be told to
@@ -4875,6 +4903,7 @@ Matches for "containedin" are added to the other places where the item can
48754903appear. A "contains" argument may also be added as usual. Don't forget that
48764904keywords never contain another item, thus adding them to "containedin" won't
48774905work.
4906+ See also: | :syn-contains | , | :syn-transparent | .
48784907
48794908
48804909nextgroup={group-name} ,.. *:syn-nextgroup*
0 commit comments