Update runtime files.

This commit is contained in:
Bram Moolenaar
2017-09-19 22:06:03 +02:00
parent e22bbf6508
commit 37c64c78fd
39 changed files with 3408 additions and 5967 deletions

View File

@ -1,6 +1,6 @@
" Vim support file to help with paste mappings and menus " Vim support file to help with paste mappings and menus
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Jun 23 " Last Change: 2017 Aug 30
" Define the string to use for items that are present both in Edit, Popup and " Define the string to use for items that are present both in Edit, Popup and
" Toolbar menu. Also used in mswin.vim and macmap.vim. " Toolbar menu. Also used in mswin.vim and macmap.vim.
@ -12,7 +12,7 @@
if has("virtualedit") if has("virtualedit")
let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"} let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n'] let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
let paste#paste_cmd['i'] = 'x<BS><Esc>' . paste#paste_cmd['n'] . 'gi' let paste#paste_cmd['i'] = "\<c-\>\<c-o>\"+gP"
func! paste#Paste() func! paste#Paste()
let ove = &ve let ove = &ve

View File

@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 8.0. Last change: 2017 Jul 11 *cmdline.txt* For Vim version 8.0. Last change: 2017 Sep 17
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -826,6 +826,7 @@ Also see |`=|.
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>* *:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
*:<sfile>* *<sfile>* *:<afile>* *<afile>* *:<sfile>* *<sfile>* *:<afile>* *<afile>*
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>* *:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
*:<cexpr>* *<cexpr>*
*<slnum>* *E495* *E496* *E497* *E499* *E500* *<slnum>* *E495* *E496* *E497* *E499* *E500*
Note: these are typed literally, they are not special keys! Note: these are typed literally, they are not special keys!
<cword> is replaced with the word under the cursor (like |star|) <cword> is replaced with the word under the cursor (like |star|)

View File

@ -1,4 +1,4 @@
*diff.txt* For Vim version 8.0. Last change: 2017 Feb 03 *diff.txt* For Vim version 8.0. Last change: 2017 Sep 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -226,8 +226,8 @@ The diffs are highlighted with these groups:
(searching from the end of the line). The (searching from the end of the line). The
text in between is highlighted. This means text in between is highlighted. This means
that parts in the middle that are still the that parts in the middle that are still the
same are highlighted anyway. Only "iwhite" of same are highlighted anyway. The 'diffopt'
'diffopt' is used here. flags "iwhite" and "icase" are used here.
|hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines, |hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines,
because they don't really exist in this because they don't really exist in this
buffer. buffer.

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.0. Last change: 2017 Sep 11 *eval.txt* For Vim version 8.0. Last change: 2017 Sep 17
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -4787,7 +4787,9 @@ getwininfo([{winid}]) *getwininfo()*
Each List item is a Dictionary with the following entries: Each List item is a Dictionary with the following entries:
bufnr number of buffer in the window bufnr number of buffer in the window
height window height height window height (excluding winbar)
winbar 1 if the window has a toolbar, 0
otherwise
loclist 1 if showing a location list loclist 1 if showing a location list
{only with the +quickfix feature} {only with the +quickfix feature}
quickfix 1 if quickfix or location list window quickfix 1 if quickfix or location list window
@ -5676,6 +5678,7 @@ maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
"s" Select "s" Select
"x" Visual "x" Visual
"l" langmap |language-mapping| "l" langmap |language-mapping|
"t" Terminal-Job
"" Normal, Visual and Operator-pending "" Normal, Visual and Operator-pending
When {mode} is omitted, the modes for "" are used. When {mode} is omitted, the modes for "" are used.
@ -8021,9 +8024,9 @@ term_getattr({attr}, {what}) *term_getattr()*
term_getcursor({buf}) *term_getcursor()* term_getcursor({buf}) *term_getcursor()*
Get the cursor position of terminal {buf}. Returns a list with Get the cursor position of terminal {buf}. Returns a list with
two numbers and a dictionary: [rows, cols, dict]. two numbers and a dictionary: [row, col, dict].
"rows" and "cols" are one based, the first screen cell is row "row" and "col" are one based, the first screen cell is row
1, column 1. This is the cursor position of the terminal 1, column 1. This is the cursor position of the terminal
itself, not of the Vim window. itself, not of the Vim window.
@ -8138,6 +8141,10 @@ term_sendkeys({buf}, {keys}) *term_sendkeys()*
means the character CTRL-X. means the character CTRL-X.
{only available when compiled with the |+terminal| feature} {only available when compiled with the |+terminal| feature}
term_setsize({buf}, {expr}) *term_setsize()*
Not implemented yet.
{only available when compiled with the |+terminal| feature}
term_start({cmd}, {options}) *term_start()* term_start({cmd}, {options}) *term_start()*
Open a terminal window and run {cmd} in it. Open a terminal window and run {cmd} in it.
@ -8609,6 +8616,7 @@ winheight({nr}) *winheight()*
When {nr} is zero, the height of the current window is When {nr} is zero, the height of the current window is
returned. When window {nr} doesn't exist, -1 is returned. returned. When window {nr} doesn't exist, -1 is returned.
An existing window always has a height of zero or more. An existing window always has a height of zero or more.
This excludes any window toolbar line.
Examples: > Examples: >
:echo "The current window has " . winheight(0) . " lines." :echo "The current window has " . winheight(0) . " lines."
< <
@ -8936,7 +8944,7 @@ title Compiled with window title support |'title'|.
toolbar Compiled with support for |gui-toolbar|. toolbar Compiled with support for |gui-toolbar|.
ttyin input is a terminal (tty) ttyin input is a terminal (tty)
ttyout output is a terminal (tty) ttyout output is a terminal (tty)
unix Unix version of Vim. unix Unix version of Vim. *+unix*
unnamedplus Compiled with support for "unnamedplus" in 'clipboard' unnamedplus Compiled with support for "unnamedplus" in 'clipboard'
user_commands User-defined commands. user_commands User-defined commands.
vertsplit Compiled with vertically split windows |:vsplit|. vertsplit Compiled with vertically split windows |:vsplit|.

View File

@ -1,4 +1,4 @@
*gui.txt* For Vim version 8.0. Last change: 2017 Sep 16 *gui.txt* For Vim version 8.0. Last change: 2017 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -784,11 +784,12 @@ In the Win32 and GTK+ GUI, starting a menu name with ']' excludes that menu
from the main menu bar. You must then use the |:popup| or |:tearoff| command from the main menu bar. You must then use the |:popup| or |:tearoff| command
to display it. to display it.
*window-toolbar* *window-toolbar* *WinBar*
Each window can have a local toolbar. This uses the first line of the window, Each window can have a local toolbar. This uses the first line of the window,
thus reduces the space for the text by one line. thus reduces the space for the text by one line. The items in the toolbar
must start with "WinBar".
Only text can be used. When using Unicode special characters can be used to Only text can be used. When using Unicode, special characters can be used to
make the items look like icons. make the items look like icons.
If the items do not fit then the last ones cannot be used. The toolbar does If the items do not fit then the last ones cannot be used. The toolbar does
@ -802,6 +803,8 @@ Example for debugger tools: >
< <
The window toolbar uses the ToolbarLine and ToolbarButton highlight groups. The window toolbar uses the ToolbarLine and ToolbarButton highlight groups.
When splitting the window the window toolbar is not copied to the new window.
*popup-menu* *popup-menu*
In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the
special menu "PopUp". This is the menu that is displayed when the right mouse special menu "PopUp". This is the menu that is displayed when the right mouse

View File

@ -1583,13 +1583,17 @@ tag command action ~
|:tjump| :tj[ump] like ":tselect", but jump directly when there |:tjump| :tj[ump] like ":tselect", but jump directly when there
is only one match is only one match
|:tlast| :tl[ast] jump to last matching tag |:tlast| :tl[ast] jump to last matching tag
|:tmapclear| :tmapc[lear] remove all mappings for Terminal-Job mode
|:tmap| :tma[p] like ":map" but for Terminal-Job mode
|:tmenu| :tm[enu] define menu tooltip |:tmenu| :tm[enu] define menu tooltip
|:tnext| :tn[ext] jump to next matching tag |:tnext| :tn[ext] jump to next matching tag
|:tnoremap| :tno[remap] like ":noremap" but for Terminal-Job mode
|:topleft| :to[pleft] make split window appear at top or far left |:topleft| :to[pleft] make split window appear at top or far left
|:tprevious| :tp[revious] jump to previous matching tag |:tprevious| :tp[revious] jump to previous matching tag
|:trewind| :tr[ewind] jump to first matching tag |:trewind| :tr[ewind] jump to first matching tag
|:try| :try execute commands, abort on error or exception |:try| :try execute commands, abort on error or exception
|:tselect| :ts[elect] list matching tags and select one |:tselect| :ts[elect] list matching tags and select one
|:tunmap| :tunma[p] like ":unmap" but for Terminal-Job mode
|:tunmenu| :tu[nmenu] remove menu tooltip |:tunmenu| :tu[nmenu] remove menu tooltip
|:undo| :u[ndo] undo last change(s) |:undo| :u[ndo] undo last change(s)
|:undojoin| :undoj[oin] join next change with previous undo block |:undojoin| :undoj[oin] join next change with previous undo block

View File

@ -1,4 +1,4 @@
*intro.txt* For Vim version 8.0. Last change: 2017 Aug 24 *intro.txt* For Vim version 8.0. Last change: 2017 Sep 04
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -264,6 +264,10 @@ Vim would never have become what it is now, without the help of these people!
Juergen Weigert Lattice version, AUX improvements, UNIX and Juergen Weigert Lattice version, AUX improvements, UNIX and
MS-DOS ports, autoconf MS-DOS ports, autoconf
Stefan 'Sec' Zehl Maintainer of vim.org Stefan 'Sec' Zehl Maintainer of vim.org
Yasuhiro Matsumoto many MS-Windows improvements
Ken Takata fixes and features
Kazunobu Kuriyama GTK 3
Christian Brabandt many fixes, features, user support, etc.
I wish to thank all the people that sent me bug reports and suggestions. The I wish to thank all the people that sent me bug reports and suggestions. The
list is too long to mention them all here. Vim would not be the same without list is too long to mention them all here. Vim would not be the same without

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.0. Last change: 2017 May 30 *map.txt* For Vim version 8.0. Last change: 2017 Sep 17
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -55,7 +55,7 @@ modes.
:im[ap] {lhs} {rhs} |mapmode-i| *:im* *:imap* :im[ap] {lhs} {rhs} |mapmode-i| *:im* *:imap*
:lm[ap] {lhs} {rhs} |mapmode-l| *:lm* *:lmap* :lm[ap] {lhs} {rhs} |mapmode-l| *:lm* *:lmap*
:cm[ap] {lhs} {rhs} |mapmode-c| *:cm* *:cmap* :cm[ap] {lhs} {rhs} |mapmode-c| *:cm* *:cmap*
:tm[ap] {lhs} {rhs} |mapmode-t| *:tma* *:tmap* :tma[p] {lhs} {rhs} |mapmode-t| *:tma* *:tmap*
Map the key sequence {lhs} to {rhs} for the modes Map the key sequence {lhs} to {rhs} for the modes
where the map command applies. The result, including where the map command applies. The result, including
{rhs}, is then further scanned for mappings. This {rhs}, is then further scanned for mappings. This
@ -89,7 +89,7 @@ modes.
:iu[nmap] {lhs} |mapmode-i| *:iu* *:iunmap* :iu[nmap] {lhs} |mapmode-i| *:iu* *:iunmap*
:lu[nmap] {lhs} |mapmode-l| *:lu* *:lunmap* :lu[nmap] {lhs} |mapmode-l| *:lu* *:lunmap*
:cu[nmap] {lhs} |mapmode-c| *:cu* *:cunmap* :cu[nmap] {lhs} |mapmode-c| *:cu* *:cunmap*
:tu[nmap] {lhs} |mapmode-t| *:tunma* *:tunmap* :tunma[p] {lhs} |mapmode-t| *:tunma* *:tunmap*
Remove the mapping of {lhs} for the modes where the Remove the mapping of {lhs} for the modes where the
map command applies. The mapping may remain defined map command applies. The mapping may remain defined
for other modes where it applies. for other modes where it applies.
@ -125,7 +125,7 @@ modes.
:im[ap] |mapmode-i| :im[ap] |mapmode-i|
:lm[ap] |mapmode-l| :lm[ap] |mapmode-l|
:cm[ap] |mapmode-c| :cm[ap] |mapmode-c|
:tm[ap] |mapmode-t| :tma[p] |mapmode-t|
List all key mappings for the modes where the map List all key mappings for the modes where the map
command applies. Note that ":map" and ":map!" are command applies. Note that ":map" and ":map!" are
used most often, because they include the other modes. used most often, because they include the other modes.
@ -140,7 +140,7 @@ modes.
:im[ap] {lhs} |mapmode-i| *:imap_l* :im[ap] {lhs} |mapmode-i| *:imap_l*
:lm[ap] {lhs} |mapmode-l| *:lmap_l* :lm[ap] {lhs} |mapmode-l| *:lmap_l*
:cm[ap] {lhs} |mapmode-c| *:cmap_l* :cm[ap] {lhs} |mapmode-c| *:cmap_l*
:tm[ap] {lhs} |mapmode-t| *:tmap_l* :tma[p] {lhs} |mapmode-t| *:tmap_l*
List the key mappings for the key sequences starting List the key mappings for the key sequences starting
with {lhs} in the modes where the map command applies. with {lhs} in the modes where the map command applies.
{not in Vi} {not in Vi}
@ -694,7 +694,7 @@ option). After that it assumes that the 'q' is to be interpreted as such. If
you type slowly, or your system is slow, reset the 'timeout' option. Then you you type slowly, or your system is slow, reset the 'timeout' option. Then you
might want to set the 'ttimeout' option. might want to set the 'ttimeout' option.
*map-precedence* *map-precedence*
Buffer-local mappings (defined using |:map-<buffer>|) take precedence over Buffer-local mappings (defined using |:map-<buffer>|) take precedence over
global mappings. When a buffer-local mapping is the same as a global mapping, global mappings. When a buffer-local mapping is the same as a global mapping,
Vim will use the buffer-local mapping. In addition, Vim will use a complete Vim will use the buffer-local mapping. In addition, Vim will use a complete

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.0. Last change: 2017 Aug 27 *options.txt* For Vim version 8.0. Last change: 2017 Sep 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -423,6 +423,16 @@ command, not when assigning a value to an option with ":let".
*$HOME-windows* *$HOME-windows*
On MS-Windows, if $HOME is not defined as an environment variable, then On MS-Windows, if $HOME is not defined as an environment variable, then
at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH. at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH.
If $HOMEDRIVE is not set then $USERPROFILE is used.
This expanded value is not exported to the environment, this matters when
running an external command: >
:echo system('set | findstr ^HOME=')
and >
:echo luaeval('os.getenv("HOME")')
should echo nothing (an empty string) despite exists('$HOME') being true.
When setting $HOME to a non-empty string it will be exported to the
subprocesses.
Note the maximum length of an expanded option is limited. How much depends on Note the maximum length of an expanded option is limited. How much depends on
@ -722,7 +732,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Vim may set this option automatically at startup time when Vim is Vim may set this option automatically at startup time when Vim is
compiled with the |+termresponse| feature and if |t_u7| is set to the compiled with the |+termresponse| feature and if |t_u7| is set to the
escape sequence to request cursor position report. escape sequence to request cursor position report. The response can
be found in |v:termu7resp|.
*'antialias'* *'anti'* *'noantialias'* *'noanti'* *'antialias'* *'anti'* *'noantialias'* *'noanti'*
'antialias' 'anti' boolean (default: off) 'antialias' 'anti' boolean (default: off)
@ -870,11 +881,12 @@ A jump table for the options with a short description can be found at |Q_op|.
< Vim will guess the value. In the GUI this should work correctly, < Vim will guess the value. In the GUI this should work correctly,
in other cases Vim might not be able to guess the right value. in other cases Vim might not be able to guess the right value.
When the t_BG option is set, Vim will use it to request the background When the |t_RB| option is set, Vim will use it to request the background
color from the terminal. If the returned RGB value is dark/light and color from the terminal. If the returned RGB value is dark/light and
'background' is not dark/light, 'background' will be set and the 'background' is not dark/light, 'background' will be set and the
screen is redrawn. This may have side effects, make t_BG empty in screen is redrawn. This may have side effects, make t_BG empty in
your .vimrc if you suspect this problem. your .vimrc if you suspect this problem. The response to |t_RB| can
be found in |v:termrgbresp|.
When starting the GUI, the default value for 'background' will be When starting the GUI, the default value for 'background' will be
"light". When the value is not set in the .gvimrc, and Vim detects "light". When the value is not set in the .gvimrc, and Vim detects
@ -4363,9 +4375,9 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi} {not in Vi}
{only available when compiled with |+xim| and {only available when compiled with |+xim| and
|+GUI_GTK|} |+GUI_GTK|}
This option specifies the input style of Input Method. This option specifies the input style of Input Method:
Set to zero if you want to use on-the-spot style. 0 use on-the-spot style
Set to one if you want to use over-the-spot style. 1 over-the-spot style
See: |xim-input-style| See: |xim-input-style|
For a long time on-the-spot sytle had been used in GTK version of vim, For a long time on-the-spot sytle had been used in GTK version of vim,
@ -5746,6 +5758,18 @@ A jump table for the options with a short description can be found at |Q_op|.
< Replace the ';' with a ':' or whatever separator is used. Note that < Replace the ';' with a ':' or whatever separator is used. Note that
this doesn't work when $INCL contains a comma or white space. this doesn't work when $INCL contains a comma or white space.
*'perldll'*
'perldll' string (default depends on the build)
global
{not in Vi}
{only available when compiled with the |+perl/dyn|
feature}
Specifies the name of the Perl shared library. The default is
DYNAMIC_PERL_DLL, which was specified at compile time.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'* *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
'preserveindent' 'pi' boolean (default off) 'preserveindent' 'pi' boolean (default off)
local to buffer local to buffer

View File

@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.0. Last change: 2017 Jun 13 *quickfix.txt* For Vim version 8.0. Last change: 2017 Sep 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -47,11 +47,6 @@ compiler (see |errorformat| below).
*quickfix-ID* *quickfix-ID*
Each quickfix list has a unique identifier called the quickfix ID and this Each quickfix list has a unique identifier called the quickfix ID and this
number will not change within a Vim session. The getqflist() function can be number will not change within a Vim session. The getqflist() function can be
used to get the identifier assigned to a list.
*quickfix-ID*
Each quickfix list has a unique identifier called the quickfix ID and this
number will not change within a Vim session. The getqflist() function can be
used to get the identifier assigned to a list. There is also a quickfix list used to get the identifier assigned to a list. There is also a quickfix list
number which may change whenever more than ten lists are added to a quickfix number which may change whenever more than ten lists are added to a quickfix
stack. stack.

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.0. Last change: 2017 Aug 19 *quickref.txt* For Vim version 8.0. Last change: 2017 Sep 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -749,6 +749,7 @@ Short explanation of each option: *option-list*
'iminsert' 'imi' use :lmap or IM in Insert mode 'iminsert' 'imi' use :lmap or IM in Insert mode
'imsearch' 'ims' use :lmap or IM when typing a search pattern 'imsearch' 'ims' use :lmap or IM when typing a search pattern
'imstatusfunc' 'imsf' function to obtain X input method status 'imstatusfunc' 'imsf' function to obtain X input method status
'imstyle' 'imst' specifies the input style of the input method
'include' 'inc' pattern to be used to find an include file 'include' 'inc' pattern to be used to find an include file
'includeexpr' 'inex' expression used to process an include line 'includeexpr' 'inex' expression used to process an include line
'incsearch' 'is' highlight match while typing search pattern 'incsearch' 'is' highlight match while typing search pattern

View File

@ -4,6 +4,7 @@
$ motion.txt /*$* $ motion.txt /*$*
$HOME options.txt /*$HOME* $HOME options.txt /*$HOME*
$HOME-use version5.txt /*$HOME-use* $HOME-use version5.txt /*$HOME-use*
$HOME-windows options.txt /*$HOME-windows*
$MYGVIMRC gui.txt /*$MYGVIMRC* $MYGVIMRC gui.txt /*$MYGVIMRC*
$MYVIMRC starting.txt /*$MYVIMRC* $MYVIMRC starting.txt /*$MYVIMRC*
$VIM starting.txt /*$VIM* $VIM starting.txt /*$VIM*
@ -366,7 +367,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'ims' options.txt /*'ims'* 'ims' options.txt /*'ims'*
'imsearch' options.txt /*'imsearch'* 'imsearch' options.txt /*'imsearch'*
'imsf' options.txt /*'imsf'* 'imsf' options.txt /*'imsf'*
'imst' options.txt /*'imst'*
'imstatusfunc' options.txt /*'imstatusfunc'* 'imstatusfunc' options.txt /*'imstatusfunc'*
'imstyle' options.txt /*'imstyle'*
'inc' options.txt /*'inc'* 'inc' options.txt /*'inc'*
'include' options.txt /*'include'* 'include' options.txt /*'include'*
'includeexpr' options.txt /*'includeexpr'* 'includeexpr' options.txt /*'includeexpr'*
@ -746,6 +749,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'path' options.txt /*'path'* 'path' options.txt /*'path'*
'pdev' options.txt /*'pdev'* 'pdev' options.txt /*'pdev'*
'penc' options.txt /*'penc'* 'penc' options.txt /*'penc'*
'perldll' options.txt /*'perldll'*
'pex' options.txt /*'pex'* 'pex' options.txt /*'pex'*
'pexpr' options.txt /*'pexpr'* 'pexpr' options.txt /*'pexpr'*
'pfn' options.txt /*'pfn'* 'pfn' options.txt /*'pfn'*
@ -971,6 +975,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
't_PE' term.txt /*'t_PE'* 't_PE' term.txt /*'t_PE'*
't_PS' term.txt /*'t_PS'* 't_PS' term.txt /*'t_PS'*
't_RB' term.txt /*'t_RB'* 't_RB' term.txt /*'t_RB'*
't_RC' term.txt /*'t_RC'*
't_RI' term.txt /*'t_RI'* 't_RI' term.txt /*'t_RI'*
't_RS' term.txt /*'t_RS'* 't_RS' term.txt /*'t_RS'*
't_RV' term.txt /*'t_RV'* 't_RV' term.txt /*'t_RV'*
@ -980,6 +985,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
't_SR' term.txt /*'t_SR'* 't_SR' term.txt /*'t_SR'*
't_Sb' term.txt /*'t_Sb'* 't_Sb' term.txt /*'t_Sb'*
't_Sf' term.txt /*'t_Sf'* 't_Sf' term.txt /*'t_Sf'*
't_Te' term.txt /*'t_Te'*
't_Ts' term.txt /*'t_Ts'*
't_VS' term.txt /*'t_VS'* 't_VS' term.txt /*'t_VS'*
't_WP' term.txt /*'t_WP'* 't_WP' term.txt /*'t_WP'*
't_WS' term.txt /*'t_WS'* 't_WS' term.txt /*'t_WS'*
@ -1328,6 +1335,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+timers various.txt /*+timers* +timers various.txt /*+timers*
+title various.txt /*+title* +title various.txt /*+title*
+toolbar various.txt /*+toolbar* +toolbar various.txt /*+toolbar*
+unix eval.txt /*+unix*
+user_commands various.txt /*+user_commands* +user_commands various.txt /*+user_commands*
+vertsplit various.txt /*+vertsplit* +vertsplit various.txt /*+vertsplit*
+viminfo various.txt /*+viminfo* +viminfo various.txt /*+viminfo*
@ -1892,6 +1900,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:<afile> cmdline.txt /*:<afile>* :<afile> cmdline.txt /*:<afile>*
:<amatch> cmdline.txt /*:<amatch>* :<amatch> cmdline.txt /*:<amatch>*
:<cWORD> cmdline.txt /*:<cWORD>* :<cWORD> cmdline.txt /*:<cWORD>*
:<cexpr> cmdline.txt /*:<cexpr>*
:<cfile> cmdline.txt /*:<cfile>* :<cfile> cmdline.txt /*:<cfile>*
:<cword> cmdline.txt /*:<cword>* :<cword> cmdline.txt /*:<cword>*
:<sfile> cmdline.txt /*:<sfile>* :<sfile> cmdline.txt /*:<sfile>*
@ -1951,6 +1960,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:Sexplore pi_netrw.txt /*:Sexplore* :Sexplore pi_netrw.txt /*:Sexplore*
:TOhtml syntax.txt /*:TOhtml* :TOhtml syntax.txt /*:TOhtml*
:TarDiff pi_tar.txt /*:TarDiff* :TarDiff pi_tar.txt /*:TarDiff*
:Termdebug terminal.txt /*:Termdebug*
:Texplore pi_netrw.txt /*:Texplore* :Texplore pi_netrw.txt /*:Texplore*
:UseVimball pi_vimball.txt /*:UseVimball* :UseVimball pi_vimball.txt /*:UseVimball*
:Vexplore pi_netrw.txt /*:Vexplore* :Vexplore pi_netrw.txt /*:Vexplore*
@ -3122,9 +3132,16 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:tl tagsrch.txt /*:tl* :tl tagsrch.txt /*:tl*
:tlast tagsrch.txt /*:tlast* :tlast tagsrch.txt /*:tlast*
:tm gui.txt /*:tm* :tm gui.txt /*:tm*
:tma map.txt /*:tma*
:tmap map.txt /*:tmap*
:tmap_l map.txt /*:tmap_l*
:tmapc map.txt /*:tmapc*
:tmapclear map.txt /*:tmapclear*
:tmenu gui.txt /*:tmenu* :tmenu gui.txt /*:tmenu*
:tn tagsrch.txt /*:tn* :tn tagsrch.txt /*:tn*
:tnext tagsrch.txt /*:tnext* :tnext tagsrch.txt /*:tnext*
:tno map.txt /*:tno*
:tnoremap map.txt /*:tnoremap*
:topleft windows.txt /*:topleft* :topleft windows.txt /*:topleft*
:tp tagsrch.txt /*:tp* :tp tagsrch.txt /*:tp*
:tprevious tagsrch.txt /*:tprevious* :tprevious tagsrch.txt /*:tprevious*
@ -3134,6 +3151,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:ts tagsrch.txt /*:ts* :ts tagsrch.txt /*:ts*
:tselect tagsrch.txt /*:tselect* :tselect tagsrch.txt /*:tselect*
:tu gui.txt /*:tu* :tu gui.txt /*:tu*
:tunma map.txt /*:tunma*
:tunmap map.txt /*:tunmap*
:tunmenu gui.txt /*:tunmenu* :tunmenu gui.txt /*:tunmenu*
:u undo.txt /*:u* :u undo.txt /*:u*
:un undo.txt /*:un* :un undo.txt /*:un*
@ -3398,6 +3417,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<bang> map.txt /*<bang>* <bang> map.txt /*<bang>*
<buffer=N> autocmd.txt /*<buffer=N>* <buffer=N> autocmd.txt /*<buffer=N>*
<buffer=abuf> autocmd.txt /*<buffer=abuf>* <buffer=abuf> autocmd.txt /*<buffer=abuf>*
<cexpr> cmdline.txt /*<cexpr>*
<cfile> cmdline.txt /*<cfile>* <cfile> cmdline.txt /*<cfile>*
<character> intro.txt /*<character>* <character> intro.txt /*<character>*
<count> map.txt /*<count>* <count> map.txt /*<count>*
@ -3428,6 +3448,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<mods> map.txt /*<mods>* <mods> map.txt /*<mods>*
<nomodeline> autocmd.txt /*<nomodeline>* <nomodeline> autocmd.txt /*<nomodeline>*
<q-args> map.txt /*<q-args>* <q-args> map.txt /*<q-args>*
<range> map.txt /*<range>*
<reg> map.txt /*<reg>* <reg> map.txt /*<reg>*
<register> map.txt /*<register>* <register> map.txt /*<register>*
<sfile> cmdline.txt /*<sfile>* <sfile> cmdline.txt /*<sfile>*
@ -4829,6 +4850,7 @@ W22 eval.txt /*W22*
WORD motion.txt /*WORD* WORD motion.txt /*WORD*
WWW intro.txt /*WWW* WWW intro.txt /*WWW*
Win32 os_win32.txt /*Win32* Win32 os_win32.txt /*Win32*
WinBar gui.txt /*WinBar*
WinEnter autocmd.txt /*WinEnter* WinEnter autocmd.txt /*WinEnter*
WinLeave autocmd.txt /*WinLeave* WinLeave autocmd.txt /*WinLeave*
WinNew autocmd.txt /*WinNew* WinNew autocmd.txt /*WinNew*
@ -7270,6 +7292,7 @@ mapmode-n map.txt /*mapmode-n*
mapmode-nvo map.txt /*mapmode-nvo* mapmode-nvo map.txt /*mapmode-nvo*
mapmode-o map.txt /*mapmode-o* mapmode-o map.txt /*mapmode-o*
mapmode-s map.txt /*mapmode-s* mapmode-s map.txt /*mapmode-s*
mapmode-t map.txt /*mapmode-t*
mapmode-v map.txt /*mapmode-v* mapmode-v map.txt /*mapmode-v*
mapmode-x map.txt /*mapmode-x* mapmode-x map.txt /*mapmode-x*
mapping map.txt /*mapping* mapping map.txt /*mapping*
@ -8005,6 +8028,7 @@ qnx-terminal os_qnx.txt /*qnx-terminal*
quake.vim syntax.txt /*quake.vim* quake.vim syntax.txt /*quake.vim*
quickfix quickfix.txt /*quickfix* quickfix quickfix.txt /*quickfix*
quickfix-6 version6.txt /*quickfix-6* quickfix-6 version6.txt /*quickfix-6*
quickfix-ID quickfix.txt /*quickfix-ID*
quickfix-directory-stack quickfix.txt /*quickfix-directory-stack* quickfix-directory-stack quickfix.txt /*quickfix-directory-stack*
quickfix-error-lists quickfix.txt /*quickfix-error-lists* quickfix-error-lists quickfix.txt /*quickfix-error-lists*
quickfix-functions usr_41.txt /*quickfix-functions* quickfix-functions usr_41.txt /*quickfix-functions*
@ -8234,6 +8258,7 @@ servername-variable eval.txt /*servername-variable*
session-file starting.txt /*session-file* session-file starting.txt /*session-file*
set-option options.txt /*set-option* set-option options.txt /*set-option*
set-spc-auto spell.txt /*set-spc-auto* set-spc-auto spell.txt /*set-spc-auto*
setbufline() eval.txt /*setbufline()*
setbufvar() eval.txt /*setbufvar()* setbufvar() eval.txt /*setbufvar()*
setcharsearch() eval.txt /*setcharsearch()* setcharsearch() eval.txt /*setcharsearch()*
setcmdpos() eval.txt /*setcmdpos()* setcmdpos() eval.txt /*setcmdpos()*
@ -8460,6 +8485,7 @@ strdisplaywidth() eval.txt /*strdisplaywidth()*
strftime() eval.txt /*strftime()* strftime() eval.txt /*strftime()*
strgetchar() eval.txt /*strgetchar()* strgetchar() eval.txt /*strgetchar()*
stridx() eval.txt /*stridx()* stridx() eval.txt /*stridx()*
strikethrough syntax.txt /*strikethrough*
string eval.txt /*string* string eval.txt /*string*
string() eval.txt /*string()* string() eval.txt /*string()*
string-functions usr_41.txt /*string-functions* string-functions usr_41.txt /*string-functions*
@ -8590,6 +8616,7 @@ t_KL term.txt /*t_KL*
t_PE term.txt /*t_PE* t_PE term.txt /*t_PE*
t_PS term.txt /*t_PS* t_PS term.txt /*t_PS*
t_RB term.txt /*t_RB* t_RB term.txt /*t_RB*
t_RC term.txt /*t_RC*
t_RI term.txt /*t_RI* t_RI term.txt /*t_RI*
t_RS term.txt /*t_RS* t_RS term.txt /*t_RS*
t_RV term.txt /*t_RV* t_RV term.txt /*t_RV*
@ -8599,6 +8626,8 @@ t_SI term.txt /*t_SI*
t_SR term.txt /*t_SR* t_SR term.txt /*t_SR*
t_Sb term.txt /*t_Sb* t_Sb term.txt /*t_Sb*
t_Sf term.txt /*t_Sf* t_Sf term.txt /*t_Sf*
t_Te term.txt /*t_Te*
t_Ts term.txt /*t_Ts*
t_VS term.txt /*t_VS* t_VS term.txt /*t_VS*
t_WP term.txt /*t_WP* t_WP term.txt /*t_WP*
t_WS term.txt /*t_WS* t_WS term.txt /*t_WS*
@ -8830,6 +8859,7 @@ term_gettty() eval.txt /*term_gettty()*
term_list() eval.txt /*term_list()* term_list() eval.txt /*term_list()*
term_scrape() eval.txt /*term_scrape()* term_scrape() eval.txt /*term_scrape()*
term_sendkeys() eval.txt /*term_sendkeys()* term_sendkeys() eval.txt /*term_sendkeys()*
term_setsize() eval.txt /*term_setsize()*
term_start() eval.txt /*term_start()* term_start() eval.txt /*term_start()*
term_wait() eval.txt /*term_wait()* term_wait() eval.txt /*term_wait()*
termcap term.txt /*termcap* termcap term.txt /*termcap*
@ -8848,6 +8878,7 @@ terminal-key-codes term.txt /*terminal-key-codes*
terminal-options term.txt /*terminal-options* terminal-options term.txt /*terminal-options*
terminal-output-codes term.txt /*terminal-output-codes* terminal-output-codes term.txt /*terminal-output-codes*
terminal-testing terminal.txt /*terminal-testing* terminal-testing terminal.txt /*terminal-testing*
terminal-typing terminal.txt /*terminal-typing*
terminal-use terminal.txt /*terminal-use* terminal-use terminal.txt /*terminal-use*
terminal.txt terminal.txt /*terminal.txt* terminal.txt terminal.txt /*terminal.txt*
terminfo term.txt /*terminfo* terminfo term.txt /*terminfo*
@ -8855,6 +8886,7 @@ 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_feedinput() eval.txt /*test_feedinput()*
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()*
@ -9081,7 +9113,11 @@ v:t_list eval.txt /*v:t_list*
v:t_none eval.txt /*v:t_none* v:t_none eval.txt /*v:t_none*
v:t_number eval.txt /*v:t_number* v:t_number eval.txt /*v:t_number*
v:t_string eval.txt /*v:t_string* v:t_string eval.txt /*v:t_string*
v:termblinkresp eval.txt /*v:termblinkresp*
v:termresponse eval.txt /*v:termresponse* v:termresponse eval.txt /*v:termresponse*
v:termrgbresp eval.txt /*v:termrgbresp*
v:termstyleresp eval.txt /*v:termstyleresp*
v:termu7resp eval.txt /*v:termu7resp*
v:testing eval.txt /*v:testing* v:testing eval.txt /*v:testing*
v:this_session eval.txt /*v:this_session* v:this_session eval.txt /*v:this_session*
v:throwpoint eval.txt /*v:throwpoint* v:throwpoint eval.txt /*v:throwpoint*
@ -9401,6 +9437,7 @@ window-resize windows.txt /*window-resize*
window-size term.txt /*window-size* window-size term.txt /*window-size*
window-size-functions usr_41.txt /*window-size-functions* window-size-functions usr_41.txt /*window-size-functions*
window-tag windows.txt /*window-tag* window-tag windows.txt /*window-tag*
window-toolbar gui.txt /*window-toolbar*
window-variable eval.txt /*window-variable* window-variable eval.txt /*window-variable*
windowid windows.txt /*windowid* windowid windows.txt /*windowid*
windowid-variable eval.txt /*windowid-variable* windowid-variable eval.txt /*windowid-variable*

View File

@ -1,4 +1,4 @@
*term.txt* For Vim version 8.0. Last change: 2017 Aug 26 *term.txt* For Vim version 8.0. Last change: 2017 Aug 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -295,8 +295,6 @@ OUTPUT CODES *terminal-output-codes*
t_ts set window title start (to status line) *t_ts* *'t_ts'* t_ts set window title start (to status line) *t_ts* *'t_ts'*
t_ue underline end *t_ue* *'t_ue'* t_ue underline end *t_ue* *'t_ue'*
t_us underline mode *t_us* *'t_us'* t_us underline mode *t_us* *'t_us'*
t_Ce undercurl end *t_Ce* *'t_Ce'*
t_Cs undercurl mode *t_Cs* *'t_Cs'*
t_ut clearing uses the current background color *t_ut* *'t_ut'* t_ut clearing uses the current background color *t_ut* *'t_ut'*
t_vb visual bell *t_vb* *'t_vb'* t_vb visual bell *t_vb* *'t_vb'*
t_ve cursor visible *t_ve* *'t_ve'* t_ve cursor visible *t_ve* *'t_ve'*
@ -311,6 +309,10 @@ OUTPUT CODES *terminal-output-codes*
t_ZR italics end *t_ZR* *'t_ZR'* t_ZR italics end *t_ZR* *'t_ZR'*
Added by Vim (there are no standard codes for these): Added by Vim (there are no standard codes for these):
t_Ce undercurl end *t_Ce* *'t_Ce'*
t_Cs undercurl mode *t_Cs* *'t_Cs'*
t_Te strikethrough end *t_Te* *'t_Te'*
t_Ts strikethrough mode *t_Ts* *'t_Ts'*
t_IS set icon text start *t_IS* *'t_IS'* t_IS set icon text start *t_IS* *'t_IS'*
t_IE set icon text end *t_IE* *'t_IE'* t_IE set icon text end *t_IE* *'t_IE'*
t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'* t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'*
@ -337,6 +339,7 @@ Added by Vim (there are no standard codes for these):
t_SC set cursor color start *t_SC* *'t_SC'* t_SC set cursor color start *t_SC* *'t_SC'*
t_EC set cursor color end *t_EC* *'t_EC'* t_EC set cursor color end *t_EC* *'t_EC'*
t_SH set cursor shape *t_SH* *'t_SH'* t_SH set cursor shape *t_SH* *'t_SH'*
t_RC request terminal cursor blinking *t_RC* *'t_RC'*
t_RS request terminal cursor style *t_RS* *'t_RS'* t_RS request terminal cursor style *t_RS* *'t_RS'*
Some codes have a start, middle and end part. The start and end are defined Some codes have a start, middle and end part. The start and end are defined

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.0. Last change: 2017 Aug 27 *todo.txt* For Vim version 8.0. Last change: 2017 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -35,25 +35,39 @@ 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 -----------------------
:term hangs in Athena and Motif. (Kazunobu Kuriyama, 2017 Sep 17)
Always use FEAT_WINDOWS:
May get rid of:
#define W_WINCOL(wp) (wp->w_wincol)
#define W_WIDTH(wp) (wp->w_width)
#define W_ENDCOL(wp) (wp->w_wincol + wp->w_width)
#define W_VSEP_WIDTH(wp) (wp->w_vsep_width)
#define W_STATUS_HEIGHT(wp) (wp->w_status_height)
#define W_WINROW(wp) (wp->w_winrow)
# define ALIST(win) (win)->w_alist
No maintainer for Vietnamese translations. No maintainer for Vietnamese translations.
No maintainer for Simplified Chinese translations. No maintainer for Simplified Chinese translations.
Terminal emulator window: Terminal emulator window:
- Lots of stuff to implement, see src/terminal.c - Lots of stuff to implement, see src/terminal.c
- Add debugger interface. Implementation for gdb by Xavier de Gaye. Should - Improve debugger interface:
work like an IDE. Try to keep it generic. Now found here: Include all debug features of Agide.
http://clewn.sf.net. - Implement the right-click popup menu for the terminal. Can use the
Can this replace Agide? http://www.a-a-p.org/images/debugfull.png completion popup menu code and mouse dragging.
Use it for "set breakpoint", "remove breakpoint", etc.
- make showballoon() work in a terminal. Requires getting mouse-move - make showballoon() work in a terminal. Requires getting mouse-move
events. events.
- send 'balloonText' events for the cursor position (using CursorHold ?) - send 'balloonText' events for the cursor position (using CursorHold ?)
in terminal mode. in terminal mode.
- Implement the right-click popup menu for the terminal. Can use the - get ideas from http://clewn.sf.net
completion popup menu code and mouse dragging. - Look into the idevim plugin/script.
- Look into the idevim plugin/script. - Improve testing:
- Related wishes for NetBeans commands: Make a screenshot of a terminal, store in a file.
- make it possible to have 'defineAnnoType' also handle terminal colors. Display a stored screenshot, display diff with another one.
Make a test that puts Vim in a specific state, make a screenshot and compare
with the expected screenshot. Set t_Co to 256.
+channel: +channel:
- Try out background make plugin: - Try out background make plugin:
@ -123,8 +137,6 @@ Regexp problems:
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*') Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
(2017 May 15, #1252) (2017 May 15, #1252)
Patch to turn test80 into a new style test. (Yegappan Lakshmanan, 2017 Aug 20)
Include a few color schemes, based on popularity: Include a few color schemes, based on popularity:
http://www.vim.org/scripts/script_search_results.php?keywords=&script_type=color+scheme&order_by=rating&direction=descending&search=search http://www.vim.org/scripts/script_search_results.php?keywords=&script_type=color+scheme&order_by=rating&direction=descending&search=search
http://vimawesome.com/?q=tag:color-scheme http://vimawesome.com/?q=tag:color-scheme
@ -138,26 +150,45 @@ Suggested by Hiroki Kokubun:
- [Iceberg](https://github.com/cocopon/iceberg.vim) (my one) - [Iceberg](https://github.com/cocopon/iceberg.vim) (my one)
- [hybrid](https://github.com/w0ng/vim-hybrid) - [hybrid](https://github.com/w0ng/vim-hybrid)
Patch to update Brazilian translations. (Eduardo Dobay, 2017 Sep 10, #2077)
When starting with --clean packages under "start" are not loaded. Make this When starting with --clean packages under "start" are not loaded. Make this
work: :packadd START {name} similar to :runtime START name work: :packadd START {name} similar to :runtime START name
Patch to refactor qf_jump(). (Yegappan, 2017 Sep 17)
When using :packadd files under "later" are not used, which is inconsistent When using :packadd files under "later" are not used, which is inconsistent
with packages under "start". (xtal8, #1994) with packages under "start". (xtal8, #1994)
After 8.0.0962 pasting leaves the cursor in another position. (Ken Takata, After 8.0.0962 pasting leaves the cursor in another position. (Ken Takata,
2017 Aug 23, #2015) Also (zdm, 2017 Aug 23) 2017 Aug 23, #2015) Also (zdm, 2017 Aug 23)
Patch to add quickfix list identifier. (Yegappan, 2017 Aug 15) Patch to fix popup menu drawing when changing the window size. (Ozaki Kiichi,
2017 Sep 17, #2110)
Patch to fix cursor highlighting with match. (Ozaki Kiichi, 2017 Sep 17,
#2111)
Patch for not profiling the first line of a script. (Lemonboy, 2017 Sep 17,
#2103)
Mac Terminal.app: ctermbg=15 gives light grey instead of white. Mac Terminal.app: ctermbg=15 gives light grey instead of white.
ctermbg=256 breaks clearing till end of the line. Both work fine in xterm. ctermbg=256 breaks clearing till end of the line. Both work fine in xterm.
Patch to avoid editing a file in the session file twice. (Christian Brabandt, Using ":hi" causes a redraw, but a redraw may update the status line, which
2017 Aug 21) #1958 may trigger a ":hi" command.
Last line not in profile if it is a continuation line. (LemonBoy, 2017 Sep 17,
#2112)
"vim -c startinsert!" doesn't append. (#2117)
With foldmethod=syntax and nofoldenable comment highlighting isn't removed. With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
(Marcin Szewczyk, 2017 Apr 26) (Marcin Szewczyk, 2017 Apr 26)
Patch to make Mac features more clear and add "macdarwin". (Kazunobu Kuriyama,
2017 Sep 5)
Using 'wildignore' also applies to literally entered file name. Also with Using 'wildignore' also applies to literally entered file name. Also with
:drop (remote commands). :drop (remote commands).
@ -168,35 +199,27 @@ ml_get errors with buggy script. (Dominique, 2017 Apr 30)
Error in emsg with buggy script. (Dominique, 2017 Apr 30) Error in emsg with buggy script. (Dominique, 2017 Apr 30)
Patch to make ":set scroll&" work properly. (Ozaki Kiichi, 2017 Sep 17, #2104)
mswin.vim should not map CTRL-F in the console (#2093)
Patch from Christian, 2017 Sep 15.
Default install on MS-Windows should source defaults.vim.
Ask whether to use Windows or Vim key behavior?
matchit hasn't been maintained for a long time. #955.
Test runtime files. Test runtime files.
Start with filetype detection: testdir/test_filetype.vim Start with filetype detection: testdir/test_filetype.vim
Patch to support on-the-spot and over-the-spot input method. (Ken Takata, 2017 Window not closed when deleting buffer. (Harm te Hennepe, 2017 Aug 27, #2029)
Feb 14). Also see #1215.
Patch to ignore case when 'diffopt' has "icase" for finding the difference
inside a line. (Rick Howe, 2017 Aug 21, 22 with test)
Patch to support strikethrough next to bold and italic. (Christian Brabandt,
2013 Jul 30) Update from Ken Takata, 2013 Oct 12.
Update mentioned by Christian, 2016 Apr 25.
Update from Ken Takata, 2017 Aug 23.
Patch to add setbufline(). (email from Yasuhiro Matsumoto, patch by Ozaki
Kiichi, 2016 Feb 28)
Update Mar 8: https://gist.github.com/mattn/23c1f50999084992ca98
Update Mar 13: https://gist.github.com/mattn/23c1f50999084992ca98
Update Aug 2017: #1953
Patch to fix indenting for raw C++ string. (Christian Brabandt, 2017 Aug 24,
#2019)
Add options_default() / options_restore() to set several options to Vim Add options_default() / options_restore() to set several options to Vim
defaults for a plugin. Comments from Zyx, 2017 May 10. defaults for a plugin. Comments from Zyx, 2017 May 10.
Perhaps use a vimcontext / endvimcontext command block. Perhaps use a vimcontext / endvimcontext command block.
Patch to fix bogus characters inserted in visual-block append. (Christian After using :noautocmd CursorMoved may still trigger. (Andy Stewart, 2017 Sep
Brabandt, 2017 Aug 23) 13, #2084). Set old position after the command.
Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28) Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
Still happens (2017 Jul 9) Still happens (2017 Jul 9)
@ -207,17 +230,19 @@ line breaks. (Ken Takata, 2017 Aug 22)
This example in the help does not work (Andy Wokula, 2017 Aug 20): This example in the help does not work (Andy Wokula, 2017 Aug 20):
augroup mine | au! BufRead | augroup END augroup mine | au! BufRead | augroup END
Memory leaks in test_channel? (or is it because of fork())
Memory leak in test_arabic. Memory leak in test_arabic.
Using uninitialized value in test_crypt.
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24) Patch to make gM move to middle of line. (Yasuhiro Matsumoto, Sep 8, #2070)
Include Haiku port. (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
It can replace the BeOS code, which is likely not used anymore. It can replace the BeOS code, which is likely not used anymore.
Now on github: #1856. Is now up-to-date? Now on github: #1856.
Got permission to include this under the Vim license. Got permission to include this under the Vim license.
Refactored HTML indent file. (Michael Lee, #1821) Refactored HTML indent file. (Michael Lee, #1821)
Using uninitialized value in test_crypt.
Test_writefile_fails_conversion failure on Solaris because if different iconv Test_writefile_fails_conversion failure on Solaris because if different iconv
behavior. Skip when "uname" returns "SunOS"? (Pavel Heimlich, #1872) behavior. Skip when "uname" returns "SunOS"? (Pavel Heimlich, #1872)
@ -235,6 +260,9 @@ Alternatives for ~:
The ++ options for the :edit command are also useful on the Vim command line. The ++ options for the :edit command are also useful on the Vim command line.
Overlong utf-8 sequence is displayed wrong. (Harm te Hennepe, 2017 Sep 14,
#2089) Patch with possible solution by Björn Linse.
X11: Putting more than about 262040 characters of text on the clipboard and X11: Putting more than about 262040 characters of text on the clipboard and
pasting it in another Vim doesn't work. (Dominique Pelle, 2008 Aug 21-23) pasting it in another Vim doesn't work. (Dominique Pelle, 2008 Aug 21-23)
clip_x11_request_selection_cb() is called with zero value and length. clip_x11_request_selection_cb() is called with zero value and length.
@ -249,6 +277,9 @@ Creating a partial with an autoload function is confused about the "self"
attribute of the function. For an unknown function assume "self" and make attribute of the function. For an unknown function assume "self" and make
that optiona? (Bjorn Linse, 2017 Aug 5) that optiona? (Bjorn Linse, 2017 Aug 5)
Cindent: returning a structure has more indent for the second item.
(Sam Pagenkopf, 2017 Sep 14, #2090)
Completion mixes results from the current buffer with tags and other files. Completion mixes results from the current buffer with tags and other files.
Happens when typing CTRL-N while still search for results. E.g., type "b_" in Happens when typing CTRL-N while still search for results. E.g., type "b_" in
terminal.c and then CTRL-N twice. terminal.c and then CTRL-N twice.
@ -1519,6 +1550,9 @@ GTK: tear-off menu does not work. (Kurt Sonnenmoser, 2010 Oct 25)
Win32: tear-off menu does not work when menu language is German. (Markus Win32: tear-off menu does not work when menu language is German. (Markus
Bossler, 2011 Mar 2) Fixed by 7.3.095? Bossler, 2011 Mar 2) Fixed by 7.3.095?
Wish for NetBeans commands:
- make it possible to have 'defineAnnoType' also handle terminal colors.
Version of netbeans.c for use with MacVim. (Kazuki Sakamoto, 2010 Nov 18) Version of netbeans.c for use with MacVim. (Kazuki Sakamoto, 2010 Nov 18)
7.3.014 changed how backslash at end of line works, but still get a NUL when 7.3.014 changed how backslash at end of line works, but still get a NUL when
@ -3709,7 +3743,7 @@ Multi-byte characters:
at a multi-byte character >= 0x100. at a multi-byte character >= 0x100.
- Add the possibility to enter mappings which are used whenever normal text - Add the possibility to enter mappings which are used whenever normal text
could be entered. E.g., for "f" command. But not in Normal mode. Sort could be entered. E.g., for "f" command. But not in Normal mode. Sort
of opposite of 'langmap'. Use ":tmap" command? of opposite of 'langmap'. Use ":amap" command?
- When breaking a line, take properties of multi-byte characters into - When breaking a line, take properties of multi-byte characters into
account. The "linebreak" program from Bruno Haible can do it: account. The "linebreak" program from Bruno Haible can do it:
ftp://ftp.ilog.fr/pub/Users/haible/gnu/linebreak-0.1.tar.gz ftp://ftp.ilog.fr/pub/Users/haible/gnu/linebreak-0.1.tar.gz

View File

@ -1,4 +1,4 @@
*usr_07.txt* For Vim version 8.0. Last change: 2017 Aug 11 *usr_07.txt* For Vim version 8.0. Last change: 2017 Sep 18
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@ -215,14 +215,14 @@ change: >
`. `.
Suppose you are editing the file "one.txt". Somewhere halfway the file you Suppose you are editing the file "one.txt". Somewhere halfway through the
use "x" to delete a character. Then you go to the last line with "G" and file you use "x" to delete a character. Then you go to the last line with "G"
write the file with ":w". You edit several other files, and then use ":edit and write the file with ":w". You edit several other files, and then use
one.txt" to come back to "one.txt". If you now use `" Vim jumps to the last ":edit one.txt" to come back to "one.txt". If you now use `" Vim jumps to the
line of the file. Using `. takes you to the position where you deleted the last line of the file. Using `. takes you to the position where you deleted
character. Even when you move around in the file `" and `. will take you to the character. Even when you move around in the file `" and `. will take you
the remembered position. At least until you make another change or leave the to the remembered position. At least until you make another change or leave
file. the file.
FILE MARKS FILE MARKS
@ -233,8 +233,8 @@ another file and place marks there, these are specific for that file. Thus
each file has its own set of marks, they are local to the file. each file has its own set of marks, they are local to the file.
So far we were using marks with a lowercase letter. There are also marks So far we were using marks with a lowercase letter. There are also marks
with an uppercase letter. These are global, they can be used from any file. with an uppercase letter. These are global, they can be used from any file.
For example suppose that we are editing the file "foo.txt". Go to halfway the For example suppose that we are editing the file "foo.txt". Go to halfway
file ("50%") and place the F mark there (F for foo): > down the file ("50%") and place the F mark there (F for foo): >
50%mF 50%mF

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 8.0. Last change: 2017 Feb 24 *various.txt* For Vim version 8.0. Last change: 2017 Sep 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -322,7 +322,7 @@ N *+cindent* |'cindent'|, C indenting
N *+clientserver* Unix and Win32: Remote invocation |clientserver| N *+clientserver* Unix and Win32: Remote invocation |clientserver|
*+clipboard* |clipboard| support *+clipboard* |clipboard| support
N *+cmdline_compl* command line completion |cmdline-completion| N *+cmdline_compl* command line completion |cmdline-completion|
N *+cmdline_hist* command line history |cmdline-history| S *+cmdline_hist* command line history |cmdline-history|
N *+cmdline_info* |'showcmd'| and |'ruler'| N *+cmdline_info* |'showcmd'| and |'ruler'|
N *+comments* |'comments'| support N *+comments* |'comments'| support
B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc. B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
@ -361,7 +361,7 @@ m *+hangul_input* Hangul input support |hangul|
*+iconv/dyn* Likewise |iconv-dynamic| |/dyn| *+iconv/dyn* Likewise |iconv-dynamic| |/dyn|
N *+insert_expand* |insert_expand| Insert mode completion N *+insert_expand* |insert_expand| Insert mode completion
m *+job* starting and stopping jobs |job| m *+job* starting and stopping jobs |job|
N *+jumplist* |jumplist| S *+jumplist* |jumplist|
B *+keymap* |'keymap'| B *+keymap* |'keymap'|
N *+lambda* |lambda| and |closure| N *+lambda* |lambda| and |closure|
B *+langmap* |'langmap'| B *+langmap* |'langmap'|
@ -438,14 +438,16 @@ N *+title* Setting the window 'title' and 'icon'
N *+toolbar* |gui-toolbar| N *+toolbar* |gui-toolbar|
N *+user_commands* User-defined commands. |user-commands| N *+user_commands* User-defined commands. |user-commands|
N *+viminfo* |'viminfo'| N *+viminfo* |'viminfo'|
N *+vertsplit* Vertically split windows |:vsplit| *+vertsplit* Vertically split windows |:vsplit|; Always enabled
since 8.0.1118.
in sync with the |+windows| feature
N *+virtualedit* |'virtualedit'| N *+virtualedit* |'virtualedit'|
S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
N *+visualextra* extra Visual mode commands |blockwise-operators| N *+visualextra* extra Visual mode commands |blockwise-operators|
N *+vreplace* |gR| and |gr| N *+vreplace* |gR| and |gr|
N *+wildignore* |'wildignore'| N *+wildignore* |'wildignore'|
N *+wildmenu* |'wildmenu'| N *+wildmenu* |'wildmenu'|
S *+windows* more than one window *+windows* more than one window; Always enabled sinde 8.0.1118.
m *+writebackup* |'writebackup'| is default on m *+writebackup* |'writebackup'| is default on
m *+xim* X input method |xim| m *+xim* X input method |xim|
*+xfontset* X fontset support |xfontset| *+xfontset* X fontset support |xfontset|

View File

@ -1,4 +1,4 @@
*visual.txt* For Vim version 8.0. Last change: 2014 Mar 23 *visual.txt* For Vim version 8.0. Last change: 2017 Sep 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.0. Last change: 2017 Aug 21 *windows.txt* For Vim version 8.0. Last change: 2017 Sep 08
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1034,6 +1034,7 @@ list of buffers. |unlisted-buffer|
= a readonly buffer = a readonly buffer
R a terminal buffer with a running job R a terminal buffer with a running job
F a terminal buffer with a finished job F a terminal buffer with a finished job
? a terminal buffer without a job: `:terminal NONE`
+ a modified buffer + a modified buffer
x a buffer with read errors x a buffer with read errors

View File

@ -3,7 +3,7 @@
" Maintainer: vim-perl <vim-perl@googlegroups.com> " Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl " Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013-07-21 " Last Change: 2015-02-09
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1 let b:did_ftplugin = 1
@ -33,14 +33,14 @@ endif
setlocal include=\\<\\(use\\\|require\\)\\> setlocal include=\\<\\(use\\\|require\\)\\>
setlocal includeexpr=substitute(substitute(substitute(v:fname,'::','/','g'),'->\*','',''),'$','.pm','') setlocal includeexpr=substitute(substitute(substitute(v:fname,'::','/','g'),'->\*','',''),'$','.pm','')
setlocal define=[^A-Za-z_] setlocal define=[^A-Za-z_]
setlocal iskeyword+=:
" The following line changes a global variable but is necessary to make " The following line changes a global variable but is necessary to make
" gf and similar commands work. The change to iskeyword was incorrect. " gf and similar commands work. Thanks to Andrew Pimlott for pointing
" Thanks to Andrew Pimlott for pointing out the problem. If this causes a " out the problem. If this causes a problem for you, add an
" problem for you, add an after/ftplugin/perl.vim file that contains " after/ftplugin/perl.vim file that contains
" set isfname-=: " set isfname-=:
set isfname+=: set isfname+=:
set iskeyword+=:
" Set this once, globally. " Set this once, globally.
if !exists("perlpath") if !exists("perlpath")
@ -77,11 +77,12 @@ endif
"--------------------------------------------- "---------------------------------------------
" Undo the stuff we changed. " Undo the stuff we changed.
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp< path<" . let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk< isf< kp< path<" .
\ " | unlet! b:browsefilter" \ " | unlet! b:browsefilter"
" proper matching for matchit plugin " proper matching for matchit plugin
let b:match_skip = 's:comment\|string\|perlQQ\|perlShellCommand\|perlHereDoc\|perlSubstitution\|perlTranslation\|perlMatch\|perlFormatField' let b:match_skip = 's:comment\|string\|perlQQ\|perlShellCommand\|perlHereDoc\|perlSubstitution\|perlTranslation\|perlMatch\|perlFormatField'
let b:match_words = '\<if\>:\<elsif\>:\<else\>'
" Restore the saved compatibility options. " Restore the saved compatibility options.
let &cpo = s:save_cpo let &cpo = s:save_cpo

View File

@ -1,14 +1,12 @@
" Vim indent file " Vim indent file
" Program: CMake - Cross-Platform Makefile Generator
" Module: $RCSfile: cmake-indent.vim,v $
" Language: CMake (ft=cmake) " Language: CMake (ft=cmake)
" Author: Andy Cedilnik <andy.cedilnik@kitware.com> " Author: Andy Cedilnik <andy.cedilnik@kitware.com>
" Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com> " Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
" Last Change: $Date: 2008-01-16 16:53:53 $ " Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
" Version: $Revision: 1.9 $ " Last Change: 2017 Aug 30
" "
" Licence: The CMake license applies to this file. See " Licence: The CMake license applies to this file. See
" http://www.cmake.org/HTML/Copyright.html " https://cmake.org/licensing
" This implies that distribution with Vim is allowed " This implies that distribution with Vim is allowed
if exists("b:did_indent") if exists("b:did_indent")
@ -16,6 +14,7 @@ if exists("b:did_indent")
endif endif
let b:did_indent = 1 let b:did_indent = 1
setlocal et
setlocal indentexpr=CMakeGetIndent(v:lnum) setlocal indentexpr=CMakeGetIndent(v:lnum)
setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE( setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
@ -68,19 +67,19 @@ fun! CMakeGetIndent(lnum)
let ind = ind let ind = ind
else else
if previous_line =~? cmake_indent_begin_regex if previous_line =~? cmake_indent_begin_regex
let ind = ind + shiftwidth() let ind = ind + &sw
endif endif
if previous_line =~? cmake_indent_open_regex if previous_line =~? cmake_indent_open_regex
let ind = ind + shiftwidth() let ind = ind + &sw
endif endif
endif endif
" Subtract " Subtract
if this_line =~? cmake_indent_end_regex if this_line =~? cmake_indent_end_regex
let ind = ind - shiftwidth() let ind = ind - &sw
endif endif
if previous_line =~? cmake_indent_close_regex if previous_line =~? cmake_indent_close_regex
let ind = ind - shiftwidth() let ind = ind - &sw
endif endif
return ind return ind

View File

@ -2,7 +2,7 @@
" Language: Javascript " Language: Javascript
" Maintainer: Chris Paul ( https://github.com/bounceme ) " Maintainer: Chris Paul ( https://github.com/bounceme )
" URL: https://github.com/pangloss/vim-javascript " URL: https://github.com/pangloss/vim-javascript
" Last Change: March 21, 2017 " Last Change: September 18, 2017
" 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')
@ -10,6 +10,10 @@ if exists('b:did_indent')
endif endif
let b:did_indent = 1 let b:did_indent = 1
" indent correctly if inside <script>
" vim/vim@690afe1 for the switch from cindent
let b:html_indent_script1 = 'inc'
" Now, set up our indentation expression and keys that trigger it. " Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetJavascriptIndent() setlocal indentexpr=GetJavascriptIndent()
setlocal autoindent nolisp nosmartindent setlocal autoindent nolisp nosmartindent
@ -21,6 +25,13 @@ setlocal indentkeys+=0],0)
let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<' let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<'
" Regex of syntax group names that are or delimit string or are comments.
let b:syng_strcom = get(b:,'syng_strcom','string\|comment\|regex\|special\|doc\|template\%(braces\)\@!')
let b:syng_str = get(b:,'syng_str','string\|template\|special')
" template strings may want to be excluded when editing graphql:
" au! Filetype javascript let b:syng_str = '^\%(.*template\)\@!.*string\|special'
" au! Filetype javascript let b:syng_strcom = '^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc'
" Only define the function once. " Only define the function once.
if exists('*GetJavascriptIndent') if exists('*GetJavascriptIndent')
finish finish
@ -36,7 +47,7 @@ if exists('*shiftwidth')
endfunction endfunction
else else
function s:sw() function s:sw()
return &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth return &l:shiftwidth ? &l:shiftwidth : &l:tabstop
endfunction endfunction
endif endif
@ -44,272 +55,301 @@ endif
" matches before pos. " matches before pos.
let s:z = has('patch-7.4.984') ? 'z' : '' let s:z = has('patch-7.4.984') ? 'z' : ''
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr = "s:SynAt(line('.'),col('.')) =~? b:syng_strcom"
let s:in_comm = s:skip_expr[:-14] . "'comment\\|doc'"
let s:rel = has('reltime')
" searchpair() wrapper " searchpair() wrapper
if has('reltime') if s:rel
function s:GetPair(start,end,flags,skip,time,...) function s:GetPair(start,end,flags,skip)
return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 2000,0] + a:000),a:time) return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,s:l1,a:skip ==# 's:SkipFunc()' ? 2000 : 200)
endfunction endfunction
else else
function s:GetPair(start,end,flags,skip,...) function s:GetPair(start,end,flags,skip)
return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 1000,get(a:000,1)])) return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,s:l1)
endfunction endfunction
endif endif
" Regex of syntax group names that are or delimit string or are comments. function s:SynAt(l,c)
let s:syng_strcom = 'string\|comment\|regex\|special\|doc\|template\%(braces\)\@!' let byte = line2byte(a:l) + a:c - 1
let s:syng_str = 'string\|template\|special' let pos = index(s:synid_cache[0], byte)
let s:syng_com = 'comment\|doc' if pos == -1
" Expression used to check whether we should skip a match with searchpair(). let s:synid_cache[:] += [[byte], [synIDattr(synID(a:l, a:c, 0), 'name')]]
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
function s:parse_cino(f) abort
return float2nr(eval(substitute(substitute(join(split(
\ matchstr(&cino,'.*'.a:f.'\zs[^,]*'), 's',1), '*'.s:W)
\ , '^-\=\zs\*','',''), '^-\=\zs\.','0.','')))
endfunction
function s:skip_func()
if getline('.') =~ '\%<'.col('.').'c\/.\{-}\/\|\%>'.col('.').'c[''"]\|\\$'
return eval(s:skip_expr)
elseif s:checkIn || search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn)
let s:checkIn = eval(s:skip_expr)
endif endif
let s:looksyn = line('.') return s:synid_cache[1][pos]
return s:checkIn
endfunction endfunction
function s:alternatePair(stop) function s:ParseCino(f)
let pos = getpos('.')[1:2] let [divider, n, cstr] = [0] + matchlist(&cino,
let pat = '[][(){};]' \ '\%(.*,\)\=\%(\%d'.char2nr(a:f).'\(-\)\=\([.s0-9]*\)\)\=')[1:2]
while search('\m'.pat,'bW',a:stop) for c in split(cstr,'\zs')
if s:skip_func() | continue | endif if c == '.' && !divider
let idx = stridx('])};',s:looking_at()) let divider = 1
if idx is 3 | let pat = '[{}()]' | continue | endif elseif c ==# 's'
if idx + 1 if n !~ '\d'
if s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,a:stop) <= 0 return n . s:sw() + 0
endif
let n = str2nr(n) * s:sw()
break
else
let [n, divider] .= [c, 0]
endif
endfor
return str2nr(n) / max([str2nr(divider),1])
endfunction
" Optimized {skip} expr, only callable from the search loop which
" GetJavascriptIndent does to find the containing [[{(] (side-effects)
function s:SkipFunc()
if s:top_col == 1
throw 'out of bounds'
endif
let s:top_col = 0
if s:check_in
if eval(s:skip_expr)
return 1
endif
let s:check_in = 0
elseif getline('.') =~ '\%<'.col('.').'c\/.\{-}\/\|\%>'.col('.').'c[''"]\|\\$'
if eval(s:skip_expr)
let s:looksyn = a:firstline
return 1
endif
elseif search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn) && eval(s:skip_expr)
let s:check_in = 1
return 1
endif
let [s:looksyn, s:top_col] = getpos('.')[1:2]
endfunction
function s:AlternatePair()
let [pat, l:for] = ['[][(){};]', 2]
while s:SearchLoop(pat,'bW','s:SkipFunc()')
if s:LookingAt() == ';'
if !l:for
if s:GetPair('{','}','bW','s:SkipFunc()')
return
endif
break break
else
let [pat, l:for] = ['[{}();]', l:for - 1]
endif endif
else else
return let idx = stridx('])}',s:LookingAt())
if idx == -1
return
elseif !s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:SkipFunc()')
break
endif
endif endif
endwhile endwhile
call call('cursor',pos) throw 'out of bounds'
endfunction endfunction
function s:save_pos(f,...) function s:Nat(int)
let l:pos = getpos('.')[1:2] return a:int * (a:int > 0)
let ret = call(a:f,a:000)
call call('cursor',l:pos)
return ret
endfunction endfunction
function s:syn_at(l,c) function s:LookingAt()
return synIDattr(synID(a:l,a:c,0),'name')
endfunction
function s:looking_at()
return getline('.')[col('.')-1] return getline('.')[col('.')-1]
endfunction endfunction
function s:token() function s:Token()
return s:looking_at() =~ '\k' ? expand('<cword>') : s:looking_at() return s:LookingAt() =~ '\k' ? expand('<cword>') : s:LookingAt()
endfunction endfunction
function s:previous_token() function s:PreviousToken()
let l:pos = getpos('.')[1:2] let l:col = col('.')
if search('\m\k\{1,}\zs\k\|\S','bW') if search('\m\k\{1,}\|\S','ebW')
if (getline('.')[col('.')-2:col('.')-1] == '*/' || line('.') != l:pos[0] && if search('\m\*\%#\/\|\/\/\%<'.a:firstline.'l','nbW',line('.')) && eval(s:in_comm)
\ getline('.') =~ '\%<'.col('.').'c\/\/') && s:syn_at(line('.'),col('.')) =~? s:syng_com if s:SearchLoop('\S\ze\_s*\/[/*]','bW',s:in_comm)
while search('\m\S\ze\_s*\/[/*]','bW') return s:Token()
if s:syn_at(line('.'),col('.')) !~? s:syng_com endif
return s:token() call cursor(a:firstline, l:col)
endif
endwhile
else else
return s:token() return s:Token()
endif endif
endif endif
call call('cursor',l:pos)
return '' return ''
endfunction endfunction
function s:expr_col() function s:Pure(f,...)
if getline('.')[col('.')-2] == ':' return eval("[call(a:f,a:000),cursor(a:firstline,".col('.').")][0]")
return 1 endfunction
endif
function s:SearchLoop(pat,flags,expr)
return s:GetPair(a:pat,'\_$.',a:flags,a:expr)
endfunction
function s:ExprCol()
let bal = 0 let bal = 0
while search('\m[{}?:;]','bW') while s:SearchLoop('[{}?]\|\_[^:]\zs::\@!','bW',s:skip_expr)
if eval(s:skip_expr) | continue | endif if s:LookingAt() == ':'
" switch (looking_at()) let bal -= 1
exe { '}': "if s:GetPair('{','}','bW',s:skip_expr,200) <= 0 | return | endif", elseif s:LookingAt() == '?'
\ ';': "return", let bal += 1
\ '{': "return getpos('.')[1:2] != b:js_cache[1:] && !s:IsBlock()", if bal == 1
\ ':': "let bal -= getline('.')[max([col('.')-2,0]):col('.')] !~ '::'", break
\ '?': "let bal += 1 | if bal > 0 | return 1 | endif" }[s:looking_at()] endif
elseif s:LookingAt() == '{'
let bal = !s:IsBlock()
break
elseif !s:GetPair('{','}','bW',s:skip_expr)
break
endif
endwhile endwhile
return s:Nat(bal)
endfunction endfunction
" configurable regexes that define continuation lines, not including (, {, or [. " configurable regexes that define continuation lines, not including (, {, or [.
let s:opfirst = '^' . get(g:,'javascript_opfirst', let s:opfirst = '^' . get(g:,'javascript_opfirst',
\ '\C\%([<>=,?^%|*/&]\|\([-.:+]\)\1\@!\|!=\|in\%(stanceof\)\=\>\)') \ '\C\%([<>=,.?^%|/&]\|\([-:+]\)\1\@!\|\*\+\|!=\|in\%(stanceof\)\=\>\)')
let s:continuation = get(g:,'javascript_continuation', let s:continuation = get(g:,'javascript_continuation',
\ '\C\%([-+<>=,.~!?/*^%|&:]\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$' \ '\C\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$'
function s:continues(ln,con) function s:Continues(ln,con)
if !cursor(a:ln, match(' '.a:con,s:continuation)) let tok = matchstr(a:con[-15:],s:continuation)
let teol = s:looking_at() if tok =~ '[a-z:]'
if teol == '/' call cursor(a:ln, len(a:con))
return s:syn_at(line('.'),col('.')) !~? 'regex' return tok == ':' ? s:ExprCol() : s:PreviousToken() != '.'
elseif teol =~ '[-+>]' elseif tok !~ '[/>]'
return getline('.')[col('.')-2] != tr(teol,'>','=') return tok isnot ''
elseif teol =~ '\l'
return s:previous_token() != '.'
elseif teol == ':'
return s:expr_col()
endif
return 1
endif endif
endfunction return s:SynAt(a:ln, len(a:con)) !~? (tok == '>' ? 'jsflow\|^html' : 'regex')
" get the line of code stripped of comments and move cursor to the last
" non-comment char.
function s:Trim(ln)
let pline = substitute(getline(a:ln),'\s*$','','')
let l:max = max([strridx(pline,'//'), strridx(pline,'/*')])
while l:max != -1 && s:syn_at(a:ln, strlen(pline)) =~? s:syng_com
let pline = pline[: l:max]
let l:max = max([strridx(pline,'//'), strridx(pline,'/*')])
let pline = substitute(pline[:-2],'\s*$','','')
endwhile
return pline is '' || cursor(a:ln,strlen(pline)) ? pline : pline
endfunction
" Find line above 'lnum' that isn't empty or in a comment
function s:PrevCodeLine(lnum)
let [l:pos, l:n] = [getpos('.')[1:2], prevnonblank(a:lnum)]
while l:n
if getline(l:n) =~ '^\s*\/[/*]'
let l:n = prevnonblank(l:n-1)
elseif stridx(getline(l:n), '*/') + 1 && s:syn_at(l:n,1) =~? s:syng_com
call cursor(l:n,1)
keepjumps norm! [*
let l:n = search('\m\S','nbW')
else
break
endif
endwhile
call call('cursor',l:pos)
return l:n
endfunction endfunction
" Check if line 'lnum' has a balanced amount of parentheses. " Check if line 'lnum' has a balanced amount of parentheses.
function s:Balanced(lnum) function s:Balanced(lnum)
let l:open = 0 let [l:open, l:line] = [0, getline(a:lnum)]
let l:line = getline(a:lnum) let pos = match(l:line, '[][(){}]')
let pos = match(l:line, '[][(){}]', 0)
while pos != -1 while pos != -1
if s:syn_at(a:lnum,pos + 1) !~? s:syng_strcom if s:SynAt(a:lnum,pos + 1) !~? b:syng_strcom
let l:open += match(' ' . l:line[pos],'[[({]') let l:open += match(' ' . l:line[pos],'[[({]')
if l:open < 0 if l:open < 0
return return
endif endif
endif endif
let pos = match(l:line, (l:open ? let pos = match(l:line, !l:open ? '[][(){}]' : '()' =~ l:line[pos] ?
\ '['.escape(tr(l:line[pos],'({[]})',')}][{(').l:line[pos],']').']' : \ '[()]' : '{}' =~ l:line[pos] ? '[{}]' : '[][]', pos + 1)
\ '[][(){}]'), pos + 1)
endwhile endwhile
return !l:open return !l:open
endfunction endfunction
function s:OneScope(lnum) function s:OneScope()
let pline = s:Trim(a:lnum) if s:LookingAt() == ')' && s:GetPair('(', ')', 'bW', s:skip_expr)
let kw = 'else do' let tok = s:PreviousToken()
if pline[-1:] == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0 return (count(split('for if let while with'),tok) ||
if s:previous_token() =~# '^\%(await\|each\)$' \ tok =~# '^await$\|^each$' && s:PreviousToken() ==# 'for') &&
call s:previous_token() \ s:Pure('s:PreviousToken') != '.' && !(tok == 'while' && s:DoWhile())
let kw = 'for' elseif s:Token() =~# '^else$\|^do$'
else return s:Pure('s:PreviousToken') != '.'
let kw = 'for if let while with'
endif
endif endif
return pline[-2:] == '=>' || index(split(kw),s:token()) + 1 && return strpart(getline('.'),col('.')-2,2) == '=>'
\ s:save_pos('s:previous_token') != '.'
endfunction endfunction
" returns braceless levels started by 'i' and above lines * shiftwidth(). function s:DoWhile()
" 'num' is the lineNr which encloses the entire context, 'cont' if whether let cpos = searchpos('\m\<','cbW')
" line 'i' + 1 is a continued expression, which could have started in a if s:SearchLoop('\C[{}]\|\<\%(do\|while\)\>','bW',s:skip_expr)
" braceless context if s:{s:LookingAt() == '}' && s:GetPair('{','}','bW',s:skip_expr) ?
function s:iscontOne(i,num,cont) \ 'Previous' : ''}Token() ==# 'do' && s:IsBlock()
let [l:i, l:num, bL] = [a:i, a:num + !a:num, 0] return 1
let pind = a:num ? indent(l:num) + s:W : 0 endif
let ind = indent(l:i) + (a:cont ? 0 : s:W) call call('cursor',cpos)
while l:i >= l:num && (ind > pind || l:i == l:num) endif
if indent(l:i) < ind && s:OneScope(l:i) endfunction
let bL += s:W
let l:i = line('.') " returns total offset from braceless contexts. 'num' is the lineNr which
elseif !a:cont || bL || ind < indent(a:i) " encloses the entire context, 'cont' if whether a:firstline is a continued
" expression, which could have started in a braceless context
function s:IsContOne(num,cont)
let [l:num, b_l] = [a:num + !a:num, 0]
let pind = a:num ? indent(a:num) + s:sw() : 0
let ind = indent('.') + !a:cont
while line('.') > l:num && ind > pind || line('.') == l:num
if indent('.') < ind && s:OneScope()
let b_l += 1
elseif !a:cont || b_l || ind < indent(a:firstline)
break
else
call cursor(0,1)
endif
let ind = min([ind, indent('.')])
if s:PreviousToken() is ''
break break
endif endif
let ind = min([ind, indent(l:i)])
let l:i = s:PrevCodeLine(l:i - 1)
endwhile endwhile
return bL return b_l
endfunction
function s:Class()
return (s:Token() ==# 'class' || s:PreviousToken() =~# '^class$\|^extends$') &&
\ s:PreviousToken() != '.'
endfunction
function s:IsSwitch()
return s:PreviousToken() !~ '[.*]' &&
\ (!s:GetPair('{','}','cbW',s:skip_expr) || s:IsBlock() && !s:Class())
endfunction endfunction
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader " https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
function s:IsBlock() function s:IsBlock()
if s:looking_at() == '{' let tok = s:PreviousToken()
let l:n = line('.') if join(s:stack) =~? 'xml\|jsx' && s:SynAt(line('.'),col('.')-1) =~? 'xml\|jsx'
let char = s:previous_token() return tok != '{'
if match(s:stack,'\cxml\|jsx') + 1 && s:syn_at(line('.'),col('.')-1) =~? 'xml\|jsx' elseif tok =~ '\k'
return char != '{' if tok ==# 'type'
elseif char =~ '\k' return s:Pure('eval',"s:PreviousToken() !~# '^\\%(im\\|ex\\)port$' || s:PreviousToken() == '.'")
if char ==# 'type' elseif tok ==# 'of'
return s:previous_token() !~# '^\%(im\|ex\)port$' return s:Pure('eval',"!s:GetPair('[[({]','[])}]','bW',s:skip_expr) || s:LookingAt() != '(' ||"
endif \ ."s:{s:PreviousToken() ==# 'await' ? 'Previous' : ''}Token() !=# 'for' || s:PreviousToken() == '.'")
return index(split('return const let import export extends yield default delete var await void typeof throw case new of in instanceof')
\ ,char) < (line('.') != l:n) || s:save_pos('s:previous_token') == '.'
elseif char == '>'
return getline('.')[col('.')-2] == '=' || s:syn_at(line('.'),col('.')) =~? '^jsflow'
elseif char == ':'
return !s:save_pos('s:expr_col')
elseif char == '/'
return s:syn_at(line('.'),col('.')) =~? 'regex'
endif endif
return char !~ '[=~!<*,?^%|&([]' && return index(split('return const let import export extends yield default delete var await void typeof throw case new in instanceof')
\ (char !~ '[-+]' || l:n != line('.') && getline('.')[col('.')-2] == char) \ ,tok) < (line('.') != a:firstline) || s:Pure('s:PreviousToken') == '.'
elseif tok == '>'
return getline('.')[col('.')-2] == '=' || s:SynAt(line('.'),col('.')) =~? 'jsflow\|^html'
elseif tok == '*'
return s:Pure('s:PreviousToken') == ':'
elseif tok == ':'
return s:Pure('eval',"s:PreviousToken() =~ '^\\K\\k*$' && !s:ExprCol()")
elseif tok == '/'
return s:SynAt(line('.'),col('.')) =~? 'regex'
elseif tok !~ '[=~!<,.?^%|&([]'
return tok !~ '[-+]' || line('.') != a:firstline && getline('.')[col('.')-2] == tok
endif endif
endfunction endfunction
function GetJavascriptIndent() function GetJavascriptIndent()
let b:js_cache = get(b:,'js_cache',[0,0,0]) let b:js_cache = get(b:,'js_cache',[0,0,0])
" Get the current line. let s:synid_cache = [[],[]]
call cursor(v:lnum,1) let l:line = getline(v:lnum)
let l:line = getline('.')
" use synstack as it validates syn state and works in an empty line " use synstack as it validates syn state and works in an empty line
let s:stack = map(synstack(v:lnum,1),"synIDattr(v:val,'name')") let s:stack = [''] + map(synstack(v:lnum,1),"synIDattr(v:val,'name')")
let syns = get(s:stack,-1,'')
" start with strings,comments,etc. " start with strings,comments,etc.
if syns =~? s:syng_com if s:stack[-1] =~? 'comment\|doc'
if l:line =~ '^\s*\*' if l:line =~ '^\s*\*'
return cindent(v:lnum) return cindent(v:lnum)
elseif l:line !~ '^\s*\/[/*]' elseif l:line !~ '^\s*\/[/*]'
return -1 return -1
endif endif
elseif syns =~? s:syng_str elseif s:stack[-1] =~? b:syng_str
if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1) if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1)
let b:js_cache[0] = v:lnum let b:js_cache[0] = v:lnum
endif endif
return -1 return -1
endif endif
let l:lnum = s:PrevCodeLine(v:lnum - 1)
if !l:lnum let s:l1 = max([0,prevnonblank(v:lnum) - (s:rel ? 2000 : 1000),
\ get(get(b:,'hi_indent',{}),'blocklnr')])
call cursor(v:lnum,1)
if s:PreviousToken() is ''
return return
endif endif
let [l:lnum, pline] = [line('.'), getline('.')[:col('.')-1]]
let l:line = substitute(l:line,'^\s*','','') let l:line = substitute(l:line,'^\s*','','')
let l:line_raw = l:line
if l:line[:1] == '/*' if l:line[:1] == '/*'
let l:line = substitute(l:line,'^\%(\/\*.\{-}\*\/\s*\)*','','') let l:line = substitute(l:line,'^\%(\/\*.\{-}\*\/\s*\)*','','')
endif endif
@ -318,60 +358,91 @@ function GetJavascriptIndent()
endif endif
" the containing paren, bracket, or curly. Many hacks for performance " the containing paren, bracket, or curly. Many hacks for performance
call cursor(v:lnum,1)
let idx = index([']',')','}'],l:line[0]) let idx = index([']',')','}'],l:line[0])
if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum && if b:js_cache[0] > l:lnum && b:js_cache[0] < v:lnum ||
\ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum)) \ b:js_cache[0] == l:lnum && s:Balanced(l:lnum)
call call('cursor',b:js_cache[1:]) call call('cursor',b:js_cache[1:])
else else
let [s:looksyn, s:checkIn, top] = [v:lnum - 1, 0, (!indent(l:lnum) && let [s:looksyn, s:top_col, s:check_in, s:l1] = [v:lnum - 1,0,0,
\ s:syn_at(l:lnum,1) !~? s:syng_str) * l:lnum] \ max([s:l1, &smc ? search('\m^.\{'.&smc.',}','nbW',s:l1 + 1) + 1 : 0])]
if idx + 1 try
call s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:skip_func()',2000,top) if idx != -1
elseif getline(v:lnum) !~ '^\S' && syns =~? 'block' call s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:SkipFunc()')
call s:GetPair('{','}','bW','s:skip_func()',2000,top) elseif getline(v:lnum) !~ '^\S' && s:stack[-1] =~? 'block\|^jsobject$'
else call s:GetPair('{','}','bW','s:SkipFunc()')
call s:alternatePair(top) else
endif call s:AlternatePair()
endif
catch /^\Cout of bounds$/
call cursor(v:lnum,1)
endtry
let b:js_cache[1:] = line('.') == v:lnum ? [0,0] : getpos('.')[1:2]
endif endif
let b:js_cache = [v:lnum] + (line('.') == v:lnum ? [0,0] : getpos('.')[1:2]) let [b:js_cache[0], num] = [v:lnum, b:js_cache[1]]
let num = b:js_cache[1]
let [s:W, isOp, bL, switch_offset] = [s:sw(),0,0,0] let [num_ind, is_op, b_l, l:switch_offset] = [s:Nat(indent(num)),0,0,0]
if !num || s:IsBlock() if !num || s:LookingAt() == '{' && s:IsBlock()
let ilnum = line('.') let ilnum = line('.')
let pline = s:save_pos('s:Trim',l:lnum) if num && s:LookingAt() == ')' && s:GetPair('(',')','bW',s:skip_expr)
if num && s:looking_at() == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0 if ilnum == num
let num = ilnum == num ? line('.') : num let [num, num_ind] = [line('.'), indent('.')]
if idx < 0 && s:previous_token() ==# 'switch' && s:previous_token() != '.' endif
if &cino !~ ':' if idx == -1 && s:PreviousToken() ==# 'switch' && s:IsSwitch()
let switch_offset = s:W let l:switch_offset = &cino !~ ':' ? s:sw() : s:ParseCino(':')
else
let switch_offset = max([-indent(num),s:parse_cino(':')])
endif
if pline[-1:] != '.' && l:line =~# '^\%(default\|case\)\>' if pline[-1:] != '.' && l:line =~# '^\%(default\|case\)\>'
return indent(num) + switch_offset return s:Nat(num_ind + l:switch_offset)
elseif &cino =~ '='
let l:case_offset = s:ParseCino('=')
endif endif
endif endif
endif endif
if idx < 0 && pline[-1:] !~ '[{;]' if idx == -1 && pline[-1:] !~ '[{;]'
let isOp = (l:line =~# s:opfirst || s:continues(l:lnum,pline)) * s:W let sol = matchstr(l:line,s:opfirst)
let bL = s:iscontOne(l:lnum,b:js_cache[1],isOp) if sol is '' || sol == '/' && s:SynAt(v:lnum,
let bL -= (bL && l:line[0] == '{') * s:W \ 1 + len(getline(v:lnum)) - len(l:line)) =~? 'regex'
if s:Continues(l:lnum,pline)
let is_op = s:sw()
endif
elseif num && sol =~# '^\%(in\%(stanceof\)\=\|\*\)$'
call call('cursor',b:js_cache[1:])
if s:PreviousToken() =~ '\k' && s:Class()
return num_ind + s:sw()
endif
let is_op = s:sw()
else
let is_op = s:sw()
endif
call cursor(l:lnum, len(pline))
let b_l = s:Nat(s:IsContOne(b:js_cache[1],is_op) - (!is_op && l:line =~ '^{')) * s:sw()
endif endif
elseif idx < 0 && getline(b:js_cache[1])[b:js_cache[2]-1] == '(' && &cino =~ '(' elseif idx.s:LookingAt().&cino =~ '^-1(.*(' && (search('\m\S','nbW',num) || s:ParseCino('U'))
let pval = s:parse_cino('(') let pval = s:ParseCino('(')
return !pval ? (s:parse_cino('w') ? 0 : -(!!search('\m\S','W'.s:z,num))) + virtcol('.') : if !pval
\ max([indent('.') + pval + (s:GetPair('(',')','nbrmW',s:skip_expr,100,num) * s:W),0]) let [Wval, vcol] = [s:ParseCino('W'), virtcol('.')]
if search('\m\S','W',num)
return s:ParseCino('w') ? vcol : virtcol('.')-1
endif
return Wval ? s:Nat(num_ind + Wval) : vcol
endif
return s:Nat(num_ind + pval + searchpair('\m(','','\m)','nbrmW',s:skip_expr,num) * s:sw())
endif endif
" main return " main return
if l:line =~ '^\%([])}]\||}\)' if l:line =~ '^[])}]\|^|}'
return max([indent(num),0]) if l:line_raw[0] == ')' && getline(num)[b:js_cache[2]-1] == '('
if s:ParseCino('M')
return indent(l:lnum)
elseif &cino =~# 'm' && !s:ParseCino('m')
return virtcol('.') - 1
endif
endif
return num_ind
elseif num elseif num
return indent(num) + s:W + switch_offset + bL + isOp return s:Nat(num_ind + get(l:,'case_offset',s:sw()) + l:switch_offset + b_l + is_op)
endif endif
return bL + isOp return b_l + is_op
endfunction endfunction
let &cpo = s:cpo_save let &cpo = s:cpo_save

View File

@ -3,7 +3,7 @@
" Maintainer: vim-perl <vim-perl@googlegroups.com> " Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl " Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2017 Jun 13 " Last Change: 2017-01-04
" Suggestions and improvements by : " Suggestions and improvements by :
" Aaron J. Sherman (use syntax for hints) " Aaron J. Sherman (use syntax for hints)
@ -48,11 +48,6 @@ function! GetPerlIndent()
return 0 return 0
endif endif
" Don't reindent comments on first column
if cline =~ '^#.'
return 0
endif
" Get current syntax item at the line's first char " Get current syntax item at the line's first char
let csynid = '' let csynid = ''
if b:indent_use_syntax if b:indent_use_syntax
@ -134,6 +129,7 @@ function! GetPerlIndent()
\ || synid == "perlMatchStartEnd" \ || synid == "perlMatchStartEnd"
\ || synid == "perlHereDoc" \ || synid == "perlHereDoc"
\ || synid == "perlBraces" \ || synid == "perlBraces"
\ || synid == "perlStatementIndirObj"
\ || synid =~ "^perlFiledescStatement" \ || synid =~ "^perlFiledescStatement"
\ || synid =~ '^perl\(Sub\|Block\|Package\)Fold' \ || synid =~ '^perl\(Sub\|Block\|Package\)Fold'
let brace = strpart(line, bracepos, 1) let brace = strpart(line, bracepos, 1)
@ -151,6 +147,7 @@ function! GetPerlIndent()
if synid == "" if synid == ""
\ || synid == "perlMatchStartEnd" \ || synid == "perlMatchStartEnd"
\ || synid == "perlBraces" \ || synid == "perlBraces"
\ || synid == "perlStatementIndirObj"
\ || synid =~ '^perl\(Sub\|Block\|Package\)Fold' \ || synid =~ '^perl\(Sub\|Block\|Package\)Fold'
let ind = ind - shiftwidth() let ind = ind - shiftwidth()
endif endif

View File

@ -1,7 +1,7 @@
" These commands create the option window. " These commands create the option window.
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Aug 19 " Last Change: 2017 Sep 10
" If there already is an option window, jump to that one. " If there already is an option window, jump to that one.
let buf = bufnr('option-window') let buf = bufnr('option-window')
@ -1225,6 +1225,8 @@ endif
call append("$", "iminsert\tin Insert mode: 1: use :lmap; 2: use IM; 0: neither") call append("$", "iminsert\tin Insert mode: 1: use :lmap; 2: use IM; 0: neither")
call append("$", "\t(local to window)") call append("$", "\t(local to window)")
call <SID>OptionL("imi") call <SID>OptionL("imi")
call append("$", "imstyle\tinput method style, 0: on-the-spot, 1: over-the-spot")
call <SID>OptionG("imst", &imst)
call append("$", "imsearch\tentering a search pattern: 1: use :lmap; 2: use IM; 0: neither") call append("$", "imsearch\tentering a search pattern: 1: use :lmap; 2: use IM; 0: neither")
call append("$", "\t(local to window)") call append("$", "\t(local to window)")
call <SID>OptionL("ims") call <SID>OptionL("ims")

View File

@ -1,5 +1,5 @@
" matchit.vim: (global plugin) Extended "%" matching " matchit.vim: (global plugin) Extended "%" matching
" Last Change: 2017 March 26 " Last Change: 2017 Sep 15
" Maintainer: Benji Fisher PhD <benji@member.AMS.org> " Maintainer: Benji Fisher PhD <benji@member.AMS.org>
" Version: 1.13.3, for Vim 6.3+ " Version: 1.13.3, for Vim 6.3+
" Fix from Fernando Torres included. " Fix from Fernando Torres included.
@ -704,9 +704,8 @@ fun! s:MultiMatch(spflag, mode)
let skip = 's:comment\|string' let skip = 's:comment\|string'
endif endif
let skip = s:ParseSkip(skip) let skip = s:ParseSkip(skip)
" let restore_cursor = line(".") . "G" . virtcol(".") . "|" " save v:count1 variable, might be reset from the restore_cursor command
" normal! H let level = v:count1
" let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
let restore_cursor = virtcol(".") . "|" let restore_cursor = virtcol(".") . "|"
normal! g0 normal! g0
let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor
@ -726,7 +725,6 @@ fun! s:MultiMatch(spflag, mode)
execute "if " . skip . "| let skip = '0' | endif" execute "if " . skip . "| let skip = '0' | endif"
endif endif
mark ' mark '
let level = v:count1
while level while level
if searchpair(openpat, '', closepat, a:spflag, skip) < 1 if searchpair(openpat, '', closepat, a:spflag, skip) < 1
call s:CleanUp(restore_options, a:mode, startline, startcol) call s:CleanUp(restore_options, a:mode, startline, startcol)

View File

@ -15,6 +15,11 @@
" Author: Bram Moolenaar " Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license" " Copyright: Vim license applies, see ":help license"
" In case this gets loaded twice.
if exists(':Termdebug')
finish
endif
" The command that starts debugging, e.g. ":Termdebug vim". " The command that starts debugging, e.g. ":Termdebug vim".
" To end type "quit" in the gdb window. " To end type "quit" in the gdb window.
command -nargs=* -complete=file Termdebug call s:StartDebug(<q-args>) command -nargs=* -complete=file Termdebug call s:StartDebug(<q-args>)

View File

@ -136,7 +136,7 @@ syntax match clojureRegexpBoundary "[$^]" contained display
syntax match clojureRegexpQuantifier "[?*+][?+]\=" contained display syntax match clojureRegexpQuantifier "[?*+][?+]\=" contained display
syntax match clojureRegexpQuantifier "\v\{\d+%(,|,\d+)?}\??" contained display syntax match clojureRegexpQuantifier "\v\{\d+%(,|,\d+)?}\??" contained display
syntax match clojureRegexpOr "|" contained display syntax match clojureRegexpOr "|" contained display
syntax match clojureRegexpBackRef "\v\\%([1-9]\d*|k\<[a-zA-z]+\>)" contained display syntax match clojureRegexpBackRef "\v\\%([1-9]\d*|k\<[a-zA-Z]+\>)" contained display
" Mode modifiers, mode-modified spans, lookaround, regular and atomic " Mode modifiers, mode-modified spans, lookaround, regular and atomic
" grouping, and named-capturing. " grouping, and named-capturing.

File diff suppressed because one or more lines are too long

View File

@ -85,7 +85,7 @@ syn match formComment "\;\ *\*.*$" contains=formTodo
syn region formString start=+"+ end=+"+ contains=formSpecial syn region formString start=+"+ end=+"+ contains=formSpecial
syn region formString start=+'+ end=+'+ syn region formString start=+'+ end=+'+
syn region formNestedString start=+`+ end=+'+ contains=formNestedString syn region formNestedString start=+`+ end=+'+ contains=formNestedString
syn match formPreProc "^\=\#[a-zA-z][a-zA-Z0-9]*\>" syn match formPreProc "^\=\#[a-zA-Z][a-zA-Z0-9]*\>"
syn match formNumber "\<\d\+\>" syn match formNumber "\<\d\+\>"
syn match formNumber "\<\d\+\.\d*\>" syn match formNumber "\<\d\+\.\d*\>"
syn match formNumber "\.\d\+\>" syn match formNumber "\.\d\+\>"
@ -94,13 +94,13 @@ syn match formNumber "-\.\d" contains=Number
syn match formNumber "i_\+\>" syn match formNumber "i_\+\>"
syn match formNumber "fac_\+\>" syn match formNumber "fac_\+\>"
" pattern matching wildcards " pattern matching wildcards
syn match formNumber "?[A-z0-9]*" syn match formNumber "?[a-zA-Z0-9]*"
" dollar-variables (new in 3.x) " dollar-variables (new in 3.x)
syn match formNumber "\\$[A-z0-9]*" syn match formNumber "\\$[a-zA-Z0-9]*"
" scalar products " scalar products
syn match formNumber "^\=[a-zA-z][a-zA-Z0-9]*\.[a-zA-z][a-zA-Z0-9]*\>" syn match formNumber "^\=[a-zA-Z][a-zA-Z0-9]*\.[a-zA-Z][a-zA-Z0-9]*\>"
syn match formDirective "^\=\.[a-zA-z][a-zA-Z0-9]*\>" syn match formDirective "^\=\.[a-zA-Z][a-zA-Z0-9]*\>"
" hi User Labels " hi User Labels
syn sync ccomment formComment minlines=10 syn sync ccomment formComment minlines=10

View File

@ -1,15 +1,13 @@
" Vim syntax file " Vim syntax file
" Language: Mason (Perl embedded in HTML) " Language: Mason (Perl embedded in HTML)
" Maintainer: Andrew Smith <andrewdsmith@yahoo.com> " Maintainer: vim-perl <vim-perl@googlegroups.com>
" Last change: 2003 May 11 " Homepage: http://github.com/vim-perl/vim-perl/tree/master
" URL: http://www.masonhq.com/editors/mason.vim " Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2017-09-12
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Andrew Smith <andrewdsmith@yahoo.com>
" "
" This seems to work satisfactorily with html.vim and perl.vim for version 5.5. " TODO:
" Please mail any fixes or improvements to the above address. Things that need
" doing include:
"
" - Add match for component names in <& &> blocks.
" - Add match for component names in <%def> and <%method> block delimiters.
" - Fix <%text> blocks to show HTML tags but ignore Mason tags. " - Fix <%text> blocks to show HTML tags but ignore Mason tags.
" "
@ -34,30 +32,38 @@ syn cluster htmlPreproc add=@masonTop
" Now pull in the Perl syntax. " Now pull in the Perl syntax.
" "
syn include @perlTop syntax/perl.vim syn include @perlTop syntax/perl.vim
unlet b:current_syntax
syn include @podTop syntax/pod.vim
" It's hard to reduce down to the correct sub-set of Perl to highlight in some " It's hard to reduce down to the correct sub-set of Perl to highlight in some
" of these cases so I've taken the safe option of just using perlTop in all of " of these cases so I've taken the safe option of just using perlTop in all of
" them. If you have any suggestions, please let me know. " them. If you have any suggestions, please let me know.
" "
syn region masonLine matchgroup=Delimiter start="^%" end="$" contains=@perlTop syn region masonPod start="^=[a-z]" end="^=cut" keepend contained contains=@podTop
syn region masonExpr matchgroup=Delimiter start="<%" end="%>" contains=@perlTop syn cluster perlTop remove=perlBraces
syn region masonPerl matchgroup=Delimiter start="<%perl>" end="</%perl>" contains=@perlTop syn region masonLine matchgroup=Delimiter start="^%" end="$" keepend contains=@perlTop
syn region masonComp keepend matchgroup=Delimiter start="<&" end="&>" contains=@perlTop syn region masonPerlComment start="#" end="\%(%>\)\@=\|$" contained contains=perlTodo,@Spell
syn region masonExpr matchgroup=Delimiter start="<%" end="%>" contains=@perlTop,masonPerlComment
syn region masonPerl matchgroup=Delimiter start="<%perl>" end="</%perl>" contains=masonPod,@perlTop
syn region masonComp keepend matchgroup=Delimiter start="<&\s*\%([-._/[:alnum:]]\+:\)\?[-._/[:alnum:]]*" end="&>" contains=@perlTop
syn region masonComp keepend matchgroup=Delimiter skipnl start="<&|\s*\%([-._/[:alnum:]]\+:\)\?[-._/[:alnum:]]*" end="&>" contains=@perlTop nextgroup=masonCompContent
syn region masonCompContent matchgroup=Delimiter start="" end="</&>" contained contains=@masonTop
syn region masonArgs matchgroup=Delimiter start="<%args>" end="</%args>" contains=@perlTop syn region masonArgs matchgroup=Delimiter start="<%args>" end="</%args>" contains=masonPod,@perlTop
syn region masonInit matchgroup=Delimiter start="<%init>" end="</%init>" contains=@perlTop syn region masonInit matchgroup=Delimiter start="<%init>" end="</%init>" contains=masonPod,@perlTop
syn region masonCleanup matchgroup=Delimiter start="<%cleanup>" end="</%cleanup>" contains=@perlTop syn region masonCleanup matchgroup=Delimiter start="<%cleanup>" end="</%cleanup>" contains=masonPod,@perlTop
syn region masonOnce matchgroup=Delimiter start="<%once>" end="</%once>" contains=@perlTop syn region masonOnce matchgroup=Delimiter start="<%once>" end="</%once>" contains=masonPod,@perlTop
syn region masonShared matchgroup=Delimiter start="<%shared>" end="</%shared>" contains=@perlTop syn region masonClass matchgroup=Delimiter start="<%class>" end="</%class>" contains=masonPod,@perlTop
syn region masonShared matchgroup=Delimiter start="<%shared>" end="</%shared>" contains=masonPod,@perlTop
syn region masonDef matchgroup=Delimiter start="<%def[^>]*>" end="</%def>" contains=@htmlTop syn region masonDef matchgroup=Delimiter start="<%def\s*[-._/[:alnum:]]\+\s*>" end="</%def>" contains=@htmlTop
syn region masonMethod matchgroup=Delimiter start="<%method[^>]*>" end="</%method>" contains=@htmlTop syn region masonMethod matchgroup=Delimiter start="<%method\s*[-._/[:alnum:]]\+\s*>" end="</%method>" contains=@htmlTop
syn region masonFlags matchgroup=Delimiter start="<%flags>" end="</%flags>" contains=@perlTop syn region masonFlags matchgroup=Delimiter start="<%flags>" end="</%flags>" contains=masonPod,@perlTop
syn region masonAttr matchgroup=Delimiter start="<%attr>" end="</%attr>" contains=@perlTop syn region masonAttr matchgroup=Delimiter start="<%attr>" end="</%attr>" contains=masonPod,@perlTop
syn region masonFilter matchgroup=Delimiter start="<%filter>" end="</%filter>" contains=@perlTop syn region masonFilter matchgroup=Delimiter start="<%filter>" end="</%filter>" contains=masonPod,@perlTop
syn region masonDoc matchgroup=Delimiter start="<%doc>" end="</%doc>" syn region masonDoc matchgroup=Delimiter start="<%doc>" end="</%doc>"
syn region masonText matchgroup=Delimiter start="<%text>" end="</%text>" syn region masonText matchgroup=Delimiter start="<%text>" end="</%text>"
@ -67,6 +73,8 @@ syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs,
" Set up default highlighting. Almost all of this is done in the included " Set up default highlighting. Almost all of this is done in the included
" syntax files. " syntax files.
hi def link masonDoc Comment hi def link masonDoc Comment
hi def link masonPod Comment
hi def link masonPerlComment perlComment
let b:current_syntax = "mason" let b:current_syntax = "mason"

View File

@ -3,7 +3,7 @@
" Maintainer: vim-perl <vim-perl@googlegroups.com> " Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl/tree/master " Homepage: http://github.com/vim-perl/vim-perl/tree/master
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013-07-23 " Last Change: 2017-09-12
" Contributors: Andy Lester <andy@petdance.com> " Contributors: Andy Lester <andy@petdance.com>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com> " Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Lukas Mai <l.mai.web.de> " Lukas Mai <l.mai.web.de>
@ -28,8 +28,9 @@
" unlet perl_fold " unlet perl_fold
" unlet perl_fold_blocks " unlet perl_fold_blocks
" unlet perl_nofold_packages " unlet perl_nofold_packages
" let perl_nofold_subs = 1 " unlet perl_nofold_subs
" unlet perl_fold_anonymous_subs " unlet perl_fold_anonymous_subs
" unlet perl_no_subprototype_error
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
@ -38,11 +39,6 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
if exists('&regexpengine')
let s:regexpengine=&regexpengine
set regexpengine=1
endif
" POD starts with ^=<word> and ends with ^=cut " POD starts with ^=<word> and ends with ^=cut
if !exists("perl_include_pod") || perl_include_pod == 1 if !exists("perl_include_pod") || perl_include_pod == 1
@ -83,7 +79,7 @@ syn match perlControl "\<\%(BEGIN\|CHECK\|INIT\|END\|UNITCHECK\)\>\_s*" nextgr
syn match perlStatementStorage "\<\%(my\|our\|local\|state\)\>" syn match perlStatementStorage "\<\%(my\|our\|local\|state\)\>"
syn match perlStatementControl "\<\%(return\|last\|next\|redo\|goto\|break\)\>" syn match perlStatementControl "\<\%(return\|last\|next\|redo\|goto\|break\)\>"
syn match perlStatementScalar "\<\%(chom\=p\|chr\|crypt\|r\=index\|lc\%(first\)\=\|length\|ord\|pack\|sprintf\|substr\|uc\%(first\)\=\)\>" syn match perlStatementScalar "\<\%(chom\=p\|chr\|crypt\|r\=index\|lc\%(first\)\=\|length\|ord\|pack\|sprintf\|substr\|fc\|uc\%(first\)\=\)\>"
syn match perlStatementRegexp "\<\%(pos\|quotemeta\|split\|study\)\>" syn match perlStatementRegexp "\<\%(pos\|quotemeta\|split\|study\)\>"
syn match perlStatementNumeric "\<\%(abs\|atan2\|cos\|exp\|hex\|int\|log\|oct\|rand\|sin\|sqrt\|srand\)\>" syn match perlStatementNumeric "\<\%(abs\|atan2\|cos\|exp\|hex\|int\|log\|oct\|rand\|sin\|sqrt\|srand\)\>"
syn match perlStatementList "\<\%(splice\|unshift\|shift\|push\|pop\|join\|reverse\|grep\|map\|sort\|unpack\)\>" syn match perlStatementList "\<\%(splice\|unshift\|shift\|push\|pop\|join\|reverse\|grep\|map\|sort\|unpack\)\>"
@ -94,9 +90,9 @@ syn match perlStatementFiledesc "\<\%(fcntl\|flock\|ioctl\|open\%(dir\)\=\|read
syn match perlStatementVector "\<vec\>" syn match perlStatementVector "\<vec\>"
syn match perlStatementFiles "\<\%(ch\%(dir\|mod\|own\|root\)\|glob\|link\|mkdir\|readlink\|rename\|rmdir\|symlink\|umask\|unlink\|utime\)\>" syn match perlStatementFiles "\<\%(ch\%(dir\|mod\|own\|root\)\|glob\|link\|mkdir\|readlink\|rename\|rmdir\|symlink\|umask\|unlink\|utime\)\>"
syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>" syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>"
syn match perlStatementFlow "\<\%(caller\|die\|dump\|eval\|exit\|wantarray\)\>" syn match perlStatementFlow "\<\%(caller\|die\|dump\|eval\|exit\|wantarray\|evalbytes\)\>"
syn match perlStatementInclude "\<\%(require\|import\)\>" syn match perlStatementInclude "\<\%(require\|import\|unimport\)\>"
syn match perlStatementInclude "\<\%(use\|no\)\s\+\%(\%(attributes\|attrs\|autouse\|parent\|base\|big\%(int\|num\|rat\)\|blib\|bytes\|charnames\|constant\|diagnostics\|encoding\%(::warnings\)\=\|feature\|fields\|filetest\|if\|integer\|less\|lib\|locale\|mro\|open\|ops\|overload\|re\|sigtrap\|sort\|strict\|subs\|threads\%(::shared\)\=\|utf8\|vars\|version\|vmsish\|warnings\%(::register\)\=\)\>\)\=" syn match perlStatementInclude "\<\%(use\|no\)\s\+\%(\%(attributes\|attrs\|autodie\|autouse\|parent\|base\|big\%(int\|num\|rat\)\|blib\|bytes\|charnames\|constant\|diagnostics\|encoding\%(::warnings\)\=\|feature\|fields\|filetest\|if\|integer\|less\|lib\|locale\|mro\|open\|ops\|overload\|overloading\|re\|sigtrap\|sort\|strict\|subs\|threads\%(::shared\)\=\|utf8\|vars\|version\|vmsish\|warnings\%(::register\)\=\)\>\)\="
syn match perlStatementProc "\<\%(alarm\|exec\|fork\|get\%(pgrp\|ppid\|priority\)\|kill\|pipe\|set\%(pgrp\|priority\)\|sleep\|system\|times\|wait\%(pid\)\=\)\>" syn match perlStatementProc "\<\%(alarm\|exec\|fork\|get\%(pgrp\|ppid\|priority\)\|kill\|pipe\|set\%(pgrp\|priority\)\|sleep\|system\|times\|wait\%(pid\)\=\)\>"
syn match perlStatementSocket "\<\%(accept\|bind\|connect\|get\%(peername\|sock\%(name\|opt\)\)\|listen\|recv\|send\|setsockopt\|shutdown\|socket\%(pair\)\=\)\>" syn match perlStatementSocket "\<\%(accept\|bind\|connect\|get\%(peername\|sock\%(name\|opt\)\)\|listen\|recv\|send\|setsockopt\|shutdown\|socket\%(pair\)\=\)\>"
syn match perlStatementIPC "\<\%(msg\%(ctl\|get\|rcv\|snd\)\|sem\%(ctl\|get\|op\)\|shm\%(ctl\|get\|read\|write\)\)\>" syn match perlStatementIPC "\<\%(msg\%(ctl\|get\|rcv\|snd\)\|sem\%(ctl\|get\|op\)\|shm\%(ctl\|get\|read\|write\)\)\>"
@ -108,7 +104,7 @@ syn match perlStatementMisc "\<\%(warn\|format\|formline\|reset\|scalar\|protot
syn keyword perlTodo TODO TODO: TBD TBD: FIXME FIXME: XXX XXX: NOTE NOTE: contained syn keyword perlTodo TODO TODO: TBD TBD: FIXME FIXME: XXX XXX: NOTE NOTE: contained
syn region perlStatementIndirObjWrap matchgroup=perlStatementIndirObj start="\<\%(map\|grep\|sort\|printf\=\|say\|system\|exec\)\>\s*{" end="}" contains=@perlTop,perlBraces extend syn region perlStatementIndirObjWrap matchgroup=perlStatementIndirObj start="\%(\<\%(map\|grep\|sort\|printf\=\|say\|system\|exec\)\>\s*\)\@<={" end="}" transparent extend
syn match perlLabel "^\s*\h\w*\s*::\@!\%(\<v\d\+\s*:\)\@<!" syn match perlLabel "^\s*\h\w*\s*::\@!\%(\<v\d\+\s*:\)\@<!"
@ -125,7 +121,7 @@ syn match perlLabel "^\s*\h\w*\s*::\@!\%(\<v\d\+\s*:\)\@<!"
" Special variables first ($^A, ...) and ($|, $', ...) " Special variables first ($^A, ...) and ($|, $', ...)
syn match perlVarPlain "$^[ACDEFHILMNOPRSTVWX]\=" syn match perlVarPlain "$^[ACDEFHILMNOPRSTVWX]\="
syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]" syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]"
syn match perlVarPlain "%+" syn match perlVarPlain "@[-+]"
syn match perlVarPlain "$\%(0\|[1-9]\d*\)" syn match perlVarPlain "$\%(0\|[1-9]\d*\)"
" Same as above, but avoids confusion in $::foo (equivalent to $main::foo) " Same as above, but avoids confusion in $::foo (equivalent to $main::foo)
syn match perlVarPlain "$::\@!" syn match perlVarPlain "$::\@!"
@ -143,41 +139,46 @@ syn match perlPackageRef "[$@#%*&]\%(\%(::\|'\)\=\I\i*\%(\%(::\|'\)\I\i*\)*\)\
" just set the variable "perl_no_extended_vars"... " just set the variable "perl_no_extended_vars"...
if !exists("perl_no_scope_in_variables") if !exists("perl_no_scope_in_variables")
syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref
syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref
syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref
else else
syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref
syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref
syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref
endif endif
syn match perlVarPlain2 "%[-+]"
if !exists("perl_no_extended_vars") if !exists("perl_no_extended_vars")
syn cluster perlExpr contains=perlStatementIndirObjWrap,perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarPlain2,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlVarBlock2,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlArrow,perlBraces syn cluster perlExpr contains=perlStatementIndirObjWrap,perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarPlain2,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlVarBlock2,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlArrow,perlBraces
syn region perlArrow matchgroup=perlArrow start="->\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained syn region perlArrow matchgroup=perlArrow start="->\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained
syn region perlArrow matchgroup=perlArrow start="->\s*\[" end="\]" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained syn region perlArrow matchgroup=perlArrow start="->\s*\[" end="\]" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained
syn region perlArrow matchgroup=perlArrow start="->\s*{" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained syn region perlArrow matchgroup=perlArrow start="->\s*{" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained
syn match perlArrow "->\s*{\s*\I\i*\s*}" contains=perlVarSimpleMemberName nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained syn match perlArrow "->\s*{\s*\I\i*\s*}" contains=perlVarSimpleMemberName nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained
syn region perlArrow matchgroup=perlArrow start="->\s*\$*\I\i*\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained syn region perlArrow matchgroup=perlArrow start="->\s*\$*\I\i*\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contained
syn region perlVarBlock matchgroup=perlVarPlain start="\%($#\|[$@]\)\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend syn region perlVarBlock matchgroup=perlVarPlain start="\%($#\|[$@]\)\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend
syn region perlVarBlock2 matchgroup=perlVarPlain start="[%&*]\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend syn region perlVarBlock2 matchgroup=perlVarPlain start="[%&*]\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend
syn match perlVarPlain2 "[%&*]\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend syn match perlVarPlain2 "[%&*]\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend
syn match perlVarPlain "\%(\$#\|[@$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend syn match perlVarPlain "\%(\$#\|[@$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend
syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend
syn match perlVarSimpleMember "\%(->\)\={\s*\I\i*\s*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contains=perlVarSimpleMemberName contained extend syn match perlVarSimpleMember "\%(->\)\={\s*\I\i*\s*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref contains=perlVarSimpleMemberName contained extend
syn match perlVarSimpleMemberName "\I\i*" contained syn match perlVarSimpleMemberName "\I\i*" contained
syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod,perlPostDeref extend
syn match perlPackageConst "__PACKAGE__" nextgroup=perlMethod syn match perlPackageConst "__PACKAGE__" nextgroup=perlMethod,perlPostDeref
syn match perlMethod "->\$*\I\i*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod syn match perlMethod "->\$*\I\i*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod,perlPostDeref
syn match perlPostDeref "->\%($#\|[$@%&*]\)\*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod,perlPostDeref
syn region perlPostDeref start="->\%($#\|[$@%&*]\)\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarSimpleMember,perlVarMember,perlMethod,perlPostDeref
syn region perlPostDeref matchgroup=perlPostDeref start="->\%($#\|[$@%&*]\){" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarSimpleMember,perlVarMember,perlMethod,perlPostDeref
endif endif
" File Descriptors " File Descriptors
syn match perlFiledescRead "<\h\w*>" syn match perlFiledescRead "<\h\w*>"
syn match perlFiledescStatementComma "(\=\s*\u\w*\s*,"me=e-1 transparent contained contains=perlFiledescStatement syn match perlFiledescStatementComma "(\=\s*\<\u\w*\>\s*,"me=e-1 transparent contained contains=perlFiledescStatement
syn match perlFiledescStatementNocomma "(\=\s*\u\w*\s*[^, \t]"me=e-1 transparent contained contains=perlFiledescStatement syn match perlFiledescStatementNocomma "(\=\s*\<\u\w*\>\s*[^, \t]"me=e-1 transparent contained contains=perlFiledescStatement
syn match perlFiledescStatement "\u\w*" contained syn match perlFiledescStatement "\<\u\w*\>" contained
" Special characters in strings and matches " Special characters in strings and matches
syn match perlSpecialString "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend syn match perlSpecialString "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend
@ -241,20 +242,18 @@ syn region perlAnglesDQ start=+<+ end=+>+ extend contained contains=perlAnglesD
" Simple version of searches and matches " Simple version of searches and matches
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1[msixpodualgc]*+ contains=@perlInterpMatch keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1[msixpodualgcn]*+ contains=@perlInterpMatch keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m#+ end=+#[msixpodualgc]*+ contains=@perlInterpMatch keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m#+ end=+#[msixpodualgcn]*+ contains=@perlInterpMatch keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*'+ end=+'[msixpodualgc]*+ contains=@perlInterpSQ keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*'+ end=+'[msixpodualgcn]*+ contains=@perlInterpSQ keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*/+ end=+/[msixpodualgc]*+ contains=@perlInterpSlash keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*/+ end=+/[msixpodualgcn]*+ contains=@perlInterpSlash keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*(+ end=+)[msixpodualgc]*+ contains=@perlInterpMatch,perlParensDQ keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*(+ end=+)[msixpodualgcn]*+ contains=@perlInterpMatch,perlParensDQ keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*{+ end=+}[msixpodualgcn]*+ contains=@perlInterpMatch,perlBracesDQ extend
" A special case for m{}, m<> and m[] which allows for comments and extra whitespace in the pattern syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*<+ end=+>[msixpodualgcn]*+ contains=@perlInterpMatch,perlAnglesDQ keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*{+ end=+}[msixpodualgc]*+ contains=@perlInterpMatch,perlComment,perlBracesDQ extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*\[+ end=+\][msixpodualgcn]*+ contains=@perlInterpMatch,perlBracketsDQ keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*<+ end=+>[msixpodualgc]*+ contains=@perlInterpMatch,perlAnglesDQ keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*\[+ end=+\][msixpodualgc]*+ contains=@perlInterpMatch,perlComment,perlBracketsDQ keepend extend
" Below some hacks to recognise the // variant. This is virtually impossible to catch in all " Below some hacks to recognise the // variant. This is virtually impossible to catch in all
" cases as the / is used in so many other ways, but these should be the most obvious ones. " cases as the / is used in so many other ways, but these should be the most obvious ones.
syn region perlMatch matchgroup=perlMatchStartEnd start="\%([$@%&*]\@<!\%(\<split\|\<while\|\<if\|\<unless\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=/\%(/=\)\@!" start=+^/\%(/=\)\@!+ start=+\s\@<=/\%(/=\)\@![^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!+ skip=+\\/+ end=+/[msixpodualgc]*+ contains=@perlInterpSlash extend syn region perlMatch matchgroup=perlMatchStartEnd start="\%([$@%&*]\@<!\%(\<split\|\<while\|\<if\|\<unless\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=/\%(/=\)\@!" start=+^/\%(/=\)\@!+ start=+\s\@<=/\%(/=\)\@![^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!+ skip=+\\/+ end=+/[msixpodualgcn]*+ contains=@perlInterpSlash extend
" Substitutions " Substitutions
@ -267,12 +266,12 @@ syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*<+ end=+>+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*<+ end=+>+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*\[+ end=+\]+ contains=@perlInterpMatch,perlBracketsDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*\[+ end=+\]+ contains=@perlInterpMatch,perlBracketsDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*{+ end=+}+ contains=@perlInterpMatch,perlBracesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*{+ end=+}+ contains=@perlInterpMatch,perlBracesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]'([{<]\)+ end=+\z1[msixpodualgcer]*+ keepend contained contains=@perlInterpDQ extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]'([{<]\)+ end=+\z1[msixpodualgcern]*+ keepend contained contains=@perlInterpDQ extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+(+ end=+)[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlParensDQ keepend extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+(+ end=+)[msixpodualgcern]*+ contained contains=@perlInterpDQ,perlParensDQ keepend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][msixpodualgcer]*+ contained contains=@perlInterpDQ,perlBracketsDQ keepend extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][msixpodualgcern]*+ contained contains=@perlInterpDQ,perlBracketsDQ keepend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+{+ end=+}[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlBracesDQ keepend extend extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+{+ end=+}[msixpodualgcern]*+ contained contains=@perlInterpDQ,perlBracesDQ keepend extend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+<+ end=+>[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+<+ end=+>[msixpodualgcern]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend extend
syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[msixpodualgcer]*+ contained contains=@perlInterpSQ keepend extend syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[msixpodualgcern]*+ contained contains=@perlInterpSQ keepend extend
" Translations " Translations
" perlMatch is the first part, perlTranslation* is the second, translator part. " perlMatch is the first part, perlTranslation* is the second, translator part.
@ -314,35 +313,40 @@ syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\>\s*\z([^[:space:]#([{<'/]\)+ end=+\z1[imosx]*+ contains=@perlInterpMatch keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\>\s*\z([^[:space:]#([{<'/]\)+ end=+\z1[imosxdual]*+ contains=@perlInterpMatch keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*/+ end=+/[imosx]*+ contains=@perlInterpSlash keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*/+ end=+/[imosxdual]*+ contains=@perlInterpSlash keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr#+ end=+#[imosx]*+ contains=@perlInterpMatch keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr#+ end=+#[imosxdual]*+ contains=@perlInterpMatch keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*'+ end=+'[imosx]*+ contains=@perlInterpSQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*'+ end=+'[imosxdual]*+ contains=@perlInterpSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*(+ end=+)[imosx]*+ contains=@perlInterpMatch,perlParensDQ keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*(+ end=+)[imosxdual]*+ contains=@perlInterpMatch,perlParensDQ keepend extend
" A special case for qr{}, qr<> and qr[] which allows for comments and extra whitespace in the pattern " A special case for qr{}, qr<> and qr[] which allows for comments and extra whitespace in the pattern
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*{+ end=+}[imosx]*+ contains=@perlInterpMatch,perlBracesDQ,perlComment keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*{+ end=+}[imosxdual]*+ contains=@perlInterpMatch,perlBracesDQ,perlComment keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*<+ end=+>[imosx]*+ contains=@perlInterpMatch,perlAnglesDQ,perlComment keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*<+ end=+>[imosxdual]*+ contains=@perlInterpMatch,perlAnglesDQ,perlComment keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*\[+ end=+\][imosx]*+ contains=@perlInterpMatch,perlBracketsDQ,perlComment keepend extend syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*\[+ end=+\][imosxdual]*+ contains=@perlInterpMatch,perlBracketsDQ,perlComment keepend extend
" Constructs such as print <<EOF [...] EOF, 'here' documents " Constructs such as print <<EOF [...] EOF, 'here' documents
" "
" XXX Any statements after the identifier are in perlString colour (i.e. " XXX Any statements after the identifier are in perlString colour (i.e.
" 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it " 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it
" seems due to the 'auto-extending nature' of regions. " seems due to the 'auto-extending nature' of regions.
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+$+ contains=@perlTop oneline
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+$+ contains=@perlTop oneline
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+$+ contains=@perlTop oneline
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*""+ end=+$+ contains=@perlTop oneline
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*''+ end=+$+ contains=@perlTop oneline
if exists("perl_fold") if exists("perl_fold")
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold extend syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold extend syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold extend syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold extend syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold extend syn region perlHereDoc start=+<<\s*''+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpSQ,perlNotEmptyLine fold extend
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold extend syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold extend
else else
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine syn region perlHereDoc start=+<<\s*''+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpSQ,perlNotEmptyLine
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL
endif endif
@ -356,28 +360,22 @@ syn keyword perlStatementPackage package contained
" sub [name] [(prototype)] { " sub [name] [(prototype)] {
" "
syn match perlSubError "[^[:space:];{#]" contained syn match perlSubError "[^[:space:];{#]" contained
if v:version == 701 && !has('patch221') " XXX I hope that's the right one syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
syn match perlSubAttributes ":" contained syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
syn match perlSubAttributes "" contained nextgroup=perlSubError
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
if get(g:, "perl_sub_signatures", 0)
syn match perlSignature +(\_[^)]*)\_s*+ nextgroup=perlSubAttributes,perlComment contained
else else
syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ syn match perlSubPrototype +(\_[^)]*)\_s*+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
syn match perlSubAttributes "" contained nextgroup=perlSubError
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
endif endif
syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
syn match perlSubPrototype +(\_[^)]*)\_s*\|+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype,perlSignature,perlSubAttributes,perlComment
syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype,perlComment
syn match perlFunction +\<sub\>\_s*+ nextgroup=perlSubName syn match perlFunction +\<sub\>\_s*+ nextgroup=perlSubName
if !exists("perl_no_scope_in_variables")
syn match perlFunctionPRef "\h\w*::" contained
syn match perlFunctionName "\h\w*[^:]" contained
else
syn match perlFunctionName "\h[[:alnum:]_:]*" contained
endif
" The => operator forces a bareword to the left of it to be interpreted as " The => operator forces a bareword to the left of it to be interpreted as
" a string " a string
syn match perlString "\I\@<!-\?\I\i*\%(\s*=>\)\@=" syn match perlString "\I\@<!-\?\I\i*\%(\s*=>\)\@="
@ -397,10 +395,10 @@ syn match perlFormatField "@$" contained
" __END__ and __DATA__ clauses " __END__ and __DATA__ clauses
if exists("perl_fold") if exists("perl_fold")
syntax region perlDATA start="^__DATA__$" skip="." end="." fold syntax region perlDATA start="^__DATA__$" skip="." end="." contains=@perlDATA fold
syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA fold syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA fold
else else
syntax region perlDATA start="^__DATA__$" skip="." end="." syntax region perlDATA start="^__DATA__$" skip="." end="." contains=@perlDATA
syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA
endif endif
@ -414,9 +412,9 @@ if exists("perl_fold")
syn region perlPackageFold start="^package \S\+;\s*\%(#.*\)\=$" end="^1;\=\s*\%(#.*\)\=$" end="\n\+package"me=s-1 transparent fold keepend syn region perlPackageFold start="^package \S\+;\s*\%(#.*\)\=$" end="^1;\=\s*\%(#.*\)\=$" end="\n\+package"me=s-1 transparent fold keepend
endif endif
if !exists("perl_nofold_subs") if !exists("perl_nofold_subs")
if exists("perl_fold_anonymous_subs") && perl_fold_anonymous_subs if get(g:, "perl_fold_anonymous_subs", 0)
syn region perlSubFold start="\<sub\>[^\n;]*{" end="}" transparent fold keepend extend syn region perlSubFold start="\<sub\>[^{]*{" end="}" transparent fold keepend extend
syn region perlSubFold start="\<\%(BEGIN\|END\|CHECK\|INIT\)\>\s*{" end="}" transparent fold keepend syn region perlSubFold start="\<\%(BEGIN\|END\|CHECK\|INIT\)\>\s*{" end="}" transparent fold keepend
else else
syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*\%(#.*\)\=$" transparent fold keepend syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*\%(#.*\)\=$" transparent fold keepend
syn region perlSubFold start="^\z(\s*\)\<\%(BEGIN\|END\|CHECK\|INIT\|UNITCHECK\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend syn region perlSubFold start="^\z(\s*\)\<\%(BEGIN\|END\|CHECK\|INIT\|UNITCHECK\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend
@ -424,7 +422,7 @@ if exists("perl_fold")
endif endif
if exists("perl_fold_blocks") if exists("perl_fold_blocks")
syn region perlBlockFold start="^\z(\s*\)\%(if\|elsif\|unless\|for\|while\|until\|given\)\s*(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" start="^\z(\s*\)foreach\s*\%(\%(my\|our\)\=\s*\S\+\s*\)\=(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend syn region perlBlockFold start="^\z(\s*\)\%(if\|elsif\|unless\|for\|while\|until\|given\)\s*(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" start="^\z(\s*\)for\%(each\)\=\s*\%(\%(my\|our\)\=\s*\S\+\s*\)\=(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend
syn region perlBlockFold start="^\z(\s*\)\%(do\|else\)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*while" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend syn region perlBlockFold start="^\z(\s*\)\%(do\|else\)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*while" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend
endif endif
@ -435,7 +433,6 @@ else
syn sync minlines=0 syn sync minlines=0
endif endif
" NOTE: If you're linking new highlight groups to perlString, please also put " NOTE: If you're linking new highlight groups to perlString, please also put
" them into b:match_skip in ftplugin/perl.vim. " them into b:match_skip in ftplugin/perl.vim.
@ -458,6 +455,7 @@ hi def link perlOperator Operator
hi def link perlFunction Keyword hi def link perlFunction Keyword
hi def link perlSubName Function hi def link perlSubName Function
hi def link perlSubPrototype Type hi def link perlSubPrototype Type
hi def link perlSignature Type
hi def link perlSubAttributes PreProc hi def link perlSubAttributes PreProc
hi def link perlSubAttributesCont perlSubAttributes hi def link perlSubAttributesCont perlSubAttributes
hi def link perlComment Comment hi def link perlComment Comment
@ -516,8 +514,11 @@ hi def link perlStatementMisc perlStatement
hi def link perlStatementIndirObj perlStatement hi def link perlStatementIndirObj perlStatement
hi def link perlFunctionName perlIdentifier hi def link perlFunctionName perlIdentifier
hi def link perlMethod perlIdentifier hi def link perlMethod perlIdentifier
hi def link perlPostDeref perlIdentifier
hi def link perlFunctionPRef perlType hi def link perlFunctionPRef perlType
hi def link perlPOD perlComment if !get(g:, 'perl_include_pod', 1)
hi def link perlPOD perlComment
endif
hi def link perlShellCommand perlString hi def link perlShellCommand perlString
hi def link perlSpecialAscii perlSpecial hi def link perlSpecialAscii perlSpecial
hi def link perlSpecialDollar perlSpecial hi def link perlSpecialDollar perlSpecial
@ -548,7 +549,6 @@ hi def link perlElseIfError Error
hi def link perlSubPrototypeError Error hi def link perlSubPrototypeError Error
hi def link perlSubError Error hi def link perlSubError Error
" Syncing to speed up processing " Syncing to speed up processing
" "
if !exists("perl_no_sync_on_sub") if !exists("perl_no_sync_on_sub")
@ -575,11 +575,6 @@ syn sync match perlSyncPOD grouphere NONE "^=cut"
let b:current_syntax = "perl" let b:current_syntax = "perl"
if exists('&regexpengine')
let &regexpengine=s:regexpengine
unlet s:regexpengine
endif
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save

View File

@ -4,7 +4,7 @@
" Previously: Scott Bigham <dsb@killerbunnies.org> " Previously: Scott Bigham <dsb@killerbunnies.org>
" Homepage: http://github.com/vim-perl/vim-perl " Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013-07-21 " Last Change: 2017-09-12
" To add embedded POD documentation highlighting to your syntax file, add " To add embedded POD documentation highlighting to your syntax file, add
" the commands: " the commands:
@ -68,7 +68,7 @@ syn match podEscape2 "\d\+>"me=e-1 contained contains=@NoSpell
hi def link podCommand Statement hi def link podCommand Statement
hi def link podCmdText String hi def link podCmdText String
hi def link podOverIndent Number hi def link podOverIndent Number
hi def link podForKeywd Identifier hi def link podForKeywd Identifier
hi def link podFormat Identifier hi def link podFormat Identifier
hi def link podVerbatimLine PreProc hi def link podVerbatimLine PreProc
@ -76,7 +76,6 @@ hi def link podSpecial Identifier
hi def link podEscape String hi def link podEscape String
hi def link podEscape2 Number hi def link podEscape2 Number
if exists("perl_pod_spellcheck_headings") if exists("perl_pod_spellcheck_headings")
" Spell-check headings " Spell-check headings
syn clear podCmdText syn clear podCmdText

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: readline(3) configuration file " Language: readline(3) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2012-04-25 " Latest Revision: 2017-06-25
" readline_has_bash - if defined add support for bash specific " readline_has_bash - if defined add support for bash specific
" settings/functions " settings/functions
@ -119,6 +119,7 @@ syn keyword readlineVariable contained
\ nextgroup=readlineBoolean \ nextgroup=readlineBoolean
\ skipwhite \ skipwhite
\ bind-tty-special-chars \ bind-tty-special-chars
\ colored-stats
\ completion-ignore-case \ completion-ignore-case
\ completion-map-case \ completion-map-case
\ convert-meta \ convert-meta
@ -142,6 +143,7 @@ syn keyword readlineVariable contained
\ revert-all-at-newline \ revert-all-at-newline
\ show-all-if-ambiguous \ show-all-if-ambiguous
\ show-all-if-unmodified \ show-all-if-unmodified
\ show-mode-in-prompt
\ skip-completed-text \ skip-completed-text
\ visible-stats \ visible-stats
@ -158,6 +160,7 @@ syn keyword readlineVariable contained
\ completion-prefix-display-length \ completion-prefix-display-length
\ completion-query-items \ completion-query-items
\ history-size \ history-size
\ keyseq-timeout
syn keyword readlineVariable contained syn keyword readlineVariable contained
\ nextgroup=readlineEditingMode \ nextgroup=readlineEditingMode

97
runtime/syntax/tap.vim Normal file
View File

@ -0,0 +1,97 @@
" Vim syntax file
" Language: Verbose TAP Output
" Maintainer: Rufus Cable <rufus@threebytesfull.com>
" Remark: Simple syntax highlighting for TAP output
" License:
" Copyright: (c) 2008-2013 Rufus Cable
" Last Change: 2014-12-13
if exists("b:current_syntax")
finish
endif
syn match tapTestDiag /^ *#.*/ contains=tapTestTodo
syn match tapTestTime /^ *\[\d\d:\d\d:\d\d\].*/ contains=tapTestFile
syn match tapTestFile /\w\+\/[^. ]*/ contained
syn match tapTestFileWithDot /\w\+\/[^ ]*/ contained
syn match tapTestPlan /^ *\d\+\.\.\d\+$/
" tapTest is a line like 'ok 1', 'not ok 2', 'ok 3 - xxxx'
syn match tapTest /^ *\(not \)\?ok \d\+.*/ contains=tapTestStatusOK,tapTestStatusNotOK,tapTestLine
" tapTestLine is the line without the ok/not ok status - i.e. number and
" optional message
syn match tapTestLine /\d\+\( .*\|$\)/ contains=tapTestNumber,tapTestLoadMessage,tapTestTodo,tapTestSkip contained
" turn ok/not ok messages green/red respectively
syn match tapTestStatusOK /ok/ contained
syn match tapTestStatusNotOK /not ok/ contained
" highlight todo tests
syn match tapTestTodo /\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev
syn match tapTestTodoRev /\<TODO\>/ contained
" highlight skipped tests
syn match tapTestSkip /# skip .*$/ contained contains=tapTestSkipTag
syn match tapTestSkipTag /\(# \)\@<=skip\>/ contained
" look behind so "ok 123" and "not ok 124" match test number
syn match tapTestNumber /\(ok \)\@<=\d\d*/ contained
syn match tapTestLoadMessage /\*\*\*.*\*\*\*/ contained contains=tapTestThreeStars,tapTestFileWithDot
syn match tapTestThreeStars /\*\*\*/ contained
syn region tapTestRegion start=/^ *\(not \)\?ok.*$/me=e+1 end=/^\(\(not \)\?ok\|# Looks like you planned \|All tests successful\|Bailout called\)/me=s-1 fold transparent excludenl
syn region tapTestResultsOKRegion start=/^\(All tests successful\|Result: PASS\)/ end=/$/
syn region tapTestResultsNotOKRegion start=/^\(# Looks like you planned \|Bailout called\|# Looks like you failed \|Result: FAIL\)/ end=/$/
syn region tapTestResultsSummaryRegion start=/^Test Summary Report/ end=/^Files=.*$/ contains=tapTestResultsSummaryHeading,tapTestResultsSummaryNotOK
syn region tapTestResultsSummaryHeading start=/^Test Summary Report/ end=/^-\+$/ contained
syn region tapTestResultsSummaryNotOK start=/TODO passed:/ end=/$/ contained
syn region tapTestInstructionsRegion start=/\%1l/ end=/^$/
set foldtext=TAPTestLine_foldtext()
function! TAPTestLine_foldtext()
let line = getline(v:foldstart)
let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
return sub
endfunction
set foldminlines=5
set foldcolumn=2
set foldenable
set foldmethod=syntax
syn sync fromstart
if !exists("did_tapverboseoutput_syntax_inits")
let did_tapverboseoutput_syntax_inits = 1
hi tapTestStatusOK term=bold ctermfg=green guifg=Green
hi tapTestStatusNotOK term=reverse ctermfg=black ctermbg=red guifg=Black guibg=Red
hi tapTestTodo term=bold ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black
hi tapTestTodoRev term=reverse ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow
hi tapTestSkip term=bold ctermfg=lightblue guifg=LightBlue
hi tapTestSkipTag term=reverse ctermfg=black ctermbg=lightblue guifg=Black guibg=LightBlue
hi tapTestTime term=bold ctermfg=blue guifg=Blue
hi tapTestFile term=reverse ctermfg=black ctermbg=yellow guibg=Black guifg=Yellow
hi tapTestLoadedFile term=bold ctermfg=black ctermbg=cyan guibg=Cyan guifg=Black
hi tapTestThreeStars term=reverse ctermfg=blue guifg=Blue
hi tapTestPlan term=bold ctermfg=yellow guifg=Yellow
hi link tapTestFileWithDot tapTestLoadedFile
hi link tapTestNumber Number
hi link tapTestDiag Comment
hi tapTestRegion ctermbg=green
hi tapTestResultsOKRegion ctermbg=green ctermfg=black
hi tapTestResultsNotOKRegion ctermbg=red ctermfg=black
hi tapTestResultsSummaryHeading ctermbg=blue ctermfg=white
hi tapTestResultsSummaryNotOK ctermbg=red ctermfg=black
hi tapTestInstructionsRegion ctermbg=lightmagenta ctermfg=black
endif
let b:current_syntax="tapVerboseOutput"

View File

@ -3,10 +3,10 @@
" Author: Moriki, Atsushi <4woods+vim@gmail.com> " Author: Moriki, Atsushi <4woods+vim@gmail.com>
" Homepage: http://github.com/vim-perl/vim-perl " Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues " Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013-07-21 " Last Change: 2015-04-25
" "
" Instration: " Installation:
" put tt2.vim and tt2html.vim in to your syntax diretory. " put tt2.vim and tt2html.vim in to your syntax directory.
" "
" add below in your filetype.vim. " add below in your filetype.vim.
" au BufNewFile,BufRead *.tt2 setf tt2 " au BufNewFile,BufRead *.tt2 setf tt2

View File

@ -78,7 +78,7 @@ syn case match
" Function Names {{{2 " Function Names {{{2
syn keyword vimFuncName contained abs append argv assert_fails assert_notequal atan2 buflisted bufwinid byteidxcomp ch_close_in ch_getjob ch_open ch_sendraw char2nr complete copy cscope_connection did_filetype escape execute expand filewritable float2nr fnamemodify foldtext function getbufline getcharsearch getcmdwintype getfontname getftype getpid getregtype getwininfo glob has_key histdel hlexists index inputrestore invert items job_start js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synID synconcealed systemlist tabpagewinnr tan test_alloc_fail test_garbagecollect_now test_null_job test_null_string timer_pause timer_stopall tr undofile values wildmenumode win_gotoid winbufnr winline winrestview wordcount syn keyword vimFuncName contained abs append argv assert_fails assert_notequal atan2 buflisted bufwinid byteidxcomp ch_close_in ch_getjob ch_open ch_sendraw char2nr complete copy cscope_connection did_filetype escape execute expand filewritable float2nr fnamemodify foldtext function getbufline getcharsearch getcmdwintype getfontname getftype getpid getregtype getwininfo glob has_key histdel hlexists index inputrestore invert items job_start js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synID synconcealed systemlist tabpagewinnr tan test_alloc_fail test_garbagecollect_now test_null_job test_null_string timer_pause timer_stopall tr undofile values wildmenumode win_gotoid winbufnr winline winrestview wordcount
syn keyword vimFuncName contained acos argc asin assert_false assert_notmatch browse bufloaded bufwinnr call ch_evalexpr ch_info ch_read ch_setoptions cindent complete_add cos cursor diff_filler eval exepath extend filter floor foldclosed foldtextresult garbagecollect getbufvar getcmdline getcompletion getfperm getline getpos gettabinfo getwinposx glob2regpat haslocaldir histget hostname input inputsave isdirectory job_getchannel job_status js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synIDattr synstack tabpagebuflist tagfiles tanh test_autochdir test_null_channel test_null_list test_settime timer_start tolower trunc undotree virtcol win_findbuf win_id2tabwin wincol winnr winsaveview writefile syn keyword vimFuncName contained acos argc asin assert_false assert_notmatch browse bufloaded bufwinnr call ch_evalexpr ch_info ch_read ch_setoptions cindent complete_add cos cursor diff_filler eval exepath extend filter floor foldclosed foldtextresult garbagecollect getbufvar getcmdline getcompletion getfperm getline getpos gettabinfo getwinposx glob2regpat haslocaldir histget hostname input inputsave isdirectory job_getchannel job_status js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufline setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synIDattr synstack tabpagebuflist tagfiles tanh test_autochdir test_null_channel test_null_list test_settime timer_start tolower trunc undotree virtcol win_findbuf win_id2tabwin wincol winnr winsaveview writefile
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true browsedir bufname byte2line ceil ch_evalraw ch_log ch_readraw ch_status clearmatches complete_check cosh deepcopy diff_hlID eventhandler exists feedkeys finddir fmod foldclosedend foreground get getchar getcmdpos getcurpos getfsize getloclist getqflist gettabvar getwinposy globpath hasmapto histnr iconv inputdialog inputsecret islocked job_info job_stop json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDtrans system tabpagenr taglist tempname test_disable_char_avail test_null_dict test_null_partial timer_info timer_stop toupper type uniq visualmode win_getid win_id2win winheight winrestcmd winwidth xor syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true browsedir bufname byte2line ceil ch_evalraw ch_log ch_readraw ch_status clearmatches complete_check cosh deepcopy diff_hlID eventhandler exists feedkeys finddir fmod foldclosedend foreground get getchar getcmdpos getcurpos getfsize getloclist getqflist gettabvar getwinposy globpath hasmapto histnr iconv inputdialog inputsecret islocked job_info job_stop json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDtrans system tabpagenr taglist tempname test_disable_char_avail test_null_dict test_null_partial timer_info timer_stop toupper type uniq visualmode win_getid win_id2win winheight winrestcmd winwidth xor
syn keyword vimFuncName contained and arglistid assert_exception assert_match atan bufexists bufnr byteidx ch_close ch_getbufnr ch_logfile ch_sendexpr changenr col confirm count delete empty executable exp filereadable findfile fnameescape foldlevel funcref getbufinfo getcharmod getcmdtype getcwd getftime getmatches getreg gettabwinvar getwinvar has histadd hlID indent inputlist insert isnan job_setoptions join syn keyword vimFuncName contained and arglistid assert_exception assert_match atan bufexists bufnr byteidx ch_close ch_getbufnr ch_logfile ch_sendexpr changenr col confirm count delete empty executable exp filereadable findfile fnameescape foldlevel funcref getbufinfo getcharmod getcmdtype getcwd getftime getmatches getreg gettabwinvar getwinvar has histadd hlID indent inputlist insert isnan job_setoptions join

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
ATTENTION: ATTENTION:
The commands in the lessons will modify the text. Make a copy of this The commands in the lessons will modify the text. Make a copy of this
file to practise on (if you started "vimtutor" this is already a copy). file to practice on (if you started "vimtutor" this is already a copy).
It is important to remember that this tutor is set up to teach by It is important to remember that this tutor is set up to teach by
use. That means that you need to execute the commands to learn them use. That means that you need to execute the commands to learn them

View File

@ -12,7 +12,7 @@
ATTENTION: ATTENTION:
The commands in the lessons will modify the text. Make a copy of this The commands in the lessons will modify the text. Make a copy of this
file to practise on (if you started "vimtutor" this is already a copy). file to practice on (if you started "vimtutor" this is already a copy).
It is important to remember that this tutor is set up to teach by It is important to remember that this tutor is set up to teach by
use. That means that you need to execute the commands to learn them use. That means that you need to execute the commands to learn them

File diff suppressed because it is too large Load Diff