diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-10-29 23:58:13 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-10-30 00:02:22 +0100 |
commit | 17c26d0dcfcc189cc020464ace67cc0a6f2475bd (patch) | |
tree | bdb6e2b8d0dcd484cfbfc2ae29521ba26fa9852f | |
parent | 7d2fbb9012e983ac013b6352b4cf8ea7a3a2f2b4 (diff) | |
download | rneovim-17c26d0dcfcc189cc020464ace67cc0a6f2475bd.tar.gz rneovim-17c26d0dcfcc189cc020464ace67cc0a6f2475bd.tar.bz2 rneovim-17c26d0dcfcc189cc020464ace67cc0a6f2475bd.zip |
vim-patch:95bafa296ae9
Update runtime files.
https://github.com/vim/vim/commit/95bafa296ae97bf420d5c74dd6db517b404c5df7
-rw-r--r-- | runtime/doc/autocmd.txt | 3 | ||||
-rw-r--r-- | runtime/doc/change.txt | 12 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 14 | ||||
-rw-r--r-- | runtime/doc/if_pyth.txt | 4 | ||||
-rw-r--r-- | runtime/doc/map.txt | 9 | ||||
-rw-r--r-- | runtime/doc/options.txt | 46 | ||||
-rw-r--r-- | runtime/doc/recover.txt | 3 | ||||
-rw-r--r-- | runtime/indent/prolog.vim | 13 | ||||
-rw-r--r-- | runtime/syntax/c.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/dosini.vim | 18 |
10 files changed, 91 insertions, 37 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index bacd0e7cf1..9601dfb0f2 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -856,6 +856,9 @@ OptionSet After setting an option. The pattern is plugin. You can always use `:noa` to prevent triggering this autocommand. + When using |:set| in the autocommand the event + is not triggered again. + *QuickFixCmdPre* QuickFixCmdPre Before a quickfix command is run (|:make|, |:lmake|, |:grep|, |:lgrep|, |:grepadd|, diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index ec122d3a13..c73b460767 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -667,6 +667,7 @@ The flags that you can use for the substitute commands: CTRL-E to scroll the screen up CTRL-Y to scroll the screen down + *:s_e* [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 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 Interrupted + *:s_g* [g] Replace all occurrences in the line. Without this argument, 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] argument switches it off. + *:s_i* [i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options are not used. + *:s_I* [I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase' options are not used. + *:s_n* [n] Report the number of matches, do not actually substitute. The [c] flag is ignored. The matches are reported as if 'report' is zero. Useful to |count-items|. If \= |sub-replace-expression| is used, the expression will be 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` works the same way as `:~`: When the search pattern is empty, use the previously used search pattern instead of the search pattern from the diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index ac3c93c18f..1109225d6a 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2230,7 +2230,6 @@ remote_read({serverid} [, {timeout}]) remote_send({server}, {string} [, {idvar}]) String send key sequence remote_startserver({name}) none become server {name} - String send key sequence remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list} remove({dict}, {key}) any remove entry {key} from {dict} rename({from}, {to}) Number rename (move) file from {from} to {to} @@ -2423,10 +2422,10 @@ and({expr}, {expr}) *and()* api_info() *api_info()* Returns Dictionary of |api-metadata|. -append({lnum}, {expr}) *append()* - When {expr} is a |List|: Append each item of the |List| as a +append({lnum}, {text}) *append()* + When {text} is a |List|: Append each item of the |List| as a 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. {lnum} can be zero to insert a line before the first one. Returns 1 for failure ({lnum} out of range or out of memory), @@ -4058,6 +4057,8 @@ getcmdline() *getcmdline()* Example: > :cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR> < Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|. + Returns an empty string when entering a password or using + |inputsecret()|. getcmdpos() *getcmdpos()* 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 first item where {pat} matches. Each item is used as a String, |Lists| and |Dictionaries| are used as echoed. + Otherwise, {expr} is used as a String. The result is a Number, which gives the index (byte offset) in {expr} where {pat} matches. + A match at the first character or |List| item returns zero. If there is no match -1 is returned. + For getting submatches see |matchlist()|. Example: > :echo match("testing", "ing") " results in 4 @@ -7718,7 +7722,7 @@ synconcealed({lnum}, {col}) *synconcealed()* concealable region if there are two consecutive regions with the same replacement character. For an example, if 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 ~ synconcealed(lnum, 1) [0, '', 0] synconcealed(lnum, 2) [1, 'X', 1] diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 38a78294b7..81a7816c93 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -42,9 +42,10 @@ Example: > endfunction To see what version of Python you have: > - :python import sys :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 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: > - :python import sys :python sys.argv = ["foo", "bar"] :pyfile myscript.py diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 0898dd98b9..30e7f644b3 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -371,8 +371,9 @@ several modes. In Vim you can use the ":nmap", ":vmap", ":omap", ":cmap" and *omap-info* 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" -and "d{" like "dw". +used with any operator. Simple example: > + :omap { w +makes "y{" work like "yw" and "d{" like "dw". 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 @@ -383,9 +384,11 @@ Normal mode commands find the first '(' character and select the first word before it. That usually is the function name. 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 :ounmap xx + Likewise for a mapping for Visual and Operator-pending mode or Normal and Operator-pending mode. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2e335e969c..7cf3aa1d60 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -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 was last set. Example: > :verbose set shiftwidth cindent? -< shiftwidth=4 ~ - Last set from modeline ~ - cindent ~ - Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~ +< shiftwidth=4 ~ + Last set from modeline line 1 ~ + cindent ~ + 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 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 while executing a function, user command or autocommand, the script in which it was defined is reported. A few special texts: - Last set from modeline ~ + Last set from modeline line 1 ~ Option was set in a |modeline|. Last set from --cmd argument ~ 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. -'conceallevel' 'cole' *'conceallevel'* *'cole'* - number (default 0) + *'conceallevel'* *'cole'* +'conceallevel' 'cole' number (default 0) local to window Determine how text with the "conceal" syntax attribute |:syn-conceal| 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. 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" are considered the same. Adds the "-i" flag 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 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 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 match of the 'define' option. It is also used for "\i" in a |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 environment variables. E.g., when '/' is included and Vim tries to 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 Keywords are used in searching and recognizing with many commands: "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 - programs you could use "a-z,A-Z,48-57,_,.,-,>". + 'isfname' for a description of the format of this option. For '@' + 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 '*', '"' and '|' (so that CTRL-] on a command finds the help for that command). @@ -4398,13 +4420,13 @@ A jump table for the options with a short description can be found at |Q_op|. security reasons. *'printencoding'* *'penc'* -'printencoding' 'penc' String (default empty, except for some systems) +'printencoding' 'penc' string (default empty, except for some systems) global Sets the character encoding used when printing. See |penc-option|. *'printexpr'* *'pexpr'* -'printexpr' 'pexpr' String (default: see below) +'printexpr' 'pexpr' string (default: see below) global Expression used to print the PostScript produced with |:hardcopy|. See |pexpr-option|. diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index 654a9cde7b..7789d4bdbc 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -27,6 +27,9 @@ You can see the name of the current swap file being used with the command: :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, with the extension ".swp". - On Unix, a '.' is prepended to swap file names in the same directory as the diff --git a/runtime/indent/prolog.vim b/runtime/indent/prolog.vim index 26a3bc3cd9..ecd0894166 100644 --- a/runtime/indent/prolog.vim +++ b/runtime/indent/prolog.vim @@ -2,6 +2,7 @@ " Maintainer : Gergely Kontra <kgergely@mcl.hu> " Revised on : 2002.02.18. 23:34:05 " Language : Prolog +" Last change by: Takuya Fujiwara, 2018 Sep 23 " TODO: " checking with respect to syntax highlighting @@ -37,10 +38,18 @@ function! GetPrologIndent() let ind = indent(pnum) " Previous line was comment -> use previous line's indent 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 " Check for clause head on previous line - if pline =~ ':-\s*\(%.*\)\?$' + if pline =~ '\%(:-\|-->\)\s*\(%.*\)\?$' let ind = ind + shiftwidth() " Check for end of clause on previous line elseif pline =~ '\.\s*\(%.*\)\?$' diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 1143ca7dd7..95d3455dde 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " 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 if exists("b:current_syntax") @@ -220,7 +220,7 @@ if exists("c_comment_strings") syn match cCommentSkip contained "^\s*\*\($\|\s\+\)" 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 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") " Use "extend" here to have preprocessor lines not terminate halfway a " comment. @@ -239,6 +239,7 @@ endif " keep a // comment separately, it terminates a preproc. conditional syn match cCommentError display "\*/" syn match cCommentStartError display "/\*"me=e-1 contained +syn match cWrongComTail display "\*/" syn keyword cOperator sizeof if exists("c_gnu") @@ -453,6 +454,7 @@ hi def link cErrInBracket cError hi def link cCommentError cError hi def link cCommentStartError cError hi def link cSpaceError cError +hi def link cWrongComTail cError hi def link cSpecialError cError hi def link cCurlyError cError hi def link cOperator Operator diff --git a/runtime/syntax/dosini.vim b/runtime/syntax/dosini.vim index ccc5e86f1b..cf42819bcd 100644 --- a/runtime/syntax/dosini.vim +++ b/runtime/syntax/dosini.vim @@ -1,12 +1,12 @@ " Vim syntax file " Language: Configuration File (ini file) for MSDOS/MS Windows -" Version: 2.1 +" Version: 2.2 " Original Author: Sean M. McKee <mckee@misslink.net> " 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 -" https://bitbucket.org/xuhdev/syntax-dosini.vim -" Last Change: 2011 Nov 8 +" Repository: https://github.com/xuhdev/syntax-dosini.vim +" Last Change: 2018 Sep 11 " quit when a syntax file was already loaded @@ -17,10 +17,11 @@ endif " shut case off syn case ignore -syn match dosiniNumber "\<\d\+\>" -syn match dosiniNumber "\<\d*\.\d\+\>" -syn match dosiniNumber "\<\d\+e[+-]\=\d\+\>" -syn match dosiniLabel "^.\{-}=" +syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue +syn match dosiniValue "=\zs.*" +syn match dosiniNumber "=\zs\s*\d\+\s*$" +syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$" +syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$" syn region dosiniHeader start="^\s*\[" end="\]" syn match dosiniComment "^[#;].*$" @@ -31,6 +32,7 @@ hi def link dosiniNumber Number hi def link dosiniHeader Special hi def link dosiniComment Comment hi def link dosiniLabel Type +hi def link dosiniValue String let b:current_syntax = "dosini" |