0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

Update runtime files.

This commit is contained in:
Bram Moolenaar 2017-03-16 17:41:02 +01:00
parent 8820b48654
commit 036986f150
35 changed files with 485 additions and 235 deletions

View File

@ -276,7 +276,7 @@ If you want to keep the changed buffer without saving it, switch on the
*:vie* *:view* *:vie* *:view*
:vie[w][!] [++opt] [+cmd] file :vie[w][!] [++opt] [+cmd] file
When used in Ex mode: Leave |Ex mode|, go back to When used in Ex mode: Leave |Ex-mode|, go back to
Normal mode. Otherwise same as |:edit|, but set Normal mode. Otherwise same as |:edit|, but set
'readonly' option for this buffer. {not in Vi} 'readonly' option for this buffer. {not in Vi}

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.0. Last change: 2017 Mar 04 *eval.txt* For Vim version 8.0. Last change: 2017 Mar 09
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1904,6 +1904,8 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV|
*v:testing* *testing-variable* *v:testing* *testing-variable*
v:testing Must be set before using `test_garbagecollect_now()`. v:testing Must be set before using `test_garbagecollect_now()`.
Also, when set certain error messages won't be shown for 2
seconds. (e.g. "'dictionary' option is empty")
*v:this_session* *this_session-variable* *v:this_session* *this_session-variable*
v:this_session Full filename of the last loaded or saved session file. See v:this_session Full filename of the last loaded or saved session file. See
@ -7797,14 +7799,6 @@ test_autochdir() *test_autochdir()*
Set a flag to enable the effect of 'autochdir' before Vim Set a flag to enable the effect of 'autochdir' before Vim
startup has finished. startup has finished.
*test_disable_char_avail()*
test_disable_char_avail({expr})
When {expr} is 1 the internal char_avail() function will
return |FALSE|. When {expr} is 0 the char_avail() function will
function normally.
Only use this for a test where typeahead causes the test not
to work. E.g., to trigger the CursorMovedI autocommand event.
test_garbagecollect_now() *test_garbagecollect_now()* test_garbagecollect_now() *test_garbagecollect_now()*
Like garbagecollect(), but executed right away. This must Like garbagecollect(), but executed right away. This must
only be called directly to avoid any structure to exist only be called directly to avoid any structure to exist
@ -7840,6 +7834,18 @@ test_null_partial() *test_null_partial()*
test_null_string() *test_null_string()* test_null_string() *test_null_string()*
Return a String that is null. Only useful for testing. Return a String that is null. Only useful for testing.
test_override({name}, {val}) *test_override()*
Overrides certain parts of Vims internal processing to be able
to run tests. Only to be used for testing Vim!
The override is enabled when {val} is non-zero and removed
when {val} is zero.
Current supported values for name are:
name effect when {val} is non-zero ~
redraw disable the redrawing() function
char_avail disable the char_avail() function
ALL clear all overrides ({val} is not used)
test_settime({expr}) *test_settime()* test_settime({expr}) *test_settime()*
Set the time Vim uses internally. Currently only used for Set the time Vim uses internally. Currently only used for
timestamps in the history, as they are used in viminfo, and timestamps in the history, as they are used in viminfo, and

View File

@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 8.0. Last change: 2017 Feb 18 *if_pyth.txt* For Vim version 8.0. Last change: 2017 Mar 09
VIM REFERENCE MANUAL by Paul Moore VIM REFERENCE MANUAL by Paul Moore
@ -17,6 +17,7 @@ The Python Interface to Vim *python* *Python*
9. Dynamic loading |python-dynamic| 9. Dynamic loading |python-dynamic|
10. Python 3 |python3| 10. Python 3 |python3|
11. Python X |python_x| 11. Python X |python_x|
12. Building with Python support |python-building|
{Vi does not have any of these commands} {Vi does not have any of these commands}
@ -879,5 +880,27 @@ If a user prefers Python 2 and want to fallback to Python 3, he needs to set
set pyx=3 set pyx=3
endif endif
==============================================================================
12. Building with Python support *python-building*
A few hints for building with Python 2 or 3 support.
UNIX
See src/Makefile for how to enable including the Python interface.
On Ubuntu you will want to install these packages for Python 2:
python
python-dev
For Python 3:
python3
pytyon3-dev
For Python 3.6:
python3.6
pytyon3.6-dev
If you have more than one version of Python 3, you need to link python3 to the
one you prefer, before running configure.
============================================================================== ==============================================================================
vim:tw=78:ts=8:ft=help:norl: vim:tw=78:ts=8:ft=help:norl:

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.0. Last change: 2016 Oct 15 *map.txt* For Vim version 8.0. Last change: 2017 Mar 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -584,7 +584,8 @@ Upper and lowercase differences are ignored.
*map-comments* *map-comments*
It is not possible to put a comment after these commands, because the '"' It is not possible to put a comment after these commands, because the '"'
character is considered to be part of the {lhs} or {rhs}. character is considered to be part of the {lhs} or {rhs}. However, one can
use |", since this starts a new, empty command with a comment.
*map_bar* *map-bar* *map_bar* *map-bar*
Since the '|' character is used to separate a map command from the next Since the '|' character is used to separate a map command from the next

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.0. Last change: 2016 Nov 24 *motion.txt* For Vim version 8.0. Last change: 2017 Mar 12
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -193,7 +193,7 @@ l or *l*
*$* *<End>* *<kEnd>* *$* *<End>* *<kEnd>*
$ or <End> To the end of the line. When a count is given also go $ or <End> To the end of the line. When a count is given also go
[count - 1] lines downward |inclusive|. [count - 1] lines downward. |inclusive| motion.
In Visual mode the cursor goes to just after the last In Visual mode the cursor goes to just after the last
character in the line. character in the line.
When 'virtualedit' is active, "$" may move the cursor When 'virtualedit' is active, "$" may move the cursor

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.0. Last change: 2017 Mar 05 *options.txt* For Vim version 8.0. Last change: 2017 Mar 09
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -727,6 +727,7 @@ A jump table for the options with a short description can be found at |Q_op|.
which can be easier to read at certain sizes on certain displays. which can be easier to read at certain sizes on certain displays.
Setting this option can sometimes cause problems if 'guifont' is set Setting this option can sometimes cause problems if 'guifont' is set
to its default (empty string). to its default (empty string).
NOTE: This option is reset when 'compatible' is set.
*'autochdir'* *'acd'* *'noautochdir'* *'noacd'* *'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
'autochdir' 'acd' boolean (default off) 'autochdir' 'acd' boolean (default off)
@ -760,6 +761,7 @@ A jump table for the options with a short description can be found at |Q_op|.
- Disable the use of 'keymap' (without changing its value). - Disable the use of 'keymap' (without changing its value).
Note that 'arabicshape' and 'delcombine' are not reset (it is a global Note that 'arabicshape' and 'delcombine' are not reset (it is a global
option). option).
NOTE: This option is reset when 'compatible' is set.
Also see |arabic.txt|. Also see |arabic.txt|.
*'arabicshape'* *'arshape'* *'arabicshape'* *'arshape'*
@ -781,6 +783,7 @@ A jump table for the options with a short description can be found at |Q_op|.
form. form.
Arabic is a complex language which requires other settings, for Arabic is a complex language which requires other settings, for
further details see |arabic.txt|. further details see |arabic.txt|.
NOTE: This option is set when 'compatible' is set.
*'autoindent'* *'ai'* *'noautoindent'* *'noai'* *'autoindent'* *'ai'* *'noautoindent'* *'noai'*
'autoindent' 'ai' boolean (default off) 'autoindent' 'ai' boolean (default off)
@ -993,6 +996,9 @@ A jump table for the options with a short description can be found at |Q_op|.
the system may refuse to do this. In that case the "auto" value will the system may refuse to do this. In that case the "auto" value will
again not rename the file. again not rename the file.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
*'backupdir'* *'bdir'* *'backupdir'* *'bdir'*
'backupdir' 'bdir' string (default for Amiga: ".,t:", 'backupdir' 'bdir' string (default for Amiga: ".,t:",
for MS-DOS and Win32: ".,$TEMP,c:/tmp,c:/temp" for MS-DOS and Win32: ".,$TEMP,c:/tmp,c:/temp"
@ -1139,6 +1145,7 @@ A jump table for the options with a short description can be found at |Q_op|.
< When they are supported "\n" characters will start a new line. If the < When they are supported "\n" characters will start a new line. If the
expression evaluates to a |List| this is equal to using each List item expression evaluates to a |List| this is equal to using each List item
as a string and putting "\n" in between them. as a string and putting "\n" in between them.
NOTE: This option is set to "" when 'compatible' is set.
*'belloff'* *'bo'* *'belloff'* *'bo'*
'belloff' 'bo' string (default "") 'belloff' 'bo' string (default "")
@ -1176,8 +1183,8 @@ A jump table for the options with a short description can be found at |Q_op|.
wildmode More matches in |cmdline-completion| available wildmode More matches in |cmdline-completion| available
(depends on the 'wildmode' setting). (depends on the 'wildmode' setting).
This is most useful, to fine tune when in insert mode the bell should This is most useful to fine tune when in Insert mode the bell should
be rung. For normal mode and ex commands, the bell is often rung to be rung. For Normal mode and Ex commands, the bell is often rung to
indicate that an error occurred. It can be silenced by adding the indicate that an error occurred. It can be silenced by adding the
"error" keyword. "error" keyword.
@ -1259,6 +1266,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Every wrapped line will continue visually indented (same amount of Every wrapped line will continue visually indented (same amount of
space as the beginning of that line), thus preserving horizontal blocks space as the beginning of that line), thus preserving horizontal blocks
of text. of text.
NOTE: This option is reset when 'compatible' is set.
*'breakindentopt'* *'briopt'* *'breakindentopt'* *'briopt'*
'breakindentopt' 'briopt' string (default empty) 'breakindentopt' 'briopt' string (default empty)
@ -1435,6 +1443,8 @@ A jump table for the options with a short description can be found at |Q_op|.
:exe "set cedit=\<Esc>" :exe "set cedit=\<Esc>"
< |Nvi| also has this option, but it only uses the first character. < |Nvi| also has this option, but it only uses the first character.
See |cmdwin|. See |cmdwin|.
NOTE: This option is set to the Vim default value when 'compatible'
is reset.
*'charconvert'* *'ccv'* *E202* *E214* *E513* *'charconvert'* *'ccv'* *E202* *E214* *E513*
'charconvert' 'ccv' string (default "") 'charconvert' 'ccv' string (default "")
@ -1743,7 +1753,7 @@ A jump table for the options with a short description can be found at |Q_op|.
set to its Vim default when 'compatible' is unset. set to its Vim default when 'compatible' is unset.
The {effect} column summarises the change when 'compatible' is set. The {effect} column summarises the change when 'compatible' is set.
option ? set value effect option ? set value effect ~
'allowrevins' + off no CTRL-_ command 'allowrevins' + off no CTRL-_ command
'antialias' + off don't use antialiased fonts 'antialias' + off don't use antialiased fonts
@ -1763,7 +1773,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'cscopepathcomp'+ 0 don't show directories in tags list 'cscopepathcomp'+ 0 don't show directories in tags list
'cscoperelative'+ off 'cscoperelative'+ off
'cscopetag' + off don't use cscope for ":tag" 'cscopetag' + off don't use cscope for ":tag"
'cscopetagorder' 0 see |cscopetagorder| 'cscopetagorder'+ 0 see |cscopetagorder|
'cscopeverbose' + off see |cscopeverbose| 'cscopeverbose' + off see |cscopeverbose|
'delcombine' + off unicode: delete whole char combination 'delcombine' + off unicode: delete whole char combination
'digraph' + off no digraphs 'digraph' + off no digraphs
@ -1813,7 +1823,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'tildeop' + off tilde is not an operator 'tildeop' + off tilde is not an operator
'ttimeout' + off no terminal timeout 'ttimeout' + off no terminal timeout
'undofile' + off don't use an undo file 'undofile' + off don't use an undo file
'viminfo' - {unchanged} {set vim default only on resetting 'cp'} 'viminfo' - {unchanged} {set Vim default only on resetting 'cp'}
'virtualedit' + "" cursor can only be placed on characters 'virtualedit' + "" cursor can only be placed on characters
'whichwrap' & "" left-right movements don't wrap 'whichwrap' & "" left-right movements don't wrap
'wildchar' & CTRL-E only when the current value is <Tab> 'wildchar' & CTRL-E only when the current value is <Tab>
@ -1993,7 +2003,7 @@ A jump table for the options with a short description can be found at |Q_op|.
existing line. 'expandtab' has no effect on these characters, a Tab existing line. 'expandtab' has no effect on these characters, a Tab
remains a Tab. If the new indent is greater than on the existing remains a Tab. If the new indent is greater than on the existing
line, the remaining space is filled in the normal manner. line, the remaining space is filled in the normal manner.
NOTE: 'copyindent' is reset when 'compatible' is set. NOTE: This option is reset when 'compatible' is set.
Also see 'preserveindent'. Also see 'preserveindent'.
*'cpoptions'* *'cpo'* *cpo* *'cpoptions'* *'cpo'* *cpo*
@ -2354,6 +2364,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi} {not in Vi}
Determines how many components of the path to show in a list of tags. Determines how many components of the path to show in a list of tags.
See |cscopepathcomp|. See |cscopepathcomp|.
NOTE: This option is set to 0 when 'compatible' is set.
*'cscopeprg'* *'csprg'* *'cscopeprg'* *'csprg'*
'cscopeprg' 'csprg' string (default "cscope") 'cscopeprg' 'csprg' string (default "cscope")
@ -2383,6 +2394,7 @@ A jump table for the options with a short description can be found at |Q_op|.
In the absence of a prefix (-P) for cscope. setting this option enables In the absence of a prefix (-P) for cscope. setting this option enables
to use the basename of cscope.out path as the prefix. to use the basename of cscope.out path as the prefix.
See |cscoperelative|. See |cscoperelative|.
NOTE: This option is reset when 'compatible' is set.
*'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'* *'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'*
'cscopetag' 'cst' boolean (default off) 'cscopetag' 'cst' boolean (default off)
@ -2502,6 +2514,7 @@ A jump table for the options with a short description can be found at |Q_op|.
This is useful for Arabic, Hebrew and many other languages where one This is useful for Arabic, Hebrew and many other languages where one
may have combining characters overtop of base characters, and want may have combining characters overtop of base characters, and want
to remove only the combining ones. to remove only the combining ones.
NOTE: This option is reset when 'compatible' is set.
*'dictionary'* *'dict'* *'dictionary'* *'dict'*
'dictionary' 'dict' string (default "") 'dictionary' 'dict' string (default "")
@ -3422,6 +3435,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression will be evaluated in the |sandbox| when set from a The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. That stops the option from working, modeline, see |sandbox-option|. That stops the option from working,
since changing the buffer text is not allowed. since changing the buffer text is not allowed.
NOTE: This option is set to "" when 'compatible' is set.
*'formatoptions'* *'fo'* *'formatoptions'* *'fo'*
'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt") 'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
@ -4081,31 +4095,6 @@ A jump table for the options with a short description can be found at |Q_op|.
define one. The default uses a different group for each occasion. define one. The default uses a different group for each occasion.
See |highlight-default| for the default highlight groups. See |highlight-default| for the default highlight groups.
*'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
'hlsearch' 'hls' boolean (default off)
global
{not in Vi}
{not available when compiled without the
|+extra_search| feature}
When there is a previous search pattern, highlight all its matches.
The type of highlighting used can be set with the 'l' occasion in the
'highlight' option. This uses the "Search" highlight group by
default. Note that only the matching text is highlighted, any offsets
are not applied.
See also: 'incsearch' and |:match|.
When you get bored looking at the highlighted matches, you can turn it
off with |:nohlsearch|. This does not change the option value, as
soon as you use a search command, the highlighting comes back.
'redrawtime' specifies the maximum time spent on finding matches.
When the search pattern can match an end-of-line, Vim will try to
highlight all of the matched text. However, this depends on where the
search starts. This will be the first line in the window or the first
line below a closed fold. A match in a previous line which is not
drawn may not continue in a newly drawn line.
You can specify whether the highlight status is restored on startup
with the 'h' flag in 'viminfo' |viminfo-h|.
NOTE: This option is reset when 'compatible' is set.
*'history'* *'hi'* *'history'* *'hi'*
'history' 'hi' number (Vim default: 50, Vi default: 0, 'history' 'hi' number (Vim default: 50, Vi default: 0,
set to 200 in |defaults.vim|) set to 200 in |defaults.vim|)
@ -4138,6 +4127,31 @@ A jump table for the options with a short description can be found at |Q_op|.
When on, phonetic keyboard mapping is used. 'hkmap' must also be on. When on, phonetic keyboard mapping is used. 'hkmap' must also be on.
This is useful if you have a non-Hebrew keyboard. This is useful if you have a non-Hebrew keyboard.
See |rileft.txt|. See |rileft.txt|.
NOTE: This option is reset when 'compatible' is set.
*'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
'hlsearch' 'hls' boolean (default off)
global
{not in Vi}
{not available when compiled without the
|+extra_search| feature}
When there is a previous search pattern, highlight all its matches.
The type of highlighting used can be set with the 'l' occasion in the
'highlight' option. This uses the "Search" highlight group by
default. Note that only the matching text is highlighted, any offsets
are not applied.
See also: 'incsearch' and |:match|.
When you get bored looking at the highlighted matches, you can turn it
off with |:nohlsearch|. This does not change the option value, as
soon as you use a search command, the highlighting comes back.
'redrawtime' specifies the maximum time spent on finding matches.
When the search pattern can match an end-of-line, Vim will try to
highlight all of the matched text. However, this depends on where the
search starts. This will be the first line in the window or the first
line below a closed fold. A match in a previous line which is not
drawn may not continue in a newly drawn line.
You can specify whether the highlight status is restored on startup
with the 'h' flag in 'viminfo' |viminfo-h|.
NOTE: This option is reset when 'compatible' is set. NOTE: This option is reset when 'compatible' is set.
*'icon'* *'noicon'* *'icon'* *'noicon'*
@ -4419,7 +4433,7 @@ A jump table for the options with a short description can be found at |Q_op|.
< Error messages will be suppressed, unless the 'debug' option contains < Error messages will be suppressed, unless the 'debug' option contains
"msg". "msg".
See |indent-expression|. See |indent-expression|.
NOTE: This option is made empty when 'compatible' is set. NOTE: This option is set to "" when 'compatible' is set.
The expression will be evaluated in the |sandbox| when set from a The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. modeline, see |sandbox-option|.
@ -5410,6 +5424,8 @@ A jump table for the options with a short description can be found at |Q_op|.
feature} feature}
The number of milliseconds between polls for MzScheme threads. The number of milliseconds between polls for MzScheme threads.
Negative or zero value means no thread scheduling. Negative or zero value means no thread scheduling.
NOTE: This option is set to the Vim default value when 'compatible'
is reset.
*'nrformats'* *'nf'* *'nrformats'* *'nf'*
'nrformats' 'nf' string (default "bin,octal,hex", 'nrformats' 'nf' string (default "bin,octal,hex",
@ -5475,7 +5491,8 @@ A jump table for the options with a short description can be found at |Q_op|.
is set. Thus with the Vim default of 4 there is room for a line number is set. Thus with the Vim default of 4 there is room for a line number
up to 999. When the buffer has 1000 lines five columns will be used. up to 999. When the buffer has 1000 lines five columns will be used.
The minimum value is 1, the maximum value is 10. The minimum value is 1, the maximum value is 10.
NOTE: 'numberwidth' is reset to 8 when 'compatible' is set. NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
*'omnifunc'* *'ofu'* *'omnifunc'* *'ofu'*
'omnifunc' 'ofu' string (default: empty) 'omnifunc' 'ofu' string (default: empty)
@ -5715,7 +5732,7 @@ A jump table for the options with a short description can be found at |Q_op|.
a Tab. a Tab.
NOTE: When using ">>" multiple times the resulting indent is a mix of NOTE: When using ">>" multiple times the resulting indent is a mix of
tabs and spaces. You might not like this. tabs and spaces. You might not like this.
NOTE: 'preserveindent' is reset when 'compatible' is set. NOTE: This option is reset when 'compatible' is set.
Also see 'copyindent'. Also see 'copyindent'.
Use |:retab| to clean up white space. Use |:retab| to clean up white space.
@ -6453,9 +6470,6 @@ A jump table for the options with a short description can be found at |Q_op|.
"-f" is not inside the quotes, because it is not part of the command "-f" is not inside the quotes, because it is not part of the command
name. And Vim automagically recognizes the backslashes that are path name. And Vim automagically recognizes the backslashes that are path
separators. separators.
For Dos 32 bits (DJGPP), you can set the $DJSYSFLAGS environment
variable to change the way external commands are executed. See the
libc.inf file of DJGPP.
Under MS-Windows, when the executable ends in ".com" it must be Under MS-Windows, when the executable ends in ".com" it must be
included. Thus setting the shell to "command.com" or "4dos.com" included. Thus setting the shell to "command.com" or "4dos.com"
works, but "command" and "4dos" do not work for all commands (e.g., works, but "command" and "4dos" do not work for all commands (e.g.,
@ -6595,6 +6609,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'shelltemp' is off. 'shelltemp' is off.
The `system()` function does not respect this option and always uses The `system()` function does not respect this option and always uses
temp files. temp files.
NOTE: This option is set to the Vim default value when 'compatible'
is reset.
*'shelltype'* *'st'* *'shelltype'* *'st'*
'shelltype' 'st' number (default 0) 'shelltype' 'st' number (default 0)
@ -6911,7 +6927,7 @@ A jump table for the options with a short description can be found at |Q_op|.
mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H. mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H.
When using the ">>" command, lines starting with '#' are not shifted When using the ">>" command, lines starting with '#' are not shifted
right. right.
NOTE: 'smartindent' is reset when 'compatible' is set. NOTE: This option is reset when 'compatible' is set.
This option is reset when 'paste' is set and restored when 'paste' is This option is reset when 'paste' is set and restored when 'paste' is
reset. reset.
@ -7566,6 +7582,8 @@ A jump table for the options with a short description can be found at |Q_op|.
ignore Ignore case ignore Ignore case
match Match case match Match case
smart Ignore case unless an upper case letter is used smart Ignore case unless an upper case letter is used
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
*'taglength'* *'tl'* *'taglength'* *'tl'*
'taglength' 'tl' number (default 0) 'taglength' 'tl' number (default 0)
@ -7712,6 +7730,7 @@ A jump table for the options with a short description can be found at |Q_op|.
compatible terminal. compatible terminal.
If setting this option does not work (produces a colorless UI) If setting this option does not work (produces a colorless UI)
reading |xterm-true-color| might help. reading |xterm-true-color| might help.
NOTE: This option is reset when 'compatible' is set.
*'terse'* *'noterse'* *'terse'* *'noterse'*
'terse' boolean (default off) 'terse' boolean (default off)
@ -8122,6 +8141,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The undo file is not read when 'undoreload' causes the buffer from The undo file is not read when 'undoreload' causes the buffer from
before a reload to be saved for undo. before a reload to be saved for undo.
When 'undofile' is turned off the undo file is NOT deleted. When 'undofile' is turned off the undo file is NOT deleted.
NOTE: This option is reset when 'compatible' is set.
*'undolevels'* *'ul'* *'undolevels'* *'ul'*
'undolevels' 'ul' number (default 100, 1000 for Unix, VMS, 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS,
@ -8377,6 +8397,8 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons. security reasons.
NOTE: This option is set to the Vim default value when 'compatible'
is reset.
*'virtualedit'* *'ve'* *'virtualedit'* *'ve'*
'virtualedit' 've' string (default "") 'virtualedit' 've' string (default "")
@ -8405,6 +8427,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The `g$` command will move to the end of the screen line. The `g$` command will move to the end of the screen line.
It doesn't make sense to combine "all" with "onemore", but you will It doesn't make sense to combine "all" with "onemore", but you will
not get a warning for it. not get a warning for it.
NOTE: This option is set to "" when 'compatible' is set.
*'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep* *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep*
'visualbell' 'vb' boolean (default off) 'visualbell' 'vb' boolean (default off)

View File

@ -872,8 +872,8 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
inside the Visual area put it at the start and just before the end of inside the Visual area put it at the start and just before the end of
the pattern, e.g.: > the pattern, e.g.: >
/\%Vfoo.*ba\%Vr /\%Vfoo.*ba\%Vr
< This works if "foo bar" (or more) was Visually selected. This: > < This also works if only "foo bar" was Visually selected. This: >
/\%Vfoo.*ba\%Vr /\%Vfoo.*bar\%V
< would match "foo bar" if the Visual selection continues after the "r". < would match "foo bar" if the Visual selection continues after the "r".
Only works for the current buffer. Only works for the current buffer.

View File

@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.0. Last change: 2016 Nov 04 *quickfix.txt* For Vim version 8.0. Last change: 2017 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -45,10 +45,13 @@ The 'errorformat' option should be set to match the error messages from your
compiler (see |errorformat| below). compiler (see |errorformat| below).
*location-list* *E776* *location-list* *E776*
A location list is similar to a quickfix list and contains a list of positions A location list is a window-local quickfix list. You get one after commands
in files. A location list is associated with a window and each window can like `:lvimgrep`, `:lgrep`, `:lhelpgrep`, `:lmake`, etc., which create a
have a separate location list. A location list can be associated with only location list instead of a quickfix list as the corresponding `:vimgrep`,
one window. The location list is independent of the quickfix list. `:grep`, `:helpgrep`, `:make` do.
A location list is associated with a window and each window can have a
separate location list. A location list can be associated with only one
window. The location list is independent of the quickfix list.
When a window with a location list is split, the new window gets a copy of the When a window with a location list is split, the new window gets a copy of the
location list. When there are no longer any references to a location list, location list. When there are no longer any references to a location list,

View File

@ -427,6 +427,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'macatsui' options.txt /*'macatsui'* 'macatsui' options.txt /*'macatsui'*
'magic' options.txt /*'magic'* 'magic' options.txt /*'magic'*
'makeef' options.txt /*'makeef'* 'makeef' options.txt /*'makeef'*
'makeencoding' options.txt /*'makeencoding'*
'makeprg' options.txt /*'makeprg'* 'makeprg' options.txt /*'makeprg'*
'mat' options.txt /*'mat'* 'mat' options.txt /*'mat'*
'matchpairs' options.txt /*'matchpairs'* 'matchpairs' options.txt /*'matchpairs'*
@ -439,6 +440,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'maxmemtot' options.txt /*'maxmemtot'* 'maxmemtot' options.txt /*'maxmemtot'*
'mco' options.txt /*'mco'* 'mco' options.txt /*'mco'*
'mef' options.txt /*'mef'* 'mef' options.txt /*'mef'*
'menc' options.txt /*'menc'*
'menuitems' options.txt /*'menuitems'* 'menuitems' options.txt /*'menuitems'*
'mesg' vi_diff.txt /*'mesg'* 'mesg' vi_diff.txt /*'mesg'*
'mfd' options.txt /*'mfd'* 'mfd' options.txt /*'mfd'*
@ -5348,6 +5350,7 @@ cino-: indent.txt /*cino-:*
cino-= indent.txt /*cino-=* cino-= indent.txt /*cino-=*
cino-> indent.txt /*cino->* cino-> indent.txt /*cino->*
cino-C indent.txt /*cino-C* cino-C indent.txt /*cino-C*
cino-E indent.txt /*cino-E*
cino-J indent.txt /*cino-J* cino-J indent.txt /*cino-J*
cino-L indent.txt /*cino-L* cino-L indent.txt /*cino-L*
cino-M indent.txt /*cino-M* cino-M indent.txt /*cino-M*
@ -7887,6 +7890,7 @@ python-bindeval if_pyth.txt /*python-bindeval*
python-bindeval-objects if_pyth.txt /*python-bindeval-objects* python-bindeval-objects if_pyth.txt /*python-bindeval-objects*
python-buffer if_pyth.txt /*python-buffer* python-buffer if_pyth.txt /*python-buffer*
python-buffers if_pyth.txt /*python-buffers* python-buffers if_pyth.txt /*python-buffers*
python-building if_pyth.txt /*python-building*
python-chdir if_pyth.txt /*python-chdir* python-chdir if_pyth.txt /*python-chdir*
python-command if_pyth.txt /*python-command* python-command if_pyth.txt /*python-command*
python-commands if_pyth.txt /*python-commands* python-commands if_pyth.txt /*python-commands*
@ -8744,7 +8748,6 @@ termresponse-variable eval.txt /*termresponse-variable*
test-functions usr_41.txt /*test-functions* test-functions usr_41.txt /*test-functions*
test_alloc_fail() eval.txt /*test_alloc_fail()* test_alloc_fail() eval.txt /*test_alloc_fail()*
test_autochdir() eval.txt /*test_autochdir()* test_autochdir() eval.txt /*test_autochdir()*
test_disable_char_avail() eval.txt /*test_disable_char_avail()*
test_garbagecollect_now() eval.txt /*test_garbagecollect_now()* test_garbagecollect_now() eval.txt /*test_garbagecollect_now()*
test_ignore_error() eval.txt /*test_ignore_error()* test_ignore_error() eval.txt /*test_ignore_error()*
test_null_channel() eval.txt /*test_null_channel()* test_null_channel() eval.txt /*test_null_channel()*
@ -8753,6 +8756,7 @@ test_null_job() eval.txt /*test_null_job()*
test_null_list() eval.txt /*test_null_list()* test_null_list() eval.txt /*test_null_list()*
test_null_partial() eval.txt /*test_null_partial()* test_null_partial() eval.txt /*test_null_partial()*
test_null_string() eval.txt /*test_null_string()* test_null_string() eval.txt /*test_null_string()*
test_override() eval.txt /*test_override()*
test_settime() eval.txt /*test_settime()* test_settime() eval.txt /*test_settime()*
testing eval.txt /*testing* testing eval.txt /*testing*
testing-variable eval.txt /*testing-variable* testing-variable eval.txt /*testing-variable*

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.0. Last change: 2017 Mar 05 *todo.txt* For Vim version 8.0. Last change: 2017 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -35,6 +35,12 @@ entered there will not be repeated below, unless there is extra information.
*known-bugs* *known-bugs*
-------------------- Known bugs and current work ----------------------- -------------------- Known bugs and current work -----------------------
Using "g<" after ":for x in [1,2,3]|echom x|endfor" looks wrong. (Marcin
Szamotulski, 2017 Mar 12)
Also, using Ctrl-C clears the last part.
Test 45 fails on MS-Windows only before resetting 'sw'. Why?
+channel: +channel:
- Try out background make plugin: - Try out background make plugin:
https://github.com/AndrewVos/vim-make-background https://github.com/AndrewVos/vim-make-background
@ -110,6 +116,14 @@ manager. Problem with Motif?
Memory leak in test97? The string is actually freed. Weird. Memory leak in test97? The string is actually freed. Weird.
Include rust files. Got all permissions?
dict_add_list and dict_add_dict may free item when failing. (2017 Mar 12,
Nikolai Pavlov, #1555)
Patch to add buffer name argument to taglist().
Ordering of tags in result of taglist call. (Duncan McDougall, #1194)
Add a toolbar in the terminal. Can be global, above all windows, or specific Add a toolbar in the terminal. Can be global, above all windows, or specific
for one window. for one window.
Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}]) Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
@ -121,18 +135,23 @@ What if there is an invalid character?
Json string with trailing \u should be an error. (Lcd) Json string with trailing \u should be an error. (Lcd)
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5)
Another example 2017 Mar 10.
Multi-byte bug: dv} splits char. (Urtica Dioica, 2017 Jan 9) Multi-byte bug: dv} splits char. (Urtica Dioica, 2017 Jan 9)
When session file has name in argument list but the buffer was deleted, the When session file has name in argument list but the buffer was deleted, the
buffer is not deleted when using the session file. (#1393) buffer is not deleted when using the session file. (#1393)
Should add the buffer in hidden state. Should add the buffer in hidden state.
When "gf" excludes following ":99", jump to line 99.
Also when editing a file foo.txt:99 ?
When an item in the quickfix list has a file name that does not exist, behave When an item in the quickfix list has a file name that does not exist, behave
like the item was not a match for :cnext. like the item was not a match for :cnext.
Patch to test regexp classes. (Dominique, 2017 Mar 13, #1560)
Do we need to adjust the implementation?
Make different classes that depend on the system and that don't.
Wrong diff highlighting with three files. (2016 Oct 20, #1186) Wrong diff highlighting with three files. (2016 Oct 20, #1186)
Also get E749 on exit. Also get E749 on exit.
Another example in #1309 Another example in #1309
@ -146,19 +165,11 @@ already typed. (Dominique, 2017 Jan 26)
When deleting a mark or register, leave a tombstone, so that it's also deleted When deleting a mark or register, leave a tombstone, so that it's also deleted
when writing viminfo (and the delete was the most recent action). #1339 when writing viminfo (and the delete was the most recent action). #1339
Patch to add 'makeencoding', useful when the system encoding differs from
Vim's 'encoding' setting. (Ken Takata, 2017 Jan 31)
Patch to adjust marks when adding a new line to the end of buffer in diff
mode. (James McCoy, 2016 Dec 14, #1329)
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15, Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
#1330) #1330)
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17) Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
Patch to fix that test87 fails on Arch Linux. (Jesin, 2017 Feb 10)
Completion for :!cmd shows each match twice. #1435 Completion for :!cmd shows each match twice. #1435
GTK: When adding a timer from 'balloonexpr' it won't fire, because GTK: When adding a timer from 'balloonexpr' it won't fire, because
@ -176,14 +187,18 @@ highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11)
Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca
Fuentes, 2017 Feb 12, #1470) Fuentes, 2017 Feb 12, #1470)
Check for errors E704 and E705 only does VAR_FUNC, should also do VAR_PARTIAL.
(Nikolai Pavlov, 2017 Mar 13, #1557)
Make a function to check for function-like type?
Screen updated delayed when using CTRL-O u in Insert mode. Screen updated delayed when using CTRL-O u in Insert mode.
(Barlik, #1191) Perhaps because status message? (Barlik, #1191) Perhaps because status message?
Patch to add buffer name argument to taglist(). Implement optional arguments for functions.
Ordering of tags in result of taglist call. (Duncan McDougall, #1194) func Foo(start, count = 1 all = 1)
call Foo(12)
Patch to fix that b_ind_has_comment is not correctly reset. (Christian call Foo(12, all = 0)
Brabandt, 2017 Feb 14, closes #1475) call Foo(12, 15, 0)
writefile() does not abort as soon as an error is found. (Nikolai Pavlov, writefile() does not abort as soon as an error is found. (Nikolai Pavlov,
2017 Feb 14, #1476) 2017 Feb 14, #1476)
@ -237,9 +252,6 @@ Useful to restore it. Is there another solution?
"ci[" does not look for next [ like ci" does look for next ". "ci[" does not look for next [ like ci" does look for next ".
(J.F. 2017 Jan 7) (J.F. 2017 Jan 7)
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5)
Patch for wrong cursor position on wrapped line, involving breakindent. Patch for wrong cursor position on wrapped line, involving breakindent.
(Ozaki Kiichi, 2016 Nov 25) (Ozaki Kiichi, 2016 Nov 25)
Does this also fix #1408 ? Does this also fix #1408 ?
@ -261,9 +273,6 @@ Patch to make it possible to extend a list with itself.
Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24) Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
Patch to add new regexp classes :ident:, :keyword:, :fname:.
(ichizok, 2016 Jan 12, #1373)
Patch to add trim() function. (Bukn, 2016 Nov 25, #1280) Patch to add trim() function. (Bukn, 2016 Nov 25, #1280)
Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275) Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
@ -1061,6 +1070,9 @@ Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers,
Patch to improve equivalence classes in regexp patterns. Patch to improve equivalence classes in regexp patterns.
(Christian Brabandt, 2013 Jan 16, update Jan 17) (Christian Brabandt, 2013 Jan 16, update Jan 17)
Patch to add new regexp classes :ident:, :keyword:, :fname:.
(ichizok, 2016 Jan 12, #1373)
Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24) Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24)
But use Gnome instead of GTK? But use Gnome instead of GTK?

View File

@ -1,4 +1,4 @@
*usr_02.txt* For Vim version 8.0. Last change: 2016 Jan 16 *usr_02.txt* For Vim version 8.0. Last change: 2017 Mar 14
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@ -554,7 +554,7 @@ Summary: *help-summary* >
8) Ex-commands always start with ":", so to go to the :s command help: > 8) Ex-commands always start with ":", so to go to the :s command help: >
:help :s :help :s
9) Commands specifically for debugging start with ">". To go to to the help 9) Commands specifically for debugging start with ">". To go to the help
for the "cont" debug command: > for the "cont" debug command: >
:help >cont :help >cont

View File

@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.0. Last change: 2017 Mar 01 *usr_41.txt* For Vim version 8.0. Last change: 2017 Mar 09
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@ -922,7 +922,7 @@ Testing: *test-functions*
assert_fails() assert that a function call fails assert_fails() assert that a function call fails
test_alloc_fail() make memory allocation fail test_alloc_fail() make memory allocation fail
test_autochdir() enable 'autochdir' during startup test_autochdir() enable 'autochdir' during startup
test_disable_char_avail() test without typeahead test_override() test with Vim internal overrides
test_garbagecollect_now() free memory right now test_garbagecollect_now() free memory right now
test_ignore_error() ignore a specific error message test_ignore_error() ignore a specific error message
test_null_channel() return a null Channel test_null_channel() return a null Channel

View File

@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.0. Last change: 2017 Feb 24 *version8.txt* For Vim version 8.0. Last change: 2017 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -296,7 +296,7 @@ New and extended functions: ~
|systemlist()| get the result of a shell command as a list |systemlist()| get the result of a shell command as a list
|test_alloc_fail()| make memory allocation fail |test_alloc_fail()| make memory allocation fail
|test_autochdir()| test 'autochdir' functionality |test_autochdir()| test 'autochdir' functionality
|test_disable_char_avail()| test without typeahead test_disable_char_avail() test without typeahead (removed later)
|test_garbagecollect_now()| free memory right now |test_garbagecollect_now()| free memory right now
|test_null_channel()| return a null Channel |test_null_channel()| return a null Channel
|test_null_dict()| return a null Dict |test_null_dict()| return a null Dict
@ -426,7 +426,7 @@ When no vimrc file is found, the |defaults.vim| script is loaded to set more
useful default values for new users. That includes setting 'nocompatible'. useful default values for new users. That includes setting 'nocompatible'.
Thus Vim no longer starts up in Vi compatible mode. If you do want that, Thus Vim no longer starts up in Vi compatible mode. If you do want that,
either create a .vimrc file that does "set compatible" or start Vim with either create a .vimrc file that does "set compatible" or start Vim with
"Vim -C". "vim -C".
Support removed ~ Support removed ~
@ -1866,7 +1866,7 @@ Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test60.in,
src/testdir/test60.ok src/testdir/test60.ok
Patch 7.4.237 (after 7.4.236) Patch 7.4.237 (after 7.4.236)
Problem: When some patches was not included has("patch-7.4.123") may return Problem: When some patches were not included has("patch-7.4.123") may return
true falsely. true falsely.
Solution: Check for the specific patch number. Solution: Check for the specific patch number.
Files: runtime/doc/eval.txt, src/eval.c Files: runtime/doc/eval.txt, src/eval.c

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types " Vim support file to detect file types
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Mar 04 " Last Change: 2017 Mar 13
" Listen very carefully, I will say this only once " Listen very carefully, I will say this only once
if exists("did_load_filetypes") if exists("did_load_filetypes")
@ -1366,6 +1366,9 @@ endfunc
" Not Quite C " Not Quite C
au BufNewFile,BufRead *.nqc setf nqc au BufNewFile,BufRead *.nqc setf nqc
" NSE - Nmap Script Engine - uses Lua syntax
au BufNewFile,BufRead *.nse setf lua
" NSIS " NSIS
au BufNewFile,BufRead *.nsi,*.nsh setf nsis au BufNewFile,BufRead *.nsi,*.nsh setf nsis
@ -2281,7 +2284,7 @@ au BufNewFile,BufRead .tidyrc,tidyrc setf tidy
au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
" tmux configuration " tmux configuration
au BufNewFile,BufRead tmux*.conf setf tmux au BufNewFile,BufRead {.,}tmux*.conf setf tmux
" TPP - Text Presentation Program " TPP - Text Presentation Program
au BufNewFile,BufReadPost *.tpp setf tpp au BufNewFile,BufReadPost *.tpp setf tpp

View File

@ -1,8 +1,8 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Hamster Script " Language: Hamster Script
" Version: 2.0.6.0 " Version: 2.0.6.0
" Maintainer: David Fishburn <fishburn@ianywhere.com> " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: Wed Nov 08 2006 12:03:09 PM " Last Change: 2017 Mar 07
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
@ -13,6 +13,7 @@ endif
let b:did_ftplugin = 1 let b:did_ftplugin = 1
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim
set cpo-=C set cpo-=C
let b:undo_ftplugin = "setl fo< com< tw< commentstring<" let b:undo_ftplugin = "setl fo< com< tw< commentstring<"

View File

@ -1,8 +1,8 @@
" SQL filetype plugin file " SQL filetype plugin file
" Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase) " Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase)
" Version: 11.0 " Version: 12.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2013 May 13 " Last Change: 2017 Mar 07
" Download: http://vim.sourceforge.net/script.php?script_id=454 " Download: http://vim.sourceforge.net/script.php?script_id=454
" For more details please use: " For more details please use:
@ -36,6 +36,14 @@
" "
" History " History
" "
" Version 12.0 (April 2013)
"
" NF: Added support for "BEGIN TRY ... END TRY ... BEGIN CATCH ... END CATCH
" BF: This plugin is designed to be used with other plugins to enable the
" SQL completion with Perl, Python, Java, ... The loading mechanism
" was not checking if the SQL objects were created, which can lead to
" the plugin not loading the SQL support.
"
" Version 11.0 (May 2013) " Version 11.0 (May 2013)
" "
" NF: Updated to use SyntaxComplete's new regex support for syntax groups. " NF: Updated to use SyntaxComplete's new regex support for syntax groups.
@ -80,7 +88,9 @@
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") " This ftplugin can be used with other ftplugins. So ensure loading
" happens if all elements of this plugin have not yet loaded.
if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
finish finish
endif endif
@ -171,6 +181,9 @@ if !exists("*SQL_SetType")
if exists("b:current_syntax") if exists("b:current_syntax")
" echomsg 'SQLSetType - clearing syntax' " echomsg 'SQLSetType - clearing syntax'
syntax clear syntax clear
if exists("b:current_syntax")
unlet b:current_syntax
endif
endif endif
if exists("b:did_indent") if exists("b:did_indent")
" echomsg 'SQLSetType - clearing indent' " echomsg 'SQLSetType - clearing indent'
@ -247,7 +260,8 @@ elseif exists("g:sql_type_default")
endif endif
" If the above runtime command succeeded, do not load the default settings " If the above runtime command succeeded, do not load the default settings
if exists("b:did_ftplugin") " as they should have already been loaded from a previous run.
if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
finish finish
endif endif
@ -312,13 +326,23 @@ if !exists("b:match_words")
" WHEN column_not_found THEN " WHEN column_not_found THEN
" WHEN OTHERS THEN " WHEN OTHERS THEN
" "
" begin try
" end try
" begin catch
" end catch
"
" create[ or replace] procedure|function|event " create[ or replace] procedure|function|event
" \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'. " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'.
" For ColdFusion support " For ColdFusion support
setlocal matchpairs+=<:> setlocal matchpairs+=<:>
let b:match_words = &matchpairs . let b:match_words = &matchpairs .
\ ',\<begin\>:\<end\>\W*$,'. \ ',\%(\<begin\)\%(\s\+\%(try\|catch\)\>\)\@!:\<end\>\W*$,'.
\
\ '\<begin\s\+try\>:'.
\ '\<end\s\+try\>:'.
\ '\<begin\s\+catch\>:'.
\ '\<end\s\+catch\>,'.
\ \
\ s:notend . '\<if\>:'. \ s:notend . '\<if\>:'.
\ '\<elsif\>\|\<elseif\>\|\<else\>:'. \ '\<elsif\>\|\<elseif\>\|\<else\>:'.

View File

@ -1,7 +1,8 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: Tmux config " Language: tmux(1) configuration file
" URL: https://github.com/ericpruitt/tmux.vim/
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com> " Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
" Last Change: 2017 Mar 04 " Last Changed: 2017 Mar 10
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish

View File

@ -84,7 +84,7 @@ function GetDTDIndent()
let [declaration, end] = s:lex1(line, col) let [declaration, end] = s:lex1(line, col)
if declaration == "" if declaration == ""
return indent + &sw return indent + shiftwidth()
elseif declaration == '--' elseif declaration == '--'
" Were looking at a comment. Now, simply determine if the comment is " Were looking at a comment. Now, simply determine if the comment is
" terminated or not. If it isnt, let Vim take care of that using " terminated or not. If it isnt, let Vim take care of that using
@ -100,7 +100,7 @@ function GetDTDIndent()
" Check for element name. If none exists, indent one level. " Check for element name. If none exists, indent one level.
let [name, end] = s:lex(line, end) let [name, end] = s:lex(line, end)
if name == "" if name == ""
return indent + &sw return indent + shiftwidth()
endif endif
" Check for token following element name. This can be a specification of " Check for token following element name. This can be a specification of
@ -113,7 +113,7 @@ function GetDTDIndent()
let n += 1 let n += 1
endwhile endwhile
if token == "" if token == ""
return indent + &sw return indent + shiftwidth()
endif endif
" Next comes the content model. If the token weve found isnt a " Next comes the content model. If the token weve found isnt a
@ -148,7 +148,7 @@ function GetDTDIndent()
return indent return indent
endif endif
" TODO: Should use s:lex here on getline(v:lnum) and check for >. " TODO: Should use s:lex here on getline(v:lnum) and check for >.
return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + &sw) return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + shiftwidth())
endif endif
" If weve seen an addition or exception already and this is of the same " If weve seen an addition or exception already and this is of the same
@ -167,7 +167,7 @@ function GetDTDIndent()
" Check for element name. If none exists, indent one level. " Check for element name. If none exists, indent one level.
let [name, end] = s:lex(line, end) let [name, end] = s:lex(line, end)
if name == "" if name == ""
return indent + &sw return indent + shiftwidth()
endif endif
" Check for any number of attributes. " Check for any number of attributes.
@ -180,7 +180,7 @@ function GetDTDIndent()
let [name, end] = s:lex(line, end) let [name, end] = s:lex(line, end)
if name == "" if name == ""
" TODO: Should use s:lex here on getline(v:lnum) and check for >. " TODO: Should use s:lex here on getline(v:lnum) and check for >.
return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw) return getline(v:lnum) =~ '^\s*>' ? indent : (indent + shiftwidth())
elseif name == ">" elseif name == ">"
return indent return indent
endif endif
@ -194,14 +194,14 @@ function GetDTDIndent()
" (CDATA|NMTOKEN|NMTOKENS|ID|IDREF|IDREFS|ENTITY|ENTITIES)? " (CDATA|NMTOKEN|NMTOKENS|ID|IDREF|IDREFS|ENTITY|ENTITIES)?
let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)')
if value == "" if value == ""
return indent + &sw * 2 return indent + shiftwidth() * 2
elseif value == 'NOTATION' elseif value == 'NOTATION'
" If this is a enumerated value based on notations, read another token " If this is a enumerated value based on notations, read another token
" for the actual value. If it doesnt exist, indent three levels. " for the actual value. If it doesnt exist, indent three levels.
" TODO: If validating according to above, value must be equal to '('. " TODO: If validating according to above, value must be equal to '('.
let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)')
if value == "" if value == ""
return indent + &sw * 3 return indent + shiftwidth() * 3
endif endif
endif endif
@ -216,13 +216,13 @@ function GetDTDIndent()
" two levels. " two levels.
let [default, end] = s:lex(line, end, '^\%("\_[^"]*"\|#\(REQUIRED\|IMPLIED\|FIXED\)\)') let [default, end] = s:lex(line, end, '^\%("\_[^"]*"\|#\(REQUIRED\|IMPLIED\|FIXED\)\)')
if default == "" if default == ""
return indent + &sw * 2 return indent + shiftwidth() * 2
elseif default == '#FIXED' elseif default == '#FIXED'
" We need to look for the fixed value. If non exists, indent three " We need to look for the fixed value. If non exists, indent three
" levels. " levels.
let [default, end] = s:lex(line, end, '^"\_[^"]*"') let [default, end] = s:lex(line, end, '^"\_[^"]*"')
if default == "" if default == ""
return indent + &sw * 3 return indent + shiftwidth() * 3
endif endif
endif endif
endwhile endwhile
@ -233,11 +233,11 @@ function GetDTDIndent()
" again, if none exists, indent one level. " again, if none exists, indent one level.
let [name, end] = s:lex(line, end) let [name, end] = s:lex(line, end)
if name == "" if name == ""
return indent + &sw return indent + shiftwidth()
elseif name == '%' elseif name == '%'
let [name, end] = s:lex(line, end) let [name, end] = s:lex(line, end)
if name == "" if name == ""
return indent + &sw return indent + shiftwidth()
endif endif
endif endif
@ -256,27 +256,27 @@ function GetDTDIndent()
" were now done with this entity. " were now done with this entity.
let [value, end] = s:lex(line, end) let [value, end] = s:lex(line, end)
if value == "" if value == ""
return indent + &sw return indent + shiftwidth()
elseif value == 'SYSTEM' || value == 'PUBLIC' elseif value == 'SYSTEM' || value == 'PUBLIC'
let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)')
if quoted_string == "" if quoted_string == ""
return indent + &sw * 2 return indent + shiftwidth() * 2
endif endif
if value == 'PUBLIC' if value == 'PUBLIC'
let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)')
if quoted_string == "" if quoted_string == ""
return indent + &sw * 2 return indent + shiftwidth() * 2
endif endif
endif endif
let [ndata, end] = s:lex(line, end) let [ndata, end] = s:lex(line, end)
if ndata == "" if ndata == ""
return indent + &sw return indent + shiftwidth()
endif endif
let [name, end] = s:lex(line, end) let [name, end] = s:lex(line, end)
return name == "" ? (indent + &sw * 2) : indent return name == "" ? (indent + shiftwidth() * 2) : indent
else else
return indent return indent
endif endif
@ -284,24 +284,24 @@ function GetDTDIndent()
" Check for notation name. If none exists, indent one level. " Check for notation name. If none exists, indent one level.
let [name, end] = s:lex(line, end) let [name, end] = s:lex(line, end)
if name == "" if name == ""
return indent + &sw return indent + shiftwidth()
endif endif
" Now check for the external ID. If none exists, indent one level. " Now check for the external ID. If none exists, indent one level.
let [id, end] = s:lex(line, end) let [id, end] = s:lex(line, end)
if id == "" if id == ""
return indent + &sw return indent + shiftwidth()
elseif id == 'SYSTEM' || id == 'PUBLIC' elseif id == 'SYSTEM' || id == 'PUBLIC'
let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)')
if quoted_string == "" if quoted_string == ""
return indent + &sw * 2 return indent + shiftwidth() * 2
endif endif
if id == 'PUBLIC' if id == 'PUBLIC'
let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\|>\)') let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\|>\)')
if quoted_string == "" if quoted_string == ""
" TODO: Should use s:lex here on getline(v:lnum) and check for >. " TODO: Should use s:lex here on getline(v:lnum) and check for >.
return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw * 2) return getline(v:lnum) =~ '^\s*>' ? indent : (indent + shiftwidth() * 2)
elseif quoted_string == '>' elseif quoted_string == '>'
return indent return indent
endif endif

View File

@ -2,9 +2,10 @@
" Language: Eiffel " Language: Eiffel
" Maintainer: Jocelyn Fiat <jfiat@eiffel.com> " Maintainer: Jocelyn Fiat <jfiat@eiffel.com>
" Previous-Maintainer: David Clarke <gadicath@dishevelled.net> " Previous-Maintainer: David Clarke <gadicath@dishevelled.net>
" Contributions from: Takuya Fujiwara
" Contributions from: Thilo Six " Contributions from: Thilo Six
" $Date: 2004/12/09 21:33:52 $ " $Date: 2017/03/08 06:00:00 $
" $Revision: 1.3 $ " $Revision: 1.4 $
" URL: https://github.com/eiffelhub/vim-eiffel " URL: https://github.com/eiffelhub/vim-eiffel
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
@ -28,7 +29,7 @@ let b:undo_indent = "setl smartindent< indentkeys< indentexpr< autoindent< comme
" Define some stuff " Define some stuff
" keywords grouped by indenting " keywords grouped by indenting
let s:trust_user_indent = '\(+\)\(\s*\(--\).*\)\=$' let s:trust_user_indent = '\(+\)\(\s*\(--\).*\)\=$'
let s:relative_indent = '^\s*\(deferred\|class\|feature\|creation\|inherit\|loop\|from\|until\|if\|else\|elseif\|ensure\|require\|check\|do\|local\|invariant\|variant\|rename\|redefine\|do\|export\)\>' let s:relative_indent = '^\s*\(deferred\|class\|feature\|creation\|inherit\|loop\|from\|across\|until\|if\|else\|elseif\|ensure\|require\|check\|do\|local\|invariant\|variant\|rename\|redefine\|do\|export\)\>'
let s:outdent = '^\s*\(else\|invariant\|variant\|do\|require\|until\|loop\|local\)\>' let s:outdent = '^\s*\(else\|invariant\|variant\|do\|require\|until\|loop\|local\)\>'
let s:no_indent = '^\s*\(class\|feature\|creation\|inherit\)\>' let s:no_indent = '^\s*\(class\|feature\|creation\|inherit\)\>'
let s:single_dent = '^[^-]\+[[:alnum:]]\+ is\(\s*\(--\).*\)\=$' let s:single_dent = '^[^-]\+[[:alnum:]]\+ is\(\s*\(--\).*\)\=$'
@ -63,23 +64,23 @@ function GetEiffelIndent()
" Add a 'shiftwidth' after lines that start with an indent word " Add a 'shiftwidth' after lines that start with an indent word
let ind = indent(lnum) let ind = indent(lnum)
if getline(lnum) =~ s:relative_indent if getline(lnum) =~ s:relative_indent
let ind = ind + &sw let ind = ind + shiftwidth()
endif endif
" Indent to single indent " Indent to single indent
if getline(v:lnum) =~ s:single_dent && getline(v:lnum) !~ s:relative_indent if getline(v:lnum) =~ s:single_dent && getline(v:lnum) !~ s:relative_indent
\ && getline(v:lnum) !~ '\s*\<\(and\|or\|implies\)\>' \ && getline(v:lnum) !~ '\s*\<\(and\|or\|implies\)\>'
let ind = &sw let ind = shiftwidth()
endif endif
" Indent to double indent " Indent to double indent
if getline(v:lnum) =~ s:inheritance_dent if getline(v:lnum) =~ s:inheritance_dent
let ind = 2 * &sw let ind = 2 * shiftwidth()
endif endif
" Indent line after the first line of the function definition " Indent line after the first line of the function definition
if getline(lnum) =~ s:single_dent if getline(lnum) =~ s:single_dent
let ind = ind + &sw let ind = ind + shiftwidth()
endif endif
" The following should always be at the start of a line, no indenting " The following should always be at the start of a line, no indenting
@ -91,17 +92,17 @@ function GetEiffelIndent()
" or first thing after the 'do' " or first thing after the 'do'
if getline(v:lnum) =~ s:outdent && getline(v:lnum - 1) !~ s:single_dent if getline(v:lnum) =~ s:outdent && getline(v:lnum - 1) !~ s:single_dent
\ && getline(v:lnum - 1) !~ '^\s*do\>' \ && getline(v:lnum - 1) !~ '^\s*do\>'
let ind = ind - &sw let ind = ind - shiftwidth()
endif endif
" Subtract a shiftwidth for end statements " Subtract a shiftwidth for end statements
if getline(v:lnum) =~ '^\s*end\>' if getline(v:lnum) =~ '^\s*end\>'
let ind = ind - &sw let ind = ind - shiftwidth()
endif endif
" set indent of zero end statements that are at an indent of 3, this should " set indent of zero end statements that are at an indent of 3, this should
" only ever be the class's end. " only ever be the class's end.
if getline(v:lnum) =~ '^\s*end\>' && ind == &sw if getline(v:lnum) =~ '^\s*end\>' && ind == shiftwidth()
let ind = 0 let ind = 0
endif endif

View File

@ -25,11 +25,11 @@ function GetEtermIndent()
let ind = indent(lnum) let ind = indent(lnum)
if getline(lnum) =~ '^\s*begin\>' if getline(lnum) =~ '^\s*begin\>'
let ind = ind + &sw let ind = ind + shiftwidth()
endif endif
if getline(v:lnum) =~ '^\s*end\>' if getline(v:lnum) =~ '^\s*end\>'
let ind = ind - &sw let ind = ind - shiftwidth()
endif endif
return ind return ind

View File

@ -30,11 +30,11 @@ function GetFrameScriptIndent()
let ind = indent(lnum) let ind = indent(lnum)
if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)' if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)'
let ind = ind + &sw let ind = ind + shiftwidth()
endif endif
if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)' if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)'
let ind = ind - &sw let ind = ind - shiftwidth()
endif endif
return ind return ind

View File

@ -1,12 +1,14 @@
" Vim indent file " Vim indent file
" Language: Java " Language: Java
" Previous Maintainer: Toby Allsopp <toby.allsopp@peace.com> " Previous Maintainer: Toby Allsopp <toby.allsopp@peace.com>
" Current Maintainer: Hong Xu <xuhdev@gmail.com> " Current Maintainer: Hong Xu <hong@topbug.net>
" Last Change: 2012 May 18 " Homepage: http://www.vim.org/scripts/script.php?script_id=3899
" Version: 1.0 " https://github.com/xuhdev/indent-java.vim
" Last Change: 2016 Mar 7
" Version: 1.1
" License: Same as Vim. " License: Same as Vim.
" Copyright (c) 2012 Hong Xu " Copyright (c) 2012-2016 Hong Xu
" Before 2012, this file is maintained by Toby Allsopp. " Before 2012, this file was maintained by Toby Allsopp.
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -29,6 +31,7 @@ let b:undo_indent = "set cin< cino< indentkeys< indentexpr<"
if exists("*GetJavaIndent") if exists("*GetJavaIndent")
finish finish
endif endif
let s:keepcpo= &cpo let s:keepcpo= &cpo
set cpo&vim set cpo&vim
@ -70,7 +73,7 @@ function GetJavaIndent()
" If the previous line starts with '@', we should have the same indent as " If the previous line starts with '@', we should have the same indent as
" the previous one " the previous one
if getline(lnum) =~ '^\s*@\S\+\s*$' if getline(lnum) =~ '^\s*@.*$'
return indent(lnum) return indent(lnum)
endif endif
@ -85,9 +88,9 @@ function GetJavaIndent()
" Try to align "throws" lines for methods and "extends" and "implements" for " Try to align "throws" lines for methods and "extends" and "implements" for
" classes. " classes.
if getline(v:lnum) =~ '^\s*\(extends\|implements\)\>' if getline(v:lnum) =~ '^\s*\(throws\|extends\|implements\)\>'
\ && getline(lnum) !~ '^\s*\(extends\|implements\)\>' \ && getline(lnum) !~ '^\s*\(throws\|extends\|implements\)\>'
let theIndent = theIndent + &sw let theIndent = theIndent + shiftwidth()
endif endif
" correct for continuation lines of "throws", "implements" and "extends" " correct for continuation lines of "throws", "implements" and "extends"
@ -96,27 +99,27 @@ function GetJavaIndent()
if strlen(cont_kw) > 0 if strlen(cont_kw) > 0
let amount = strlen(cont_kw) + 1 let amount = strlen(cont_kw) + 1
if getline(lnum) !~ ',\s*$' if getline(lnum) !~ ',\s*$'
let theIndent = theIndent - (amount + &sw) let theIndent = theIndent - (amount + shiftwidth())
if theIndent < 0 if theIndent < 0
let theIndent = 0 let theIndent = 0
endif endif
elseif prev == lnum elseif prev == lnum
let theIndent = theIndent + amount let theIndent = theIndent + amount
if cont_kw ==# 'throws' if cont_kw ==# 'throws'
let theIndent = theIndent + &sw let theIndent = theIndent + shiftwidth()
endif endif
endif endif
elseif getline(prev) =~ '^\s*\(throws\|implements\|extends\)\>' elseif getline(prev) =~ '^\s*\(throws\|implements\|extends\)\>'
\ && (getline(prev) =~ '{\s*$' \ && (getline(prev) =~ '{\s*$'
\ || getline(v:lnum) =~ '^\s*{\s*$') \ || getline(v:lnum) =~ '^\s*{\s*$')
let theIndent = theIndent - &sw let theIndent = theIndent - shiftwidth()
endif endif
" When the line starts with a }, try aligning it with the matching {, " When the line starts with a }, try aligning it with the matching {,
" skipping over "throws", "extends" and "implements" clauses. " skipping over "throws", "extends" and "implements" clauses.
if getline(v:lnum) =~ '^\s*}\s*\(//.*\|/\*.*\)\=$' if getline(v:lnum) =~ '^\s*}\s*\(//.*\|/\*.*\)\=$'
call cursor(v:lnum, 1) call cursor(v:lnum, 1)
silent normal % silent normal! %
let lnum = line('.') let lnum = line('.')
if lnum < v:lnum if lnum < v:lnum
while lnum > 1 while lnum > 1

View File

@ -65,7 +65,7 @@ function GetLDIndent()
if line =~ '^\s*\*' if line =~ '^\s*\*'
return cindent(v:lnum) return cindent(v:lnum)
elseif line =~ '^\s*}' elseif line =~ '^\s*}'
return indent(v:lnum) - &sw return indent(v:lnum) - shiftwidth()
endif endif
let pnum = s:prevnonblanknoncomment(v:lnum - 1) let pnum = s:prevnonblanknoncomment(v:lnum - 1)
@ -73,11 +73,11 @@ function GetLDIndent()
return 0 return 0
endif endif
let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
let pline = getline(pnum) let pline = getline(pnum)
if pline =~ '}\s*$' if pline =~ '}\s*$'
let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth()
endif endif
return ind return ind

View File

@ -48,14 +48,14 @@ function GetMakeIndent()
if prev_prev_line =~ s:continuation_rx if prev_prev_line =~ s:continuation_rx
return indent(prev_lnum) return indent(prev_lnum)
elseif prev_line =~ s:rule_rx elseif prev_line =~ s:rule_rx
return &sw return shiftwidth()
elseif prev_line =~ s:assignment_rx elseif prev_line =~ s:assignment_rx
call cursor(prev_lnum, 1) call cursor(prev_lnum, 1)
if search(s:assignment_rx, 'W') != 0 if search(s:assignment_rx, 'W') != 0
return virtcol('.') - 1 return virtcol('.') - 1
else else
" TODO: ? " TODO: ?
return &sw return shiftwidth()
endif endif
else else
" TODO: OK, this might be a continued shell command, so perhaps indent " TODO: OK, this might be a continued shell command, so perhaps indent
@ -66,7 +66,7 @@ function GetMakeIndent()
" return indent(prev_lnum) + 2 " return indent(prev_lnum) + 2
" endif " endif
"endif "endif
return indent(prev_lnum) + &sw return indent(prev_lnum) + shiftwidth()
endif endif
elseif prev_prev_line =~ s:continuation_rx elseif prev_prev_line =~ s:continuation_rx
let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line) let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line)
@ -102,13 +102,13 @@ function GetMakeIndent()
return &ts return &ts
endif endif
elseif prev_line =~ s:conditional_directive_rx elseif prev_line =~ s:conditional_directive_rx
return &sw return shiftwidth()
else else
let line = getline(v:lnum) let line = getline(v:lnum)
if line =~ s:just_inserted_rule_rx if line =~ s:just_inserted_rule_rx
return 0 return 0
elseif line =~ s:end_conditional_directive_rx elseif line =~ s:end_conditional_directive_rx
return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - &sw return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - shiftwidth()
else else
return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1)
endif endif

View File

@ -25,11 +25,11 @@ function GetReadlineIndent()
let ind = indent(lnum) let ind = indent(lnum)
if getline(lnum) =~ '^\s*$\(if\|else\)\>' if getline(lnum) =~ '^\s*$\(if\|else\)\>'
let ind = ind + &sw let ind = ind + shiftwidth()
endif endif
if getline(v:lnum) =~ '^\s*$\(else\|endif\)\>' if getline(v:lnum) =~ '^\s*$\(else\|endif\)\>'
let ind = ind - &sw let ind = ind - shiftwidth()
endif endif
return ind return ind

138
runtime/indent/sas.vim Normal file
View File

@ -0,0 +1,138 @@
" Vim indent file
" Language: SAS
" Maintainer: Zhen-Huan Hu <wildkeny@gmail.com>
" Version: 3.0.1
" Last Change: Mar 13, 2017
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetSASIndent()
setlocal indentkeys+=;,=~data,=~proc,=~macro
if exists("*GetSASIndent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Regex that captures the start of a data/proc section
let s:section_str = '\v%(^|;)\s*%(data|proc)>'
" Regex that captures the end of a run-processing section
let s:section_run = '\v%(^|;)\s*run\s*;'
" Regex that captures the end of a data/proc section
let s:section_end = '\v%(^|;)\s*%(quit|enddata)\s*;'
" Regex that captures the start of a control block (anything inside a section)
let s:block_str = '\v<%(do>%([^;]+<%(to|over)>[^;]+)=|%(define|layout|method|select)>[^;]+|begingraph)\s*;'
" Regex that captures the end of a control block (anything inside a section)
let s:block_end = '\v<%(end|endlayout|endgraph)\s*;'
" Regex that captures the start of a macro
let s:macro_str = '\v%(^|;)\s*\%macro>'
" Regex that captures the end of a macro
let s:macro_end = '\v%(^|;)\s*\%mend\s*;'
" Regex that defines the end of the program
let s:program_end = '\v%(^|;)\s*endsas\s*;'
" List of procs supporting run-processing
let s:run_processing_procs = [
\ 'catalog', 'chart', 'datasets', 'document', 'ds2', 'plot', 'sql',
\ 'gareabar', 'gbarline', 'gchart', 'gkpi', 'gmap', 'gplot', 'gradar', 'greplay', 'gslide', 'gtile',
\ 'anova', 'arima', 'catmod', 'factex', 'glm', 'model', 'optex', 'plan', 'reg',
\ 'iml',
\ ]
" Find the line number of previous keyword defined by the regex
function! s:PrevMatch(lnum, regex)
let prev_lnum = prevnonblank(a:lnum - 1)
while prev_lnum > 0
let prev_line = getline(prev_lnum)
if prev_line =~ a:regex
break
else
let prev_lnum = prevnonblank(prev_lnum - 1)
endif
endwhile
return prev_lnum
endfunction
" Main function
function! GetSASIndent()
let prev_lnum = prevnonblank(v:lnum - 1)
if prev_lnum ==# 0
" Leave the indentation of the first line unchanged
return indent(1)
else
let prev_line = getline(prev_lnum)
" Previous non-blank line contains the start of a macro/section/block
" while not the end of a macro/section/block (at the same line)
if (prev_line =~ s:section_str && prev_line !~ s:section_run && prev_line !~ s:section_end) ||
\ (prev_line =~ s:block_str && prev_line !~ s:block_end) ||
\ (prev_line =~ s:macro_str && prev_line !~ s:macro_end)
let ind = indent(prev_lnum) + &sts
elseif prev_line =~ s:section_run && prev_line !~ s:section_end
let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str)
let prev_section_end_lnum = max([
\ s:PrevMatch(v:lnum, s:section_end),
\ s:PrevMatch(v:lnum, s:macro_end ),
\ s:PrevMatch(v:lnum, s:program_end)])
" Check if the section supports run-processing
if prev_section_end_lnum < prev_section_str_lnum &&
\ getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' .
\ join(s:run_processing_procs, '|') . ')>'
let ind = indent(prev_lnum) + &sts
else
let ind = indent(prev_lnum)
endif
else
let ind = indent(prev_lnum)
endif
endif
" Re-adjustments based on the inputs of the current line
let curr_line = getline(v:lnum)
if curr_line =~ s:program_end
" End of the program
" Same indentation as the first non-blank line
return indent(nextnonblank(1))
elseif curr_line =~ s:macro_end
" Current line is the end of a macro
" Match the indentation of the start of the macro
return indent(s:PrevMatch(v:lnum, s:macro_str))
elseif curr_line =~ s:block_end && curr_line !~ s:block_str
" Re-adjust if current line is the end of a block
" while not the beginning of a block (at the same line)
" Returning the indent of previous block start directly
" would not work due to nesting
let ind = ind - &sts
elseif curr_line =~ s:section_str || curr_line =~ s:section_run || curr_line =~ s:section_end
" Re-adjust if current line is the start/end of a section
" since the end of a section could be inexplicit
let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str)
" Check if the previous section supports run-processing
if getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' .
\ join(s:run_processing_procs, '|') . ')>'
let prev_section_end_lnum = max([
\ s:PrevMatch(v:lnum, s:section_end),
\ s:PrevMatch(v:lnum, s:macro_end ),
\ s:PrevMatch(v:lnum, s:program_end)])
else
let prev_section_end_lnum = max([
\ s:PrevMatch(v:lnum, s:section_end),
\ s:PrevMatch(v:lnum, s:section_run),
\ s:PrevMatch(v:lnum, s:macro_end ),
\ s:PrevMatch(v:lnum, s:program_end)])
endif
if prev_section_end_lnum < prev_section_str_lnum
let ind = ind - &sts
endif
endif
return ind
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -412,24 +412,24 @@ function! GetScalaIndent()
if prevline =~ '^\s*\.' if prevline =~ '^\s*\.'
return ind return ind
else else
return ind + &shiftwidth return ind + shiftwidth()
endif endif
endif endif
" Indent html literals " Indent html literals
if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$' if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$'
call scala#ConditionalConfirm("3") call scala#ConditionalConfirm("3")
return ind + &shiftwidth return ind + shiftwidth()
endif endif
" assumes curly braces around try-block " assumes curly braces around try-block
if curline =~ '^\s*}\s*\<catch\>' if curline =~ '^\s*}\s*\<catch\>'
return ind - &shiftwidth return ind - shiftwidth()
elseif curline =~ '^\s*\<catch\>' elseif curline =~ '^\s*\<catch\>'
return ind return ind
endif endif
" Add a 'shiftwidth' after lines that start a block " Add a shiftwidth()' after lines that start a block
" If 'if', 'for' or 'while' end with ), this is a one-line block " If 'if', 'for' or 'while' end with ), this is a one-line block
" If 'val', 'var', 'def' end with =, this is a one-line block " If 'val', 'var', 'def' end with =, this is a one-line block
if (prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups(prevline) <= 1) if (prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups(prevline) <= 1)
@ -438,7 +438,7 @@ function! GetScalaIndent()
\ || prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$' \ || prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$'
\ || prevline =~ '=\s*$' \ || prevline =~ '=\s*$'
call scala#ConditionalConfirm("4") call scala#ConditionalConfirm("4")
let ind = ind + &shiftwidth let ind = ind + shiftwidth()
elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\<else\>' elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\<else\>'
return ind return ind
endif endif
@ -447,7 +447,7 @@ function! GetScalaIndent()
let bracketCount = scala#CountBrackets(prevline, '{', '}') let bracketCount = scala#CountBrackets(prevline, '{', '}')
if bracketCount > 0 || prevline =~ '.*{\s*$' if bracketCount > 0 || prevline =~ '.*{\s*$'
call scala#ConditionalConfirm("5b") call scala#ConditionalConfirm("5b")
let ind = ind + &shiftwidth let ind = ind + shiftwidth()
elseif bracketCount < 0 elseif bracketCount < 0
call scala#ConditionalConfirm("6b") call scala#ConditionalConfirm("6b")
" if the closing brace actually completes the braces entirely, then we " if the closing brace actually completes the braces entirely, then we
@ -475,7 +475,7 @@ function! GetScalaIndent()
let bracketCount = scala#CountBrackets(prevline, '(', ')') let bracketCount = scala#CountBrackets(prevline, '(', ')')
if bracketCount > 0 || prevline =~ '.*(\s*$' if bracketCount > 0 || prevline =~ '.*(\s*$'
call scala#ConditionalConfirm("5a") call scala#ConditionalConfirm("5a")
let ind = ind + &shiftwidth let ind = ind + shiftwidth()
elseif bracketCount < 0 elseif bracketCount < 0
call scala#ConditionalConfirm("6a") call scala#ConditionalConfirm("6a")
" if the closing brace actually completes the braces entirely, then we " if the closing brace actually completes the braces entirely, then we
@ -497,7 +497,7 @@ function! GetScalaIndent()
else else
" This is the only part that's different from from the '{', '}' one below " This is the only part that's different from from the '{', '}' one below
" Yup... some refactoring is necessary at some point. " Yup... some refactoring is necessary at some point.
let ind = ind + (bracketCount * &shiftwidth) let ind = ind + (bracketCount * shiftwidth())
let lineCompletedBrackets = 1 let lineCompletedBrackets = 1
endif endif
endif endif
@ -506,10 +506,10 @@ function! GetScalaIndent()
if curline =~ '^\s*}\?\s*\<else\>\%(\s\+\<if\>\s*(.*)\)\?\s*{\?\s*$' && if curline =~ '^\s*}\?\s*\<else\>\%(\s\+\<if\>\s*(.*)\)\?\s*{\?\s*$' &&
\ ! scala#LineIsCompleteIf(prevline) && \ ! scala#LineIsCompleteIf(prevline) &&
\ prevline !~ '^.*}\s*$' \ prevline !~ '^.*}\s*$'
let ind = ind - &shiftwidth let ind = ind - shiftwidth()
endif endif
" Subtract a 'shiftwidth' on '}' or html " Subtract a shiftwidth()' on '}' or html
let curCurlyCount = scala#CountCurlies(curline) let curCurlyCount = scala#CountCurlies(curline)
if curCurlyCount < 0 if curCurlyCount < 0
call scala#ConditionalConfirm("14a") call scala#ConditionalConfirm("14a")
@ -517,7 +517,7 @@ function! GetScalaIndent()
return indent(matchline) return indent(matchline)
elseif curline =~ '^\s*</[a-zA-Z][^>]*>' elseif curline =~ '^\s*</[a-zA-Z][^>]*>'
call scala#ConditionalConfirm("14c") call scala#ConditionalConfirm("14c")
return ind - &shiftwidth return ind - shiftwidth()
endif endif
let prevParenCount = scala#CountParens(prevline) let prevParenCount = scala#CountParens(prevline)
@ -529,7 +529,7 @@ function! GetScalaIndent()
let prevCurlyCount = scala#CountCurlies(prevline) let prevCurlyCount = scala#CountCurlies(prevline)
if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\<case\>' if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\<case\>'
call scala#ConditionalConfirm("16") call scala#ConditionalConfirm("16")
let ind = ind + &shiftwidth let ind = ind + shiftwidth()
endif endif
if ind == originalIndentValue && curline =~ '^\s*\<case\>' if ind == originalIndentValue && curline =~ '^\s*\<case\>'
@ -555,7 +555,7 @@ function! GetScalaIndent()
if scala#LineIsAClosingXML(prevline) if scala#LineIsAClosingXML(prevline)
if scala#LineCompletesXML(prevlnum, prevline) if scala#LineCompletesXML(prevlnum, prevline)
call scala#ConditionalConfirm("20a") call scala#ConditionalConfirm("20a")
return ind - &shiftwidth return ind - shiftwidth()
else else
call scala#ConditionalConfirm("20b") call scala#ConditionalConfirm("20b")
return ind return ind
@ -566,7 +566,7 @@ function! GetScalaIndent()
"let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline) "let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline)
"if indentMultiplier != 0 "if indentMultiplier != 0
" call scala#ConditionalConfirm("19a") " call scala#ConditionalConfirm("19a")
" let ind = ind - (indentMultiplier * &shiftwidth) " let ind = ind - (indentMultiplier * shiftwidth())
let defValrLine = scala#Test(prevlnum, prevline, '{', '}') let defValrLine = scala#Test(prevlnum, prevline, '{', '}')
if defValrLine != -1 if defValrLine != -1
call scala#ConditionalConfirm("21a") call scala#ConditionalConfirm("21a")
@ -575,10 +575,10 @@ function! GetScalaIndent()
call scala#ConditionalConfirm("21b") call scala#ConditionalConfirm("21b")
if scala#GetLine(prevnonblank(prevlnum - 1)) =~ '^.*\<else\>\s*\%(//.*\)\?$' if scala#GetLine(prevnonblank(prevlnum - 1)) =~ '^.*\<else\>\s*\%(//.*\)\?$'
call scala#ConditionalConfirm("21c") call scala#ConditionalConfirm("21c")
let ind = ind - &shiftwidth let ind = ind - shiftwidth()
elseif scala#LineCompletesIfElse(prevlnum, prevline) elseif scala#LineCompletesIfElse(prevlnum, prevline)
call scala#ConditionalConfirm("21d") call scala#ConditionalConfirm("21d")
let ind = ind - &shiftwidth let ind = ind - shiftwidth()
elseif scala#CountParens(curline) < 0 && curline =~ '^\s*)' && scala#GetLine(scala#GetLineThatMatchesBracket('(', ')')) =~ '.*(\s*$' elseif scala#CountParens(curline) < 0 && curline =~ '^\s*)' && scala#GetLine(scala#GetLineThatMatchesBracket('(', ')')) =~ '.*(\s*$'
" Handles situations that look like this: " Handles situations that look like this:
" "
@ -592,7 +592,7 @@ function! GetScalaIndent()
" 10 " 10
" ).somethingHere() " ).somethingHere()
call scala#ConditionalConfirm("21e") call scala#ConditionalConfirm("21e")
let ind = ind - &shiftwidth let ind = ind - shiftwidth()
endif endif
endif endif
endif endif

View File

@ -56,7 +56,7 @@ function GetTclIndent()
if line =~ '^\s*\*' if line =~ '^\s*\*'
return cindent(v:lnum) return cindent(v:lnum)
elseif line =~ '^\s*}' elseif line =~ '^\s*}'
return indent(v:lnum) - &sw return indent(v:lnum) - shiftwidth()
endif endif
let pnum = s:prevnonblanknoncomment(v:lnum - 1) let pnum = s:prevnonblanknoncomment(v:lnum - 1)
@ -64,11 +64,11 @@ function GetTclIndent()
return 0 return 0
endif endif
let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
let pline = getline(pnum) let pline = getline(pnum)
if pline =~ '}\s*$' if pline =~ '}\s*$'
let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth()
endif endif
return ind return ind

View File

@ -32,17 +32,17 @@ function TcshGetIndent()
let ind = indent(lnum) let ind = indent(lnum)
let line = getline(lnum) let line = getline(lnum)
if line =~ '\v^\s*%(while|foreach)>|^\s*%(case\s.*:|default:|else)\s*$|%(<then|\\)$' if line =~ '\v^\s*%(while|foreach)>|^\s*%(case\s.*:|default:|else)\s*$|%(<then|\\)$'
let ind = ind + &sw let ind = ind + shiftwidth()
endif endif
if line =~ '\v^\s*breaksw>' if line =~ '\v^\s*breaksw>'
let ind = ind - &sw let ind = ind - shiftwidth()
endif endif
" Subtract indent if current line has on end, endif, case commands " Subtract indent if current line has on end, endif, case commands
let line = getline(v:lnum) let line = getline(v:lnum)
if line =~ '\v^\s*%(else|end|endif)\s*$' if line =~ '\v^\s*%(else|end|endif)\s*$'
let ind = ind - &sw let ind = ind - shiftwidth()
endif endif
return ind return ind

View File

@ -26,12 +26,12 @@ function GetTreetopIndent()
let line = getline(pnum) let line = getline(pnum)
if line =~ '^\s*\%(grammar\|module\|rule\)\>' if line =~ '^\s*\%(grammar\|module\|rule\)\>'
let ind += &sw let ind += shiftwidth()
endif endif
let line = getline(v:lnum) let line = getline(v:lnum)
if line =~ '^\s*end\>' if line =~ '^\s*end\>'
let ind -= &sw let ind -= shiftwidth()
end end
retur ind retur ind

View File

@ -26,11 +26,11 @@ function GetXF86ConfIndent()
let ind = indent(lnum) let ind = indent(lnum)
if getline(lnum) =~? '^\s*\(Sub\)\=Section\>' if getline(lnum) =~? '^\s*\(Sub\)\=Section\>'
let ind = ind + &sw let ind = ind + shiftwidth()
endif endif
if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>' if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>'
let ind = ind - &sw let ind = ind - shiftwidth()
endif endif
return ind return ind

View File

@ -47,8 +47,8 @@ function GetXinetdIndent()
return 0 return 0
endif endif
return indent(pnum) + s:count_braces(pnum, 1) * &sw return indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
\ - s:count_braces(v:lnum, 0) * &sw \ - s:count_braces(v:lnum, 0) * shiftwidth()
endfunction endfunction
let &cpo = s:keepcpo let &cpo = s:keepcpo

View File

@ -1,9 +1,10 @@
" Vim syntax file " Vim syntax file
" Language: Erlang (http://www.erlang.org) " Language: Erlang (http://www.erlang.org)
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com> " Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
" Last Update: 2013-Jul-25 " Contributor: Adam Rutkowski <hq@mtod.org>
" Last Update: 2017-Mar-05
" License: Vim license " License: Vim license
" URL: https://github.com/hcs42/vim-erlang " URL: https://github.com/vim-erlang/vim-erlang-runtime
" Acknowledgements: This script was originally created by Kresimir Marzic [1]. " Acknowledgements: This script was originally created by Kresimir Marzic [1].
" The script was then revamped by Csaba Hoch [2]. During the revamp, the new " The script was then revamped by Csaba Hoch [2]. During the revamp, the new
@ -46,7 +47,6 @@ syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlang
syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
syn match erlangCommentAnnotation /`[^']*'/ contained syn match erlangCommentAnnotation /`[^']*'/ contained
syn keyword erlangTodo TODO FIXME XXX contained syn keyword erlangTodo TODO FIXME XXX contained
syn match erlangShebang '^#!.*'
" Numbers (minimum base is 2, maximum is 36.) " Numbers (minimum base is 2, maximum is 36.)
syn match erlangNumberInteger '\<\d\+\>' syn match erlangNumberInteger '\<\d\+\>'
@ -56,12 +56,12 @@ syn match erlangNumberFloat '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
" Strings, atoms, characters " Strings, atoms, characters
syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier
syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier
syn match erlangStringModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained syn match erlangStringModifier '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\|\~\%([ni~]\|\%(-\=\d\+\|\*\)\=\.\=\%(\*\|\d\+\)\=\%(\..\)\=[tl]*[cfegswpWPBX#bx+]\)' contained
syn match erlangQuotedAtomModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained syn match erlangQuotedAtomModifier '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
syn match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)' syn match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
" Operators, separators " Operators, separators
syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/' syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|=>\|:=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
syn match erlangBracket '{\|}\|\[\|]\||\|||' syn match erlangBracket '{\|}\|\[\|]\||\|||'
syn match erlangPipe '|' syn match erlangPipe '|'
@ -72,14 +72,19 @@ syn match erlangAtom '\<\l[[:alnum:]_@]*' contains=erlangBoolean
syn keyword erlangBoolean true false contained syn keyword erlangBoolean true false contained
syn match erlangLocalFuncCall '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangBIF syn match erlangLocalFuncCall '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangBIF
syn match erlangLocalFuncRef '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' syn match erlangLocalFuncRef '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@='
syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangComment syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangComment,erlangVariable
syn match erlangGlobalFuncRef '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment syn match erlangGlobalFuncRef '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment,erlangVariable
" Variables, macros, records " Variables, macros, records, maps
syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*' syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*'
syn match erlangMacro '??\=[[:alnum:]_@]\+' syn match erlangMacro '??\=[[:alnum:]_@]\+'
syn match erlangMacro '\%(-define(\)\@<=[[:alnum:]_@]\+' syn match erlangMacro '\%(-define(\)\@<=[[:alnum:]_@]\+'
syn match erlangMap '#'
syn match erlangRecord '#\s*\l[[:alnum:]_@]*' syn match erlangRecord '#\s*\l[[:alnum:]_@]*'
syn region erlangQuotedRecord start=/#\s*'/ end=/'/ contains=erlangQuotedAtomModifier
" Shebang (this line has to be after the ErlangMap)
syn match erlangShebang '^#!.*'
" Bitstrings " Bitstrings
syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\%(\%(\s\|\n\|%.*\n\)*-\%(\s\|\n\|%.*\n\)*\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\)*' contains=erlangComment syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\%(\%(\s\|\n\|%.*\n\)*-\%(\s\|\n\|%.*\n\)*\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\)*' contains=erlangComment
@ -94,7 +99,7 @@ syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif
syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment
" Keywords " Keywords
syn keyword erlangKeyword after begin case catch cond end fun if let of query syn keyword erlangKeyword after begin case catch cond end fun if let of
syn keyword erlangKeyword receive when try syn keyword erlangKeyword receive when try
" Build-in-functions (BIFs) " Build-in-functions (BIFs)
@ -142,7 +147,6 @@ let b:erlang_syntax_synced = 1
let s:old_style = (exists("g:erlang_old_style_highlight") && let s:old_style = (exists("g:erlang_old_style_highlight") &&
\g:erlang_old_style_highlight == 1) \g:erlang_old_style_highlight == 1)
" Only when an item doesn't have highlighting yet
" Comments " Comments
hi def link erlangComment Comment hi def link erlangComment Comment
@ -188,6 +192,8 @@ hi def link erlangGlobalFuncRef Function
hi def link erlangVariable Normal hi def link erlangVariable Normal
hi def link erlangMacro Normal hi def link erlangMacro Normal
hi def link erlangRecord Normal hi def link erlangRecord Normal
hi def link erlangQuotedRecord Normal
hi def link erlangMap Normal
else else
hi def link erlangAtom String hi def link erlangAtom String
hi def link erlangLocalFuncCall Normal hi def link erlangLocalFuncCall Normal
@ -197,6 +203,8 @@ hi def link erlangGlobalFuncRef Normal
hi def link erlangVariable Identifier hi def link erlangVariable Identifier
hi def link erlangMacro Macro hi def link erlangMacro Macro
hi def link erlangRecord Structure hi def link erlangRecord Structure
hi def link erlangQuotedRecord Structure
hi def link erlangMap Structure
endif endif
" Bitstrings " Bitstrings

View File

@ -71,6 +71,8 @@ hi link scalaUnicodeChar Special
syn match scalaOperator "||" syn match scalaOperator "||"
syn match scalaOperator "&&" syn match scalaOperator "&&"
syn match scalaOperator "|"
syn match scalaOperator "&"
hi link scalaOperator Special hi link scalaOperator Special
syn match scalaNameDefinition /\<[_A-Za-z0-9$]\+\>/ contained nextgroup=scalaPostNameDefinition,scalaVariableDeclarationList syn match scalaNameDefinition /\<[_A-Za-z0-9$]\+\>/ contained nextgroup=scalaPostNameDefinition,scalaVariableDeclarationList
@ -142,7 +144,7 @@ hi link scalaString String
hi link scalaStringEmbeddedQuote String hi link scalaStringEmbeddedQuote String
syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\ze\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
hi link scalaIString String hi link scalaIString String
hi link scalaTripleIString String hi link scalaTripleIString String

View File

@ -4,18 +4,16 @@
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com> " Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
if version < 600 if exists("b:current_syntax")
syntax clear
elseif exists("b:current_syntax")
finish finish
else
let b:current_syntax = "tmux"
endif endif
" this file uses line continuations " Explicitly change compatiblity options to Vim's defaults because this file
let s:cpo_sav = &cpo " uses line continuations.
let s:original_cpo = &cpo
set cpo&vim set cpo&vim
let b:current_syntax = "tmux"
setlocal iskeyword+=- setlocal iskeyword+=-
syntax case match syntax case match
@ -62,7 +60,6 @@ for s:i in range(0, 255)
exec "syn match tmuxColour" . s:i . " /\\<colour" . s:i . "\\>/ display" exec "syn match tmuxColour" . s:i . " /\\<colour" . s:i . "\\>/ display"
\ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg \ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg
endfor endfor
unlet s:bg s:i
syn keyword tmuxOptions syn keyword tmuxOptions
\ buffer-limit command-alias default-terminal escape-time exit-unattached \ buffer-limit command-alias default-terminal escape-time exit-unattached
@ -123,5 +120,5 @@ syn keyword tmuxCommands
\ swapp swap-window swapw switch-client switchc unbind-key unbind wait-for \ swapp swap-window swapw switch-client switchc unbind-key unbind wait-for
\ wait \ wait
let &cpo = s:cpo_sav let &cpo = s:original_cpo
unlet! s:cpo_sav unlet! s:original_cpo s:bg s:i