aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/syntax.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/syntax.txt')
-rw-r--r--runtime/doc/syntax.txt121
1 files changed, 88 insertions, 33 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 81ba639dbe..e59f567826 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.4. Last change: 2015 Dec 19
+*syntax.txt* For Vim version 7.4. Last change: 2016 Aug 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -936,26 +936,29 @@ To disable them use ":unlet". Example: >
:unlet c_comment_strings
Variable Highlight ~
-c_gnu GNU gcc specific items
-c_comment_strings strings and numbers inside a comment
-c_space_errors trailing white space and spaces before a <Tab>
-c_no_trail_space_error ... but no trailing spaces
-c_no_tab_space_error ... but no spaces before a <Tab>
-c_no_bracket_error don't highlight {}; inside [] as errors
-c_no_curly_error don't highlight {}; inside [] and () as errors;
+*c_gnu* GNU gcc specific items
+*c_comment_strings* strings and numbers inside a comment
+*c_space_errors* trailing white space and spaces before a <Tab>
+*c_no_trail_space_error* ... but no trailing spaces
+*c_no_tab_space_error* ... but no spaces before a <Tab>
+*c_no_bracket_error* don't highlight {}; inside [] as errors
+*c_no_curly_error* don't highlight {}; inside [] and () as errors;
except { and } in first column
-c_curly_error highlight a missing }; this forces syncing from the
+ Default is to highlight them, otherwise you
+ can't spot a missing ")".
+*c_curly_error* highlight a missing }; this forces syncing from the
start of the file, can be slow
-c_no_ansi don't do standard ANSI types and constants
-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_no_ansi* don't do standard ANSI types and constants
+*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
syntax instead of objcpp
-c_no_if0 don't highlight "#if 0" blocks as comments
-c_no_cformat don't highlight %-formats in strings
-c_no_c99 don't highlight C99 standard items
-c_no_c11 don't highlight C11 standard items
+*c_no_if0* don't highlight "#if 0" blocks as comments
+*c_no_cformat* don't highlight %-formats in strings
+*c_no_c99* don't highlight C99 standard items
+*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
become a fold. If you don't want comments to become a fold use: >
@@ -1037,6 +1040,21 @@ This works immediately.
CLOJURE *ft-clojure-syntax*
+The default syntax groups can be augmented through the
+*g:clojure_syntax_keywords* and *b:clojure_syntax_keywords* variables. The
+value should be a |Dictionary| of syntax group names to a |List| of custom
+identifiers:
+>
+ let g:clojure_syntax_keywords = {
+ \ 'clojureMacro': ["defproject", "defcustom"],
+ \ 'clojureFunc': ["string/join", "string/replace"]
+ \ }
+<
+Refer to the Clojure syntax script for valid syntax group names.
+
+If the |buffer-variable| *b:clojure_syntax_without_core_keywords* is set, only
+language constants and special forms are matched.
+
Setting *g:clojure_fold* enables folding Clojure code via the syntax engine.
Any list, vector, or map that extends over more than one line can be folded
using the standard Vim |fold-commands|.
@@ -1569,15 +1587,6 @@ as Fvwm2 configuration files, add the following: >
:au! BufNewFile,BufRead /etc/X11/fvwm2/* let b:fvwm_version = 2 |
\ set filetype=fvwm
-If you'd like Vim to highlight all valid color names, tell it where to
-find the color database (rgb.txt) on your system. Do this by setting
-"rgb_file" to its location. Assuming your color database is located
-in /usr/X11/lib/X11/, you should add the line >
-
- :let rgb_file = "/usr/X11/lib/X11/rgb.txt"
-
-to your vimrc file.
-
GSP *gsp.vim* *ft-gsp-syntax*
@@ -2886,7 +2895,7 @@ You may wish to embed languages into sh. I'll give an example courtesy of
Lorance Stinson on how to do this with awk as an example. Put the following
file into $HOME/.config/nvim/after/syntax/sh/awkembed.vim: >
- " AWK Embedding: {{{1
+ " AWK Embedding:
" ==============
" Shamelessly ripped from aspperl.vim by Aaron Hope.
if exists("b:current_syntax")
@@ -3345,6 +3354,13 @@ Note that schemas are not actually limited to plain scalars, but this is the
only difference between schemas defined in YAML specification and the only
difference defined in the syntax file.
+
+ZSH *zsh.vim* *ft-zsh-syntax*
+
+The syntax script for zsh allows for syntax-based folding: >
+
+ :let g:zsh_fold_enable = 1
+
==============================================================================
5. Defining a syntax *:syn-define* *E410*
@@ -3422,6 +3438,32 @@ SPELL CHECKING *:syn-spell*
To activate spell checking the 'spell' option must be set.
+SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
+
+:sy[ntax] iskeyword [clear | {option}]
+ This defines the keyword characters. It's like the 'iskeyword' option
+ for but only applies to syntax highlighting.
+
+ clear: Syntax specific iskeyword setting is disabled and the
+ buffer-local 'iskeyword' setting is used.
+ {option} Set the syntax 'iskeyword' option to a new value.
+
+ Example: >
+ :syntax iskeyword @,48-57,192-255,$,_
+<
+ This would set the syntax specific iskeyword option to include all
+ alphabetic characters, plus the numeric characters, all accented
+ characters and also includes the "_" and the "$".
+
+ If no argument is given, the current value will be output.
+
+ Setting this option influences what |/\k| matches in syntax patterns
+ and also determines where |:syn-keyword| will be checked for a new
+ match.
+
+ It is recommended when writing syntax files, to use this command
+ to the correct value for the specific syntax language and not change
+ the 'iskeyword' option.
DEFINING KEYWORDS *:syn-keyword*
@@ -3453,6 +3495,7 @@ DEFINING KEYWORDS *:syn-keyword*
isn't, the keyword will never be recognized.
Multi-byte characters can also be used. These do not have to be in
'iskeyword'.
+ See |:syn-iskeyword| for defining syntax specific iskeyword settings.
A keyword always has higher priority than a match or region, the
keyword is used if more than one item matches. Keywords do not nest
@@ -4484,9 +4527,9 @@ in their own color.
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
for the file "colors/{name}.vim". The first one that
is found is loaded.
- To see the name of the currently active color scheme: >
- :colo
-< The name is also stored in the g:colors_name variable.
+ 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.
After the color scheme has been loaded the
@@ -4727,6 +4770,10 @@ font={font-name} *highlight-font*
All fonts used, except for Menu and Tooltip, should be of the same
character size as the default font! Otherwise redrawing problems will
occur.
+ To use a font name with an embedded space or other special character,
+ put it in single quotes. The single quote cannot be used then.
+ Example: >
+ :hi comment font='Monospace 10'
guifg={color-name} *highlight-guifg*
guibg={color-name} *highlight-guibg*
@@ -4817,6 +4864,9 @@ SignColumn column where |signs| are displayed
*hl-IncSearch*
IncSearch 'incsearch' highlighting; also used for the text replaced with
":s///c"
+ *hl-Substitute*
+Substitute |:substitute| replacement text highlighting
+
*hl-LineNr*
LineNr Line number for ":number" and ":#" commands, and when 'number'
or 'relativenumber' option is set.
@@ -4848,6 +4898,10 @@ PmenuSbar Popup menu: scrollbar.
PmenuThumb Popup menu: Thumb of the scrollbar.
*hl-Question*
Question |hit-enter| prompt and yes/no questions
+ *hl-QuickFixLine*
+QuickFixLine The selected |quickfix| item in the quickfix window.
+ |hl-CursorLine| is combined with this when the cursor is on
+ the currently selected quickfix item.
*hl-Search*
Search Last search pattern highlighting (see 'hlsearch').
Also used for highlighting the current line in the quickfix
@@ -4887,8 +4941,6 @@ TabLineSel tab pages line, active tab page label
Title titles for output from ":set all", ":autocmd" etc.
*hl-Visual*
Visual Visual mode selection
- *hl-VisualNOS*
-VisualNOS Removed. |vim-differences| {Nvim}
*hl-WarningMsg*
WarningMsg warning messages
*hl-WildMenu*
@@ -4992,6 +5044,9 @@ defaults back: >
:syntax reset
+It is a bit of a wrong name, since it does not reset any syntax items, it only
+affects the highlighting.
+
This doesn't change the colors for the 'highlight' option.
Note that the syntax colors that you set in your vimrc file will also be reset