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
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2385,6 +2385,22 @@ set "lite_minlines" to the value you desire. Example: >
2385
2385
2386
2386
:let lite_minlines = 200
2387
2387
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
2388
2404
2389
2405
LPC *lpc.vim* *ft-lpc-syntax*
2390
2406
@@ -2504,21 +2520,26 @@ $VIMRUNTIME/syntax/syntax.vim).
2504
2520
MARKDOWN *ft-markdown-syntax* *g:markdown_minlines*
2505
2521
*g:markdown_fenced_languages* *g:markdown_syntax_conceal*
2506
2522
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
2508
2524
slowing down displaying, you can have the engine look further back to sync on
2509
2525
the start of a region, for example 500 lines (default is 50): >
2510
2526
2511
2527
:let g:markdown_minlines = 500
2512
2528
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 : >
2515
2531
2516
2532
:let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
2517
2533
2518
- To disable markdown syntax concealing add the following to your vimrc: >
2534
+ To disable Markdown syntax concealing, add the following to your vimrc: >
2519
2535
2520
2536
:let g:markdown_syntax_conceal = 0
2521
2537
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.
2522
2543
2523
2544
MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
2524
2545
@@ -4861,6 +4882,13 @@ The "containedin" argument is followed by a list of syntax group names. The
4861
4882
item will be allowed to begin inside these groups. This works as if the
4862
4883
containing item has a "contains=" argument that includes this item.
4863
4884
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
+
4864
4892
The {group-name} ... can be used just like for "contains", as explained above.
4865
4893
4866
4894
This 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
4875
4903
appear. A "contains" argument may also be added as usual. Don't forget that
4876
4904
keywords never contain another item, thus adding them to "containedin" won't
4877
4905
work.
4906
+ See also: | :syn-contains | , | :syn-transparent | .
4878
4907
4879
4908
4880
4909
nextgroup={group-name} ,.. *:syn-nextgroup*
0 commit comments