mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(docs): vimdoc syntax errors
Since https://github.com/neovim/tree-sitter-vimdoc/pull/97 the many cases of *.foo cause parser errors. But even before that, these were erroneously highlighted as (argument), so fixing them is good.
This commit is contained in:
parent
5c73b1bb4c
commit
d931b829e9
@ -16,7 +16,7 @@ For a basic explanation, see section |40.3| in the user manual.
|
||||
You can specify commands to be executed automatically when reading or writing
|
||||
a file, when entering or leaving a buffer or window, and when exiting Vim.
|
||||
For example, you can create an autocommand to set the 'cindent' option for
|
||||
files matching *.c. You can also use autocommands to implement advanced
|
||||
files matching `*.c`. You can also use autocommands to implement advanced
|
||||
features, such as editing compressed files (see |gzip-example|). The usual
|
||||
place to put autocommands is in your vimrc file.
|
||||
|
||||
@ -197,7 +197,7 @@ For READING FILES there are four kinds of events possible:
|
||||
Vim uses only one of these four kinds when reading a file. The "Pre" and
|
||||
"Post" events are both triggered, before and after reading the file.
|
||||
|
||||
Note that the autocommands for the *ReadPre events and all the Filter events
|
||||
Note that the autocommands for the "*ReadPre" events and all the Filter events
|
||||
are not allowed to change the current buffer (you will get an error message if
|
||||
this happens). This is to prevent the file to be read into the wrong buffer.
|
||||
|
||||
@ -1001,7 +1001,7 @@ TextChangedT After a change was made to the text in the
|
||||
*TextYankPost*
|
||||
TextYankPost Just after a |yank| or |deleting| command, but not
|
||||
if the black hole register |quote_| is used nor
|
||||
for |setreg()|. Pattern must be *.
|
||||
for |setreg()|. Pattern must be "*".
|
||||
Sets these |v:event| keys:
|
||||
inclusive
|
||||
operator
|
||||
@ -1417,8 +1417,8 @@ When there is a matching "*Cmd" autocommand, it is assumed it will do the
|
||||
writing. No further writing is done and the other events are not triggered.
|
||||
|Cmd-event|
|
||||
|
||||
Note that the *WritePost commands should undo any changes to the buffer that
|
||||
were caused by the *WritePre commands; otherwise, writing the file will have
|
||||
Note that the "*WritePost" commands should undo any changes to the buffer that
|
||||
were caused by the "*WritePre" commands; otherwise, writing the file will have
|
||||
the side effect of changing the buffer.
|
||||
|
||||
Before executing the autocommands, the buffer from which the lines are to be
|
||||
@ -1426,15 +1426,15 @@ written temporarily becomes the current buffer. Unless the autocommands
|
||||
change the current buffer or delete the previously current buffer, the
|
||||
previously current buffer is made the current buffer again.
|
||||
|
||||
The *WritePre and *AppendPre autocommands must not delete the buffer from
|
||||
The "*WritePre" and "*AppendPre" autocommands must not delete the buffer from
|
||||
which the lines are to be written.
|
||||
|
||||
The '[ and '] marks have a special position:
|
||||
- Before the *ReadPre event the '[ mark is set to the line just above where
|
||||
- Before the "*ReadPre" event the '[ mark is set to the line just above where
|
||||
the new lines will be inserted.
|
||||
- Before the *ReadPost event the '[ mark is set to the first line that was
|
||||
- Before the "*ReadPost" event the '[ mark is set to the first line that was
|
||||
just read, the '] mark to the last line.
|
||||
- Before executing the *WriteCmd, *WritePre and *AppendPre autocommands the '[
|
||||
- Before executing the "*WriteCmd", "*WritePre" and "*AppendPre" autocommands the '[
|
||||
mark is set to the first line that will be written, the '] mark to the last
|
||||
line.
|
||||
Careful: '[ and '] change when using commands that change the buffer.
|
||||
@ -1542,7 +1542,7 @@ To read a skeleton (template) file when opening a new file: >
|
||||
:autocmd BufNewFile *.h 0r ~/vim/skeleton.h
|
||||
:autocmd BufNewFile *.java 0r ~/vim/skeleton.java
|
||||
|
||||
To insert the current date and time in a *.html file when writing it: >
|
||||
To insert the current date and time in a "*.html" file when writing it: >
|
||||
|
||||
:autocmd BufWritePre,FileWritePre *.html ks|call LastMod()|'s
|
||||
:fun LastMod()
|
||||
|
@ -39,7 +39,7 @@ List An ordered sequence of items, see |List| for details.
|
||||
|
||||
Dictionary An associative, unordered array: Each entry has a key and a
|
||||
value. |Dictionary|
|
||||
Examples:
|
||||
Examples: >
|
||||
{"blue": "#0000ff", "red": "#ff0000"}
|
||||
#{blue: "#0000ff", red: "#ff0000"}
|
||||
|
||||
|
@ -54,9 +54,9 @@ you can either set the 'filetype' option manually, or add a modeline to your
|
||||
file. Example, for an IDL file use the command: >
|
||||
:set filetype=idl
|
||||
|
||||
or add this |modeline| to the file:
|
||||
/* vim: set filetype=idl : */ ~
|
||||
|
||||
or add this |modeline| to the file: >
|
||||
/* vim: set filetype=idl : */
|
||||
<
|
||||
*:filetype-plugin-on*
|
||||
You can enable loading the plugin files for specific file types with: >
|
||||
:filetype plugin on
|
||||
@ -136,38 +136,38 @@ what kind of file it is. This doesn't always work. A number of global
|
||||
variables can be used to overrule the filetype used for certain extensions:
|
||||
|
||||
file name variable ~
|
||||
*.asa g:filetype_asa |ft-aspvbs-syntax| |ft-aspperl-syntax|
|
||||
*.asm g:asmsyntax |ft-asm-syntax|
|
||||
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
|
||||
*.bas g:filetype_bas |ft-basic-syntax|
|
||||
*.cfg g:filetype_cfg
|
||||
*.cls g:filetype_cls
|
||||
*.csh g:filetype_csh |ft-csh-syntax|
|
||||
*.dat g:filetype_dat
|
||||
*.frm g:filetype_frm |ft-form-syntax|
|
||||
*.fs g:filetype_fs |ft-forth-syntax|
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
*.inc g:filetype_inc
|
||||
*.lsl g:filetype_lsl
|
||||
*.m g:filetype_m |ft-mathematica-syntax|
|
||||
*.mod g:filetype_mod
|
||||
*.p g:filetype_p |ft-pascal-syntax|
|
||||
*.pl g:filetype_pl
|
||||
*.pp g:filetype_pp |ft-pascal-syntax|
|
||||
*.prg g:filetype_prg
|
||||
*.r g:filetype_r
|
||||
*.sig g:filetype_sig
|
||||
*.sql g:filetype_sql |ft-sql-syntax|
|
||||
*.src g:filetype_src
|
||||
*.sys g:filetype_sys
|
||||
*.sh g:bash_is_sh |ft-sh-syntax|
|
||||
*.tex g:tex_flavor |ft-tex-plugin|
|
||||
*.typ g:filetype_typ
|
||||
*.w g:filetype_w |ft-cweb-syntax|
|
||||
`*.asa` g:filetype_asa |ft-aspvbs-syntax| |ft-aspperl-syntax|
|
||||
`*.asm` g:asmsyntax |ft-asm-syntax|
|
||||
`*.asp` g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
|
||||
`*.bas` g:filetype_bas |ft-basic-syntax|
|
||||
`*.cfg` g:filetype_cfg
|
||||
`*.cls` g:filetype_cls
|
||||
`*.csh` g:filetype_csh |ft-csh-syntax|
|
||||
`*.dat` g:filetype_dat
|
||||
`*.frm` g:filetype_frm |ft-form-syntax|
|
||||
`*.fs` g:filetype_fs |ft-forth-syntax|
|
||||
`*.i` g:filetype_i |ft-progress-syntax|
|
||||
`*.inc` g:filetype_inc
|
||||
`*.lsl` g:filetype_lsl
|
||||
`*.m` g:filetype_m |ft-mathematica-syntax|
|
||||
`*.mod` g:filetype_mod
|
||||
`*.p` g:filetype_p |ft-pascal-syntax|
|
||||
`*.pl` g:filetype_pl
|
||||
`*.pp` g:filetype_pp |ft-pascal-syntax|
|
||||
`*.prg` g:filetype_prg
|
||||
`*.r` g:filetype_r
|
||||
`*.sig` g:filetype_sig
|
||||
`*.sql` g:filetype_sql |ft-sql-syntax|
|
||||
`*.src` g:filetype_src
|
||||
`*.sys` g:filetype_sys
|
||||
`*.sh` g:bash_is_sh |ft-sh-syntax|
|
||||
`*.tex` g:tex_flavor |ft-tex-plugin|
|
||||
`*.typ` g:filetype_typ
|
||||
`*.w` g:filetype_w |ft-cweb-syntax|
|
||||
|
||||
For a few filetypes the global variable is used only when the filetype could
|
||||
not be detected:
|
||||
*.r g:filetype_r |ft-rexx-syntax|
|
||||
`*.r` g:filetype_r |ft-rexx-syntax|
|
||||
|
||||
*filetype-ignore*
|
||||
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
|
||||
@ -881,7 +881,7 @@ file: |ft_sql.txt|.
|
||||
|
||||
TEX *ft-tex-plugin* *g:tex_flavor*
|
||||
|
||||
If the first line of a *.tex file has the form >
|
||||
If the first line of a `*.tex` file has the form >
|
||||
%&<format>
|
||||
then this determined the file type: plaintex (for plain TeX), context (for
|
||||
ConTeXt), or tex (for LaTeX). Otherwise, the file is searched for keywords to
|
||||
|
@ -1449,7 +1449,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'completeslash'* *'csl'*
|
||||
'completeslash' 'csl' string (default: "")
|
||||
local to buffer
|
||||
{only for MS-Windows}
|
||||
only for MS-Windows
|
||||
When this option is set it overrules 'shellslash' for completion:
|
||||
- When this option is set to "slash", a forward slash is used for path
|
||||
completion in insert mode. This is useful when editing HTML tag, or
|
||||
@ -3741,7 +3741,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'linespace'* *'lsp'*
|
||||
'linespace' 'lsp' number (default 0)
|
||||
global
|
||||
{only in the GUI}
|
||||
only in the GUI
|
||||
Number of pixel lines inserted between characters. Useful if the font
|
||||
uses the full character cell height, making lines touch each other.
|
||||
When non-zero there is room for underlining.
|
||||
@ -4187,7 +4187,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'mousehide'* *'mh'* *'nomousehide'* *'nomh'*
|
||||
'mousehide' 'mh' boolean (default on)
|
||||
global
|
||||
{only works in the GUI}
|
||||
only in the GUI
|
||||
When on, the mouse pointer is hidden when characters are typed.
|
||||
The mouse pointer is restored when the mouse is moved.
|
||||
|
||||
@ -4426,7 +4426,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
|
||||
'opendevice' 'odev' boolean (default off)
|
||||
global
|
||||
{only for Windows}
|
||||
only for Windows
|
||||
Enable reading and writing from devices. This may get Vim stuck on a
|
||||
device that can be opened but doesn't actually do the I/O. Therefore
|
||||
it is off by default.
|
||||
@ -5323,7 +5323,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
|
||||
'shellslash' 'ssl' boolean (default off)
|
||||
global
|
||||
{only for MS-Windows}
|
||||
only for MS-Windows
|
||||
When set, a forward slash is used when expanding file names. This is
|
||||
useful when a Unix-like shell is used instead of cmd.exe. Backward
|
||||
slashes can still be typed, but they are changed to forward slashes by
|
||||
@ -7054,7 +7054,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'winaltkeys'* *'wak'*
|
||||
'winaltkeys' 'wak' string (default "menu")
|
||||
global
|
||||
{only used in Win32}
|
||||
only used in Win32
|
||||
Some GUI versions allow the access to menu entries by using the ALT
|
||||
key in combination with a character that appears underlined in the
|
||||
menu. This conflicts with the use of the ALT key for mappings and
|
||||
|
@ -432,8 +432,6 @@ after: \v \m \M \V matches ~
|
||||
\\ \\ \\ \\ literal backslash
|
||||
\{ { { { literal curly brace
|
||||
|
||||
{only Vim supports \m, \M, \v and \V}
|
||||
|
||||
If you want to you can make a pattern immune to the 'magic' option being set
|
||||
or not by putting "\m" or "\M" at the start of the pattern.
|
||||
|
||||
@ -455,7 +453,7 @@ More explanation and examples below, follow the links. *E64* *E871*
|
||||
\{n} \{n} n exactly
|
||||
\{n,} \{n,} at least n as many as possible
|
||||
\{,m} \{,m} 0 to m as many as possible
|
||||
\{} \{} 0 or more as many as possible (same as *)
|
||||
\{} \{} 0 or more as many as possible (same as "*")
|
||||
|
||||
|/\{-| \{-n,m} \{-n,m} n to m as few as possible
|
||||
\{-n} \{-n} n exactly
|
||||
@ -633,7 +631,7 @@ overview.
|
||||
\{n} Matches n of the preceding atom
|
||||
\{n,} Matches at least n of the preceding atom, as many as possible
|
||||
\{,m} Matches 0 to m of the preceding atom, as many as possible
|
||||
\{} Matches 0 or more of the preceding atom, as many as possible (like *)
|
||||
\{} Matches 0 or more of the preceding atom, as many as possible (like "*")
|
||||
*/\{-*
|
||||
\{-n,m} matches n to m of the preceding atom, as few as possible
|
||||
\{-n} matches n of the preceding atom
|
||||
@ -1256,7 +1254,6 @@ letters only.
|
||||
When "\c" appears anywhere in the pattern, the whole pattern is handled like
|
||||
'ignorecase' is on. The actual value of 'ignorecase' and 'smartcase' is
|
||||
ignored. "\C" does the opposite: Force matching case for the whole pattern.
|
||||
{only Vim supports \c and \C}
|
||||
Note that 'ignorecase', "\c" and "\C" are not used for the character classes.
|
||||
|
||||
Examples:
|
||||
@ -1338,11 +1335,10 @@ difference between them is mostly just notation; here's a summary of where
|
||||
they differ:
|
||||
|
||||
Capability in Vimspeak in Perlspeak ~
|
||||
----------------------------------------------------------------
|
||||
force case insensitivity \c (?i)
|
||||
force case sensitivity \C (?-i)
|
||||
backref-less grouping \%(atom\) (?:atom)
|
||||
conservative quantifiers \{-n,m} *?, +?, ??, {}?
|
||||
conservative quantifiers \{-n,m} `*?,` +?, ??, {}?
|
||||
0-width match atom\@= (?=atom)
|
||||
0-width non-match atom\@! (?!atom)
|
||||
0-width preceding match atom\@<= (?<=atom)
|
||||
|
@ -197,19 +197,19 @@ be preferred names for highlight groups that are common for many languages.
|
||||
These are the suggested group names (if syntax highlighting works properly
|
||||
you can see the actual color, except for "Ignore"):
|
||||
|
||||
*Comment any comment
|
||||
Comment any comment
|
||||
|
||||
*Constant any constant
|
||||
Constant any constant
|
||||
String a string constant: "this is a string"
|
||||
Character a character constant: 'c', '\n'
|
||||
Number a number constant: 234, 0xff
|
||||
Boolean a boolean constant: TRUE, false
|
||||
Float a floating point constant: 2.3e10
|
||||
|
||||
*Identifier any variable name
|
||||
Identifier any variable name
|
||||
Function function name (also: methods for classes)
|
||||
|
||||
*Statement any statement
|
||||
Statement any statement
|
||||
Conditional if, then, else, endif, switch, etc.
|
||||
Repeat for, do, while, etc.
|
||||
Label case, default, etc.
|
||||
@ -217,31 +217,31 @@ you can see the actual color, except for "Ignore"):
|
||||
Keyword any other keyword
|
||||
Exception try, catch, throw
|
||||
|
||||
*PreProc generic Preprocessor
|
||||
PreProc generic Preprocessor
|
||||
Include preprocessor #include
|
||||
Define preprocessor #define
|
||||
Macro same as Define
|
||||
PreCondit preprocessor #if, #else, #endif, etc.
|
||||
|
||||
*Type int, long, char, etc.
|
||||
Type int, long, char, etc.
|
||||
StorageClass static, register, volatile, etc.
|
||||
Structure struct, union, enum, etc.
|
||||
Typedef A typedef
|
||||
|
||||
*Special any special symbol
|
||||
Special any special symbol
|
||||
SpecialChar special character in a constant
|
||||
Tag you can use CTRL-] on this
|
||||
Delimiter character that needs attention
|
||||
SpecialComment special things inside a comment
|
||||
Debug debugging statements
|
||||
|
||||
*Underlined text that stands out, HTML links
|
||||
Underlined text that stands out, HTML links
|
||||
|
||||
*Ignore left blank, hidden |hl-Ignore|
|
||||
Ignore left blank, hidden |hl-Ignore|
|
||||
|
||||
*Error any erroneous construct
|
||||
Error any erroneous construct
|
||||
|
||||
*Todo anything that needs extra attention; mostly the
|
||||
Todo anything that needs extra attention; mostly the
|
||||
keywords TODO FIXME and XXX
|
||||
|
||||
The names marked with * are the preferred groups; the others are minor groups.
|
||||
@ -893,7 +893,7 @@ nasm_no_warn potentially risky syntax not as ToDo
|
||||
|
||||
ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax*
|
||||
|
||||
*.asp and *.asa files could be either Perl or Visual Basic script. Since it's
|
||||
`*.asp` and `*.asa` files could be either Perl or Visual Basic script. Since it's
|
||||
hard to detect this you can set two global variables to tell Vim what you are
|
||||
using. For Perl script use: >
|
||||
:let g:filetype_asa = "aspperl"
|
||||
@ -979,7 +979,7 @@ Variable Highlight ~
|
||||
*c_ansi_typedefs* ... but do standard ANSI types
|
||||
*c_ansi_constants* ... but do standard ANSI constants
|
||||
*c_no_utf* don't highlight \u and \U in strings
|
||||
*c_syntax_for_h* for *.h files use C syntax instead of C++ and use objc
|
||||
*c_syntax_for_h* for `*.h` files use C syntax instead of C++ and use objc
|
||||
syntax instead of objcpp
|
||||
*c_no_if0* don't highlight "#if 0" blocks as comments
|
||||
*c_no_cformat* don't highlight %-formats in strings
|
||||
@ -987,7 +987,7 @@ Variable Highlight ~
|
||||
*c_no_c11* don't highlight C11 standard items
|
||||
*c_no_bsd* don't highlight BSD specific types
|
||||
|
||||
When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will
|
||||
When 'foldmethod' is set to "syntax" then `/* */` comments and { } blocks will
|
||||
become a fold. If you don't want comments to become a fold use: >
|
||||
:let c_no_comment_fold = 1
|
||||
"#if 0" blocks are also folded, unless: >
|
||||
@ -1034,7 +1034,7 @@ CH *ch.vim* *ft-ch-syntax*
|
||||
C/C++ interpreter. Ch has similar syntax highlighting to C and builds upon
|
||||
the C syntax file. See |c.vim| for all the settings that are available for C.
|
||||
|
||||
By setting a variable you can tell Vim to use Ch syntax for *.h files, instead
|
||||
By setting a variable you can tell Vim to use Ch syntax for `*.h` files, instead
|
||||
of C or C++: >
|
||||
:let ch_syntax_for_h = 1
|
||||
|
||||
@ -1296,7 +1296,7 @@ dosbatch_colons_comment variable to anything: >
|
||||
|
||||
:let dosbatch_colons_comment = 1
|
||||
|
||||
There is an option that covers whether *.btm files should be detected as type
|
||||
There is an option that covers whether `*.btm` files should be detected as type
|
||||
"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter
|
||||
is used by default. You may select the former with the following line: >
|
||||
|
||||
@ -1427,13 +1427,13 @@ Euphoria version 3.1.1 (https://www.rapideuphoria.com/) is still necessary
|
||||
for developing applications for the DOS platform, which Euphoria version 4
|
||||
(https://www.openeuphoria.org/) does not support.
|
||||
|
||||
The following file extensions are auto-detected as Euphoria file type:
|
||||
The following file extensions are auto-detected as Euphoria file type: >
|
||||
|
||||
*.e, *.eu, *.ew, *.ex, *.exu, *.exw
|
||||
*.E, *.EU, *.EW, *.EX, *.EXU, *.EXW
|
||||
|
||||
To select syntax highlighting file for Euphoria, as well as for
|
||||
auto-detecting the *.e and *.E file extensions as Euphoria file type,
|
||||
auto-detecting the `*.e` and `*.E` file extensions as Euphoria file type,
|
||||
add the following line to your startup file: >
|
||||
|
||||
:let g:filetype_euphoria = "euphoria3"
|
||||
@ -1442,7 +1442,7 @@ add the following line to your startup file: >
|
||||
|
||||
:let g:filetype_euphoria = "euphoria4"
|
||||
|
||||
Elixir and Euphoria share the *.ex file extension. If the filetype is
|
||||
Elixir and Euphoria share the `*.ex` file extension. If the filetype is
|
||||
specifically set as Euphoria with the g:filetype_euphoria variable, or the
|
||||
file is determined to be Euphoria based on keywords in the file, then the
|
||||
filetype will be set as Euphoria. Otherwise, the filetype will default to
|
||||
@ -1469,11 +1469,11 @@ ELIXIR *elixir.vim* *ft-elixir-syntax*
|
||||
Elixir is a dynamic, functional language for building scalable and
|
||||
maintainable applications.
|
||||
|
||||
The following file extensions are auto-detected as Elixir file types:
|
||||
The following file extensions are auto-detected as Elixir file types: >
|
||||
|
||||
*.ex, *.exs, *.eex, *.leex, *.lock
|
||||
|
||||
Elixir and Euphoria share the *.ex file extension. If the filetype is
|
||||
Elixir and Euphoria share the `*.ex` file extension. If the filetype is
|
||||
specifically set as Euphoria with the g:filetype_euphoria variable, or the
|
||||
file is determined to be Euphoria based on keywords in the file, then the
|
||||
filetype will be set as Euphoria. Otherwise, the filetype will default to
|
||||
@ -1905,7 +1905,7 @@ IA64 *ia64.vim* *intel-itanium* *ft-ia64-syntax*
|
||||
Highlighting for the Intel Itanium 64 assembly language. See |asm.vim| for
|
||||
how to recognize this filetype.
|
||||
|
||||
To have *.inc files be recognized as IA64, add this to your vimrc file: >
|
||||
To have `*.inc` files be recognized as IA64, add this to your vimrc file: >
|
||||
:let g:filetype_inc = "ia64"
|
||||
|
||||
|
||||
@ -2118,7 +2118,7 @@ set "lite_minlines" to the value you desire. Example: >
|
||||
LPC *lpc.vim* *ft-lpc-syntax*
|
||||
|
||||
LPC stands for a simple, memory-efficient language: Lars Pensjö C. The
|
||||
file name of LPC is usually *.c. Recognizing these files as LPC would bother
|
||||
file name of LPC is usually `*.c`. Recognizing these files as LPC would bother
|
||||
users writing only C programs. If you want to use LPC syntax in Vim, you
|
||||
should set a variable in your vimrc file: >
|
||||
|
||||
@ -2153,7 +2153,7 @@ For LPC4 series of LPC: >
|
||||
|
||||
For uLPC series of LPC:
|
||||
uLPC has been developed to Pike, so you should use Pike syntax
|
||||
instead, and the name of your source file should be *.pike
|
||||
instead, and the name of your source file should be `*.pike`
|
||||
|
||||
|
||||
LUA *lua.vim* *ft-lua-syntax*
|
||||
@ -2230,7 +2230,7 @@ the start of a region, for example 500 lines: >
|
||||
|
||||
MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
|
||||
|
||||
Empty *.m files will automatically be presumed to be Matlab files unless you
|
||||
Empty `*.m` files will automatically be presumed to be Matlab files unless you
|
||||
have the following in your vimrc: >
|
||||
|
||||
let filetype_m = "mma"
|
||||
@ -2437,7 +2437,7 @@ keywords, etc): >
|
||||
|
||||
|
||||
The option pascal_symbol_operator controls whether symbol operators such as +,
|
||||
*, .., etc. are displayed using the Operator color or not. To colorize symbol
|
||||
`*`, .., etc. are displayed using the Operator color or not. To colorize symbol
|
||||
operators, add the following line to your startup file: >
|
||||
|
||||
:let pascal_symbol_operator=1
|
||||
@ -2600,7 +2600,7 @@ x = 0 to sync from start.
|
||||
PLAINTEX *plaintex.vim* *ft-plaintex-syntax*
|
||||
|
||||
TeX is a typesetting language, and plaintex is the file type for the "plain"
|
||||
variant of TeX. If you never want your *.tex files recognized as plain TeX,
|
||||
variant of TeX. If you never want your `*.tex` files recognized as plain TeX,
|
||||
see |ft-tex-plugin|.
|
||||
|
||||
This syntax file has the option >
|
||||
@ -3149,7 +3149,7 @@ The syntax/sh.vim file provides several levels of syntax-based 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)
|
||||
>
|
||||
|
||||
then various syntax items (ie. HereDocuments and function bodies) become
|
||||
syntax-foldable (see |:syn-fold|). You also may add these together
|
||||
to get multiple types of folding: >
|
||||
@ -3446,8 +3446,8 @@ has a starred form (ie. eqnarray*).
|
||||
*tex-style* *b:tex_stylish*
|
||||
Tex: Starting a New Style? ~
|
||||
|
||||
One may use "\makeatletter" in *.tex files, thereby making the use of "@" in
|
||||
commands available. However, since the *.tex file doesn't have one of the
|
||||
One may use "\makeatletter" in `*.tex` files, thereby making the use of "@" in
|
||||
commands available. However, since the `*.tex` file doesn't have one of the
|
||||
following suffices: sty cls clo dtx ltx, the syntax highlighting will flag
|
||||
such use of @ as an error. To solve this: >
|
||||
|
||||
@ -3491,7 +3491,7 @@ substitution will not be made.
|
||||
Tex: Controlling iskeyword~
|
||||
|
||||
Normally, LaTeX keywords support 0-9, a-z, A-z, and 192-255 only. Latex
|
||||
keywords don't support the underscore - except when in *.sty files. The
|
||||
keywords don't support the underscore - except when in `*.sty` files. The
|
||||
syntax highlighting script handles this with the following logic:
|
||||
|
||||
* If g:tex_stylish exists and is 1
|
||||
@ -3715,7 +3715,7 @@ Vim understands three types of syntax items:
|
||||
|
||||
Several syntax ITEMs can be put into one syntax GROUP. For a syntax group
|
||||
you can give highlighting attributes. For example, you could have an item
|
||||
to define a "/* .. */" comment and another one that defines a "// .." comment,
|
||||
to define a `/* .. */` comment and another one that defines a "// .." comment,
|
||||
and put them both in the "Comment" group. You can then specify that a
|
||||
"Comment" will be in bold font and have a blue color. You are free to make
|
||||
one highlight group for one syntax item, or put all items into one group.
|
||||
@ -4473,19 +4473,19 @@ Notes:
|
||||
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 (match a comment but don't highlight the /* and */): >
|
||||
Example (match a comment but don't highlight the `/* and */`): >vim
|
||||
:syntax region Comment start="/\*"hs=e+1 end="\*/"he=s-1
|
||||
<
|
||||
< >
|
||||
/* this is a comment */
|
||||
^^^^^^^^^^^^^^^^^^^ highlighted
|
||||
|
||||
A 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
|
||||
<
|
||||
A more complicated Example: >vim
|
||||
: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-context*
|
||||
|
||||
Note: This is an obsolete feature, only included for backwards compatibility
|
||||
@ -4785,7 +4785,7 @@ matches, nextgroup, etc. But there are a few differences:
|
||||
- When a match with a sync pattern is found, the rest of the line (or group of
|
||||
continued lines) is searched for another match. The last match is used.
|
||||
This is used when a line can contain both the start end the end of a region
|
||||
(e.g., in a C-comment like /* this */, the last "*/" is used).
|
||||
(e.g., in a C-comment like `/* this */`, the last "*/" is used).
|
||||
|
||||
There are two ways how a match with a sync pattern can be used:
|
||||
1. Parsing for highlighting starts where redrawing starts (and where the
|
||||
@ -5481,14 +5481,14 @@ memory Vim will consume.
|
||||
Only highlighting typedefs, unions and structs can be done too. For this you
|
||||
must use Universal Ctags (https://ctags.io) or Exuberant ctags.
|
||||
|
||||
Put these lines in your Makefile:
|
||||
Put these lines in your Makefile: >
|
||||
|
||||
# Make a highlight file for types. Requires Universal/Exuberant ctags and awk
|
||||
types: types.vim
|
||||
types.vim: *.[ch]
|
||||
ctags --c-kinds=gstu -o- *.[ch] |\
|
||||
awk 'BEGIN{printf("syntax keyword Type\t")}\
|
||||
{printf("%s ", $$1)}END{print ""}' > $@
|
||||
# Make a highlight file for types. Requires Universal/Exuberant ctags and awk
|
||||
types: types.vim
|
||||
types.vim: *.[ch]
|
||||
ctags --c-kinds=gstu -o- *.[ch] |\
|
||||
awk 'BEGIN{printf("syntax keyword Type\t")}\
|
||||
{printf("%s ", $$1)}END{print ""}' > $@
|
||||
|
||||
And put these lines in your vimrc: >
|
||||
|
||||
|
@ -180,12 +180,12 @@ Command-line editing and history. |cmdline-editing|
|
||||
forward/backward one character. The shifted right/left cursor keys
|
||||
can be used to move forward/backward one word. CTRL-B/CTRL-E can be
|
||||
used to go to the begin/end of the command-line.
|
||||
{Vi: can only alter the last character in the line}
|
||||
{Vi: when hitting <Esc> the command-line is executed. This is
|
||||
(Vi: can only alter the last character in the line)
|
||||
(Vi: when hitting <Esc> the command-line is executed. This is
|
||||
unexpected for most people; therefore it was changed in Vim. But when
|
||||
the <Esc> is part of a mapping, the command-line is executed. If you
|
||||
want the Vi behaviour also when typing <Esc>, use ":cmap ^V<Esc>
|
||||
^V^M"}
|
||||
^V^M")
|
||||
|cmdline-history|
|
||||
The command-lines are remembered. The up/down cursor keys can be used
|
||||
to recall previous command-lines. The 'history' option can be set to
|
||||
|
Loading…
Reference in New Issue
Block a user