search for a sync point will
consider the lines to be concatenated.
If the "maxlines={N}" argument is given too, the number of lines that are
searched for a match is restricted to N. This is useful if you have very
few things to sync on and a slow machine. Example: >
:syntax sync maxlines=100
You can clear all sync settings with: >
:syntax sync clear
You can clear specific sync patterns with: >
:syntax sync clear {sync-group-name} ..
==============================================================================
12. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list*
This command lists all the syntax items: >
:sy[ntax] [list]
To show the syntax items for one syntax group: >
:sy[ntax] list {group-name}
To list the syntax 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, because it looks better.
==============================================================================
13. Highlight command *:highlight* *:hi* *E28* *E411* *E415*
Nvim uses a range of highlight groups which fall into two categories: Editor
interface and syntax highlighting. In rough order of importance, these are
- basic editor |highlight-groups|
- standard syntax |group-name|s (in addition, syntax files can define
language-specific groups, which are prefixed with the language name)
- |diagnostic-highlights|
- |treesitter-highlight-groups|
- |lsp-semantic-highlight| groups
- |lsp-highlight| of symbols and references
Where appropriate, highlight groups are linked by default to one of the more basic
groups, but colorschemes are expected to cover all of them. Under each tag,
the corresponding highlight groups are highlighted using the current
colorscheme.
*:colo* *:colorscheme* *E185*
:colo[rscheme] Output the name of the currently active color scheme.
This is basically the same as >
:echo g:colors_name
< In case g:colors_name has not been defined :colo will
output "default".
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
for the file "colors/{name}.{vim,lua}". The first one
that is found is loaded.
Note: "colors/{name}.vim" is tried first.
Also searches all plugins in 'packpath', first below
"start" and then under "opt".
Doesn't work recursively, thus you can't use
":colorscheme" in a color scheme script.
To customize a color scheme use another name, e.g.
"~/.config/nvim/colors/mine.vim", and use `:runtime` to
load the original color scheme: >
runtime colors/evening.vim
hi Statement ctermfg=Blue guifg=Blue
< Before the color scheme will be loaded the
|ColorSchemePre| autocommand event is triggered.
After the color scheme has been loaded the
|ColorScheme| autocommand event is triggered.
For info about writing a color scheme file: >
:edit $VIMRUNTIME/colors/README.txt
:hi[ghlight] List all the current highlight groups that have
attributes set.
:hi[ghlight] {group-name}
List one highlight group.
*highlight-clear* *:hi-clear*
:hi[ghlight] clear Reset all highlighting to the defaults. Removes all
highlighting for groups added by the user.
Uses the current value of 'background' to decide which
default colors to use.
If there was a default link, restore it. |:hi-link|
:hi[ghlight] clear {group-name}
:hi[ghlight] {group-name} NONE
Disable the highlighting for one highlight group. It
is _not_ set back to the default colors.
:hi[ghlight] [default] {group-name} {key}={arg} ..
Add a highlight group, or change the highlighting for
an existing group.
See |highlight-args| for the {key}={arg} arguments.
See |:highlight-default| for the optional [default]
argument.
Normally a highlight group is added once when starting up. This sets the
default values for the highlighting. After that, you can use additional