vim-patch:95bafa296ae9

Update runtime files.
95bafa296a
This commit is contained in:
Justin M. Keyes 2018-10-29 23:58:13 +01:00
parent 7d2fbb9012
commit 17c26d0dcf
10 changed files with 91 additions and 37 deletions

View File

@ -856,6 +856,9 @@ OptionSet After setting an option. The pattern is
plugin. You can always use `:noa` to prevent plugin. You can always use `:noa` to prevent
triggering this autocommand. triggering this autocommand.
When using |:set| in the autocommand the event
is not triggered again.
*QuickFixCmdPre* *QuickFixCmdPre*
QuickFixCmdPre Before a quickfix command is run (|:make|, QuickFixCmdPre Before a quickfix command is run (|:make|,
|:lmake|, |:grep|, |:lgrep|, |:grepadd|, |:lmake|, |:grep|, |:lgrep|, |:grepadd|,

View File

@ -667,6 +667,7 @@ The flags that you can use for the substitute commands:
CTRL-E to scroll the screen up CTRL-E to scroll the screen up
CTRL-Y to scroll the screen down CTRL-Y to scroll the screen down
*:s_e*
[e] When the search pattern fails, do not issue an error message and, in [e] When the search pattern fails, do not issue an error message and, in
particular, continue in maps as if no error occurred. This is most particular, continue in maps as if no error occurred. This is most
useful to prevent the "No match" error from breaking a mapping. Vim useful to prevent the "No match" error from breaking a mapping. Vim
@ -677,29 +678,34 @@ The flags that you can use for the substitute commands:
Trailing characters Trailing characters
Interrupted Interrupted
*:s_g*
[g] Replace all occurrences in the line. Without this argument, [g] Replace all occurrences in the line. Without this argument,
replacement occurs only for the first occurrence in each line. If the replacement occurs only for the first occurrence in each line. If the
'gdefault' option is on, this flag is on by default and the [g] 'gdefault' option is on, this flag is on by default and the [g]
argument switches it off. argument switches it off.
*:s_i*
[i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options [i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options
are not used. are not used.
*:s_I*
[I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase' [I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase'
options are not used. options are not used.
*:s_n*
[n] Report the number of matches, do not actually substitute. The [c] [n] Report the number of matches, do not actually substitute. The [c]
flag is ignored. The matches are reported as if 'report' is zero. flag is ignored. The matches are reported as if 'report' is zero.
Useful to |count-items|. Useful to |count-items|.
If \= |sub-replace-expression| is used, the expression will be If \= |sub-replace-expression| is used, the expression will be
evaluated in the |sandbox| at every match. evaluated in the |sandbox| at every match.
[p] Print the line containing the last substitute. [p] Print the line containing the last substitute. *:s_p*
[#] Like [p] and prepend the line number. [#] Like [p] and prepend the line number. *:s_#*
[l] Like [p] but print the text like |:list|. [l] Like [p] but print the text like |:list|. *:s_l*
*:s_r*
[r] Only useful in combination with `:&` or `:s` without arguments. `:&r` [r] Only useful in combination with `:&` or `:s` without arguments. `:&r`
works the same way as `:~`: When the search pattern is empty, use the works the same way as `:~`: When the search pattern is empty, use the
previously used search pattern instead of the search pattern from the previously used search pattern instead of the search pattern from the

View File

@ -2230,7 +2230,6 @@ remote_read({serverid} [, {timeout}])
remote_send({server}, {string} [, {idvar}]) remote_send({server}, {string} [, {idvar}])
String send key sequence String send key sequence
remote_startserver({name}) none become server {name} remote_startserver({name}) none become server {name}
String send key sequence
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list} remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
remove({dict}, {key}) any remove entry {key} from {dict} remove({dict}, {key}) any remove entry {key} from {dict}
rename({from}, {to}) Number rename (move) file from {from} to {to} rename({from}, {to}) Number rename (move) file from {from} to {to}
@ -2423,10 +2422,10 @@ and({expr}, {expr}) *and()*
api_info() *api_info()* api_info() *api_info()*
Returns Dictionary of |api-metadata|. Returns Dictionary of |api-metadata|.
append({lnum}, {expr}) *append()* append({lnum}, {text}) *append()*
When {expr} is a |List|: Append each item of the |List| as a When {text} is a |List|: Append each item of the |List| as a
text line below line {lnum} in the current buffer. text line below line {lnum} in the current buffer.
Otherwise append {expr} as one text line below line {lnum} in Otherwise append {text} as one text line below line {lnum} in
the current buffer. the current buffer.
{lnum} can be zero to insert a line before the first one. {lnum} can be zero to insert a line before the first one.
Returns 1 for failure ({lnum} out of range or out of memory), Returns 1 for failure ({lnum} out of range or out of memory),
@ -4058,6 +4057,8 @@ getcmdline() *getcmdline()*
Example: > Example: >
:cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR> :cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
< Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|. < Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|.
Returns an empty string when entering a password or using
|inputsecret()|.
getcmdpos() *getcmdpos()* getcmdpos() *getcmdpos()*
Return the position of the cursor in the command line as a Return the position of the cursor in the command line as a
@ -5452,11 +5453,14 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()*
When {expr} is a |List| then this returns the index of the When {expr} is a |List| then this returns the index of the
first item where {pat} matches. Each item is used as a first item where {pat} matches. Each item is used as a
String, |Lists| and |Dictionaries| are used as echoed. String, |Lists| and |Dictionaries| are used as echoed.
Otherwise, {expr} is used as a String. The result is a Otherwise, {expr} is used as a String. The result is a
Number, which gives the index (byte offset) in {expr} where Number, which gives the index (byte offset) in {expr} where
{pat} matches. {pat} matches.
A match at the first character or |List| item returns zero. A match at the first character or |List| item returns zero.
If there is no match -1 is returned. If there is no match -1 is returned.
For getting submatches see |matchlist()|. For getting submatches see |matchlist()|.
Example: > Example: >
:echo match("testing", "ing") " results in 4 :echo match("testing", "ing") " results in 4
@ -7718,7 +7722,7 @@ synconcealed({lnum}, {col}) *synconcealed()*
concealable region if there are two consecutive regions concealable region if there are two consecutive regions
with the same replacement character. For an example, if with the same replacement character. For an example, if
the text is "123456" and both "23" and "45" are concealed the text is "123456" and both "23" and "45" are concealed
and replace by the character "X", then: and replaced by the character "X", then:
call returns ~ call returns ~
synconcealed(lnum, 1) [0, '', 0] synconcealed(lnum, 1) [0, '', 0]
synconcealed(lnum, 2) [1, 'X', 1] synconcealed(lnum, 2) [1, 'X', 1]

View File

@ -42,9 +42,10 @@ Example: >
endfunction endfunction
To see what version of Python you have: > To see what version of Python you have: >
:python import sys
:python print(sys.version) :python print(sys.version)
There is no need to import sys, it's done by default.
Note: Python is very sensitive to the indenting. Make sure the "class" line Note: Python is very sensitive to the indenting. Make sure the "class" line
and "EOF" do not have any indent. and "EOF" do not have any indent.
@ -91,7 +92,6 @@ Python commands cannot be used in the |sandbox|.
To pass arguments you need to set sys.argv[] explicitly. Example: > To pass arguments you need to set sys.argv[] explicitly. Example: >
:python import sys
:python sys.argv = ["foo", "bar"] :python sys.argv = ["foo", "bar"]
:pyfile myscript.py :pyfile myscript.py

View File

@ -371,8 +371,9 @@ several modes. In Vim you can use the ":nmap", ":vmap", ":omap", ":cmap" and
*omap-info* *omap-info*
Operator-pending mappings can be used to define a movement command that can be Operator-pending mappings can be used to define a movement command that can be
used with any operator. Simple example: ":omap { w" makes "y{" work like "yw" used with any operator. Simple example: >
and "d{" like "dw". :omap { w
makes "y{" work like "yw" and "d{" like "dw".
To ignore the starting cursor position and select different text, you can have To ignore the starting cursor position and select different text, you can have
the omap start Visual mode to select the text to be operated upon. Example the omap start Visual mode to select the text to be operated upon. Example
@ -383,9 +384,11 @@ Normal mode commands find the first '(' character and select the first word
before it. That usually is the function name. before it. That usually is the function name.
To enter a mapping for Normal and Visual mode, but not Operator-pending mode, To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
first define it for all three modes, then unmap it for Operator-pending mode: first define it for all three modes, then unmap it for
Operator-pending mode: >
:map xx something-difficult :map xx something-difficult
:ounmap xx :ounmap xx
Likewise for a mapping for Visual and Operator-pending mode or Normal and Likewise for a mapping for Visual and Operator-pending mode or Normal and
Operator-pending mode. Operator-pending mode.

View File

@ -100,17 +100,17 @@ and the following arguments will be ignored.
When 'verbose' is non-zero, displaying an option value will also tell where it When 'verbose' is non-zero, displaying an option value will also tell where it
was last set. Example: > was last set. Example: >
:verbose set shiftwidth cindent? :verbose set shiftwidth cindent?
< shiftwidth=4 ~ < shiftwidth=4 ~
Last set from modeline ~ Last set from modeline line 1 ~
cindent ~ cindent ~
Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~ Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~
This is only done when specific option values are requested, not for ":verbose This is only done when specific option values are requested, not for ":verbose
set all" or ":verbose set" without an argument. set all" or ":verbose set" without an argument.
When the option was set by hand there is no "Last set" message. When the option was set by hand there is no "Last set" message.
When the option was set while executing a function, user command or When the option was set while executing a function, user command or
autocommand, the script in which it was defined is reported. autocommand, the script in which it was defined is reported.
A few special texts: A few special texts:
Last set from modeline ~ Last set from modeline line 1 ~
Option was set in a |modeline|. Option was set in a |modeline|.
Last set from --cmd argument ~ Last set from --cmd argument ~
Option was set with command line argument |--cmd| or +. Option was set with command line argument |--cmd| or +.
@ -1458,8 +1458,8 @@ A jump table for the options with a short description can be found at |Q_op|.
displayed. E.g., when moving vertically it may change column. displayed. E.g., when moving vertically it may change column.
'conceallevel' 'cole' *'conceallevel'* *'cole'* *'conceallevel'* *'cole'*
number (default 0) 'conceallevel' 'cole' number (default 0)
local to window local to window
Determine how text with the "conceal" syntax attribute |:syn-conceal| Determine how text with the "conceal" syntax attribute |:syn-conceal|
is shown: is shown:
@ -1904,6 +1904,15 @@ A jump table for the options with a short description can be found at |Q_op|.
When omitted a context of six lines is used. When omitted a context of six lines is used.
See |fold-diff|. See |fold-diff|.
iblank Ignore changes where lines are all blank. Adds
the "-B" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
of the "diff" command for what this does
exactly.
NOTE: the diff windows will get out of sync,
because no differences between blank lines are
taken into account.
icase Ignore changes in case of text. "a" and "A" icase Ignore changes in case of text. "a" and "A"
are considered the same. Adds the "-i" flag are considered the same. Adds the "-i" flag
to the "diff" command if 'diffexpr' is empty. to the "diff" command if 'diffexpr' is empty.
@ -1915,6 +1924,18 @@ A jump table for the options with a short description can be found at |Q_op|.
exactly. It should ignore adding trailing exactly. It should ignore adding trailing
white space, but not leading white space. white space, but not leading white space.
iwhiteall Ignore all white space changes. Adds
the "-w" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
of the "diff" command for what this does
exactly.
iwhiteeol Ignore white space changes at end of line.
Adds the "-Z" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
of the "diff" command for what this does
exactly.
horizontal Start diff mode with horizontal splits (unless horizontal Start diff mode with horizontal splits (unless
explicitly specified otherwise). explicitly specified otherwise).
@ -3370,7 +3391,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Identifiers are used in recognizing environment variables and after a Identifiers are used in recognizing environment variables and after a
match of the 'define' option. It is also used for "\i" in a match of the 'define' option. It is also used for "\i" in a
|pattern|. See 'isfname' for a description of the format of this |pattern|. See 'isfname' for a description of the format of this
option. option. For '@' only characters up to 255 are used.
Careful: If you change this option, it might break expanding Careful: If you change this option, it might break expanding
environment variables. E.g., when '/' is included and Vim tries to environment variables. E.g., when '/' is included and Vim tries to
expand "$HOME/.local/share/nvim/shada/main.shada". Maybe you should expand "$HOME/.local/share/nvim/shada/main.shada". Maybe you should
@ -3382,8 +3403,9 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer local to buffer
Keywords are used in searching and recognizing with many commands: Keywords are used in searching and recognizing with many commands:
"w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
'isfname' for a description of the format of this option. For C 'isfname' for a description of the format of this option. For '@'
programs you could use "a-z,A-Z,48-57,_,.,-,>". characters above 255 check the "word" character class.
For C programs you could use "a-z,A-Z,48-57,_,.,-,>".
For a help file it is set to all non-blank printable characters except For a help file it is set to all non-blank printable characters except
'*', '"' and '|' (so that CTRL-] on a command finds the help for that '*', '"' and '|' (so that CTRL-] on a command finds the help for that
command). command).
@ -4398,13 +4420,13 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons. security reasons.
*'printencoding'* *'penc'* *'printencoding'* *'penc'*
'printencoding' 'penc' String (default empty, except for some systems) 'printencoding' 'penc' string (default empty, except for some systems)
global global
Sets the character encoding used when printing. Sets the character encoding used when printing.
See |penc-option|. See |penc-option|.
*'printexpr'* *'pexpr'* *'printexpr'* *'pexpr'*
'printexpr' 'pexpr' String (default: see below) 'printexpr' 'pexpr' string (default: see below)
global global
Expression used to print the PostScript produced with |:hardcopy|. Expression used to print the PostScript produced with |:hardcopy|.
See |pexpr-option|. See |pexpr-option|.

View File

@ -27,6 +27,9 @@ You can see the name of the current swap file being used with the command:
:sw[apname] *:sw* *:swapname* :sw[apname] *:sw* *:swapname*
Or you can use the |swapname()| function, which also allows for seeing the
swap file name of other buffers.
The name of the swap file is normally the same as the file you are editing, The name of the swap file is normally the same as the file you are editing,
with the extension ".swp". with the extension ".swp".
- On Unix, a '.' is prepended to swap file names in the same directory as the - On Unix, a '.' is prepended to swap file names in the same directory as the

View File

@ -2,6 +2,7 @@
" Maintainer : Gergely Kontra <kgergely@mcl.hu> " Maintainer : Gergely Kontra <kgergely@mcl.hu>
" Revised on : 2002.02.18. 23:34:05 " Revised on : 2002.02.18. 23:34:05
" Language : Prolog " Language : Prolog
" Last change by: Takuya Fujiwara, 2018 Sep 23
" TODO: " TODO:
" checking with respect to syntax highlighting " checking with respect to syntax highlighting
@ -37,10 +38,18 @@ function! GetPrologIndent()
let ind = indent(pnum) let ind = indent(pnum)
" Previous line was comment -> use previous line's indent " Previous line was comment -> use previous line's indent
if pline =~ '^\s*%' if pline =~ '^\s*%'
retu ind return ind
endif
" Previous line was the start of block comment -> +1 after '/*' comment
if pline =~ '^\s*/\*'
return ind + 1
endif
" Previous line was the end of block comment -> -1 after '*/' comment
if pline =~ '^\s*\*/'
return ind - 1
endif endif
" Check for clause head on previous line " Check for clause head on previous line
if pline =~ ':-\s*\(%.*\)\?$' if pline =~ '\%(:-\|-->\)\s*\(%.*\)\?$'
let ind = ind + shiftwidth() let ind = ind + shiftwidth()
" Check for end of clause on previous line " Check for end of clause on previous line
elseif pline =~ '\.\s*\(%.*\)\?$' elseif pline =~ '\.\s*\(%.*\)\?$'

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: C " Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Apr 30 " Last Change: 2018 Sep 21
" Quit when a (custom) syntax file was already loaded " Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
@ -220,7 +220,7 @@ if exists("c_comment_strings")
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)" syn match cCommentSkip contained "^\s*\*\($\|\s\+\)"
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,cWrongComTail,@Spell
if exists("c_no_comment_fold") if exists("c_no_comment_fold")
" Use "extend" here to have preprocessor lines not terminate halfway a " Use "extend" here to have preprocessor lines not terminate halfway a
" comment. " comment.
@ -239,6 +239,7 @@ endif
" keep a // comment separately, it terminates a preproc. conditional " keep a // comment separately, it terminates a preproc. conditional
syn match cCommentError display "\*/" syn match cCommentError display "\*/"
syn match cCommentStartError display "/\*"me=e-1 contained syn match cCommentStartError display "/\*"me=e-1 contained
syn match cWrongComTail display "\*/"
syn keyword cOperator sizeof syn keyword cOperator sizeof
if exists("c_gnu") if exists("c_gnu")
@ -453,6 +454,7 @@ hi def link cErrInBracket cError
hi def link cCommentError cError hi def link cCommentError cError
hi def link cCommentStartError cError hi def link cCommentStartError cError
hi def link cSpaceError cError hi def link cSpaceError cError
hi def link cWrongComTail cError
hi def link cSpecialError cError hi def link cSpecialError cError
hi def link cCurlyError cError hi def link cCurlyError cError
hi def link cOperator Operator hi def link cOperator Operator

View File

@ -1,12 +1,12 @@
" Vim syntax file " Vim syntax file
" Language: Configuration File (ini file) for MSDOS/MS Windows " Language: Configuration File (ini file) for MSDOS/MS Windows
" Version: 2.1 " Version: 2.2
" Original Author: Sean M. McKee <mckee@misslink.net> " Original Author: Sean M. McKee <mckee@misslink.net>
" Previous Maintainer: Nima Talebi <nima@it.net.au> " Previous Maintainer: Nima Talebi <nima@it.net.au>
" Current Maintainer: Hong Xu <xuhdev@gmail.com> " Current Maintainer: Hong Xu <hong@topbug.net>
" Homepage: http://www.vim.org/scripts/script.php?script_id=3747 " Homepage: http://www.vim.org/scripts/script.php?script_id=3747
" https://bitbucket.org/xuhdev/syntax-dosini.vim " Repository: https://github.com/xuhdev/syntax-dosini.vim
" Last Change: 2011 Nov 8 " Last Change: 2018 Sep 11
" quit when a syntax file was already loaded " quit when a syntax file was already loaded
@ -17,10 +17,11 @@ endif
" shut case off " shut case off
syn case ignore syn case ignore
syn match dosiniNumber "\<\d\+\>" syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue
syn match dosiniNumber "\<\d*\.\d\+\>" syn match dosiniValue "=\zs.*"
syn match dosiniNumber "\<\d\+e[+-]\=\d\+\>" syn match dosiniNumber "=\zs\s*\d\+\s*$"
syn match dosiniLabel "^.\{-}=" syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$"
syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$"
syn region dosiniHeader start="^\s*\[" end="\]" syn region dosiniHeader start="^\s*\[" end="\]"
syn match dosiniComment "^[#;].*$" syn match dosiniComment "^[#;].*$"
@ -31,6 +32,7 @@ hi def link dosiniNumber Number
hi def link dosiniHeader Special hi def link dosiniHeader Special
hi def link dosiniComment Comment hi def link dosiniComment Comment
hi def link dosiniLabel Type hi def link dosiniLabel Type
hi def link dosiniValue String
let b:current_syntax = "dosini" let b:current_syntax = "dosini"