1
0
forked from aniani/vim

Updte runtime files

This commit is contained in:
Bram Moolenaar
2019-09-20 14:38:13 +02:00
parent 56ebbabea1
commit 589edb3404
11 changed files with 168 additions and 116 deletions

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.1. Last change: 2019 Jun 26 *autocmd.txt* For Vim version 8.1. Last change: 2019 Sep 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.1. Last change: 2019 Sep 15 *eval.txt* For Vim version 8.1. Last change: 2019 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -9048,23 +9048,28 @@ state([{what}]) *state()*
current state. Mostly useful in callbacks that want to do current state. Mostly useful in callbacks that want to do
work that may not always be safe. Roughly this works like: work that may not always be safe. Roughly this works like:
- callback uses state() to check if work is safe to do. - callback uses state() to check if work is safe to do.
If yes, then do it right away. Yes: then do it right away.
Otherwise add to work queue and add SafeState and/or No: add to work queue and add a |SafeState| and/or
SafeStateAgain autocommand. |SafeStateAgain| autocommand (|SafeState| triggers at
- When SafeState or SafeStateAgain is triggered, check with toplevel, |SafeStateAgain| triggers after handling
state() if the work can be done now, and if yes remove it messages and callbacks).
from the queue and execute. - When SafeState or SafeStateAgain is triggered and executes
your autocommand, check with `state()` if the work can be
done now, and if yes remove it from the queue and execute.
Remove the autocommand if the queue is now empty.
Also see |mode()|. Also see |mode()|.
When {what} is given only characters in this string will be When {what} is given only characters in this string will be
added. E.g, this checks if the screen has scrolled: > added. E.g, this checks if the screen has scrolled: >
if state('s') != '' if state('s') == ''
" screen has not scrolled
< <
These characters indicate the state, generally indicating that These characters indicate the state, generally indicating that
something is busy: something is busy:
m halfway a mapping, :normal command, feedkeys() or m halfway a mapping, :normal command, feedkeys() or
stuffed command stuffed command
o operator pending or waiting for a command argument o operator pending or waiting for a command argument,
e.g. after |f|
a Insert mode autocomplete active a Insert mode autocomplete active
x executing an autocommand x executing an autocommand
w blocked on waiting, e.g. ch_evalexpr() and w blocked on waiting, e.g. ch_evalexpr() and

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.1. Last change: 2019 Sep 09 *options.txt* For Vim version 8.1. Last change: 2019 Sep 18
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8565,8 +8565,8 @@ A jump table for the options with a short description can be found at |Q_op|.
":map <BS> X" to make backspace delete the character in front of the ":map <BS> X" to make backspace delete the character in front of the
cursor. cursor.
When 'l' is included and it is used after an operator at the end of a When 'l' is included and it is used after an operator at the end of a
line then it will not move to the next line. This makes "dl", "cl", line (not an empty line) then it will not move to the next line. This
"yl" etc. work normally. makes "dl", "cl", "yl" etc. work normally.
NOTE: This option is set to the Vi default value when 'compatible' is NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset. set and to the Vim default value when 'compatible' is reset.

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.1. Last change: 2019 Jun 14 *repeat.txt* For Vim version 8.1. Last change: 2019 Sep 20
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -219,10 +219,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
When {file} contains wildcards it is expanded to all When {file} contains wildcards it is expanded to all
matching files. Example: > matching files. Example: >
:runtime! plugin/*.vim :runtime! plugin/**/*.vim
< This is what Vim uses to load the plugin files when < This is what Vim uses to load the plugin files when
starting up. This similar command: > starting up. This similar command: >
:runtime plugin/*.vim :runtime plugin/**/*.vim
< would source the first file only. < would source the first file only.
When 'verbose' is one or higher, there is a message When 'verbose' is one or higher, there is a message

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.1. Last change: 2019 Jul 15 *syntax.txt* For Vim version 8.1. Last change: 2019 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1923,6 +1923,16 @@ displayed line. The default value is 10. The disadvantage of using a larger
number is that redrawing can become slow. number is that redrawing can become slow.
JSON *json.vim* *ft-json-syntax*
The json syntax file provides syntax highlighting with conceal support by
default. To disable concealment: >
let g:vim_json_conceal = 0
To disable syntax highlighting of errors: >
let g:vim_json_warnings = 0
LACE *lace.vim* *ft-lace-syntax* LACE *lace.vim* *ft-lace-syntax*
Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but the Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but the

View File

@@ -312,6 +312,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'go-a' options.txt /*'go-a'* 'go-a' options.txt /*'go-a'*
'go-b' options.txt /*'go-b'* 'go-b' options.txt /*'go-b'*
'go-c' options.txt /*'go-c'* 'go-c' options.txt /*'go-c'*
'go-d' options.txt /*'go-d'*
'go-e' options.txt /*'go-e'* 'go-e' options.txt /*'go-e'*
'go-f' options.txt /*'go-f'* 'go-f' options.txt /*'go-f'*
'go-g' options.txt /*'go-g'* 'go-g' options.txt /*'go-g'*
@@ -5003,6 +5004,8 @@ S change.txt /*S*
SHELL starting.txt /*SHELL* SHELL starting.txt /*SHELL*
SQLGetType ft_sql.txt /*SQLGetType* SQLGetType ft_sql.txt /*SQLGetType*
SQLSetType ft_sql.txt /*SQLSetType* SQLSetType ft_sql.txt /*SQLSetType*
SafeState autocmd.txt /*SafeState*
SafeStateAgain autocmd.txt /*SafeStateAgain*
Select visual.txt /*Select* Select visual.txt /*Select*
Select-mode visual.txt /*Select-mode* Select-mode visual.txt /*Select-mode*
Select-mode-mapping visual.txt /*Select-mode-mapping* Select-mode-mapping visual.txt /*Select-mode-mapping*
@@ -6425,6 +6428,7 @@ ft-ia64-syntax syntax.txt /*ft-ia64-syntax*
ft-inform-syntax syntax.txt /*ft-inform-syntax* ft-inform-syntax syntax.txt /*ft-inform-syntax*
ft-java-syntax syntax.txt /*ft-java-syntax* ft-java-syntax syntax.txt /*ft-java-syntax*
ft-javascript-omni insert.txt /*ft-javascript-omni* ft-javascript-omni insert.txt /*ft-javascript-omni*
ft-json-syntax syntax.txt /*ft-json-syntax*
ft-ksh-syntax syntax.txt /*ft-ksh-syntax* ft-ksh-syntax syntax.txt /*ft-ksh-syntax*
ft-lace-syntax syntax.txt /*ft-lace-syntax* ft-lace-syntax syntax.txt /*ft-lace-syntax*
ft-lex-syntax syntax.txt /*ft-lex-syntax* ft-lex-syntax syntax.txt /*ft-lex-syntax*
@@ -7411,6 +7415,7 @@ join() eval.txt /*join()*
js_decode() eval.txt /*js_decode()* js_decode() eval.txt /*js_decode()*
js_encode() eval.txt /*js_encode()* js_encode() eval.txt /*js_encode()*
jsbterm-mouse options.txt /*jsbterm-mouse* jsbterm-mouse options.txt /*jsbterm-mouse*
json.vim syntax.txt /*json.vim*
json_decode() eval.txt /*json_decode()* json_decode() eval.txt /*json_decode()*
json_encode() eval.txt /*json_encode()* json_encode() eval.txt /*json_encode()*
jtags tagsrch.txt /*jtags* jtags tagsrch.txt /*jtags*
@@ -8646,6 +8651,7 @@ scriptversion eval.txt /*scriptversion*
scriptversion-1 eval.txt /*scriptversion-1* scriptversion-1 eval.txt /*scriptversion-1*
scriptversion-2 eval.txt /*scriptversion-2* scriptversion-2 eval.txt /*scriptversion-2*
scriptversion-3 eval.txt /*scriptversion-3* scriptversion-3 eval.txt /*scriptversion-3*
scriptversion-4 eval.txt /*scriptversion-4*
scroll-binding scroll.txt /*scroll-binding* scroll-binding scroll.txt /*scroll-binding*
scroll-cursor scroll.txt /*scroll-cursor* scroll-cursor scroll.txt /*scroll-cursor*
scroll-down scroll.txt /*scroll-down* scroll-down scroll.txt /*scroll-down*
@@ -8925,6 +8931,7 @@ starting.txt starting.txt /*starting.txt*
startup starting.txt /*startup* startup starting.txt /*startup*
startup-options starting.txt /*startup-options* startup-options starting.txt /*startup-options*
startup-terminal term.txt /*startup-terminal* startup-terminal term.txt /*startup-terminal*
state() eval.txt /*state()*
static-tag tagsrch.txt /*static-tag* static-tag tagsrch.txt /*static-tag*
status-line windows.txt /*status-line* status-line windows.txt /*status-line*
statusmsg-variable eval.txt /*statusmsg-variable* statusmsg-variable eval.txt /*statusmsg-variable*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.1. Last change: 2019 Sep 08 *terminal.txt* For Vim version 8.1. Last change: 2019 Sep 20
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1225,8 +1225,10 @@ gdb:
`:Run` [args] run the program with [args] or the previous arguments `:Run` [args] run the program with [args] or the previous arguments
`:Arguments` {args} set arguments for the next `:Run` `:Arguments` {args} set arguments for the next `:Run`
*:Break* set a breakpoint at the current line; a sign will be displayed *:Break* set a breakpoint at the cursor position
*:Clear* delete the breakpoint at the current line :Break {position}
set a breakpoint at the specified position
*:Clear* delete the breakpoint at the cursor position
*:Step* execute the gdb "step" command *:Step* execute the gdb "step" command
*:Over* execute the gdb "next" command (`:Next` is a Vim command) *:Over* execute the gdb "next" command (`:Next` is a Vim command)

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.1. Last change: 2019 Sep 10 *todo.txt* For Vim version 8.1. Last change: 2019 Sep 19
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,9 +38,21 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs* *known-bugs*
-------------------- Known bugs and current work ----------------------- -------------------- Known bugs and current work -----------------------
Split off part of option.c: #4918 Add test for state().
Add test for using SafeState and SafeStateAgain autocommand.
Then plugin can:
- When callback is invoked and state() returns non-empty, add to work queue
- When SafeState autocommand event triggers, process work queue
Fix for "x" should be done by fixing "dl" ? 8.1.2052
'completeopt' "popup" variant that uses a callback after the popup has been
created, so the contents can be changed. Make it hidden, callback
or later has to make it visible. #4924 Setting the buffer contents later
doesn't work well.
Popup windows: Popup windows:
- Use popup (or popup menu) for command line completion
- Implement flip option - Implement flip option
- Why does 'nrformats' leak from the popup window buffer??? - Why does 'nrformats' leak from the popup window buffer???
Happens in Test_simple_popup() at the second screendump. Happens in Test_simple_popup() at the second screendump.
@@ -130,6 +142,11 @@ E278, E279, E290, E292, E362, E366, E450, E451, E452,
E453, E454, E460, E489, E491, E565, E578, E610, E611, E653, E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
E654, E856, E857, E860, E861, E863, E889, E900 E654, E856, E857, E860, E861, E863, E889, E900
Improve running tests on MS-Windows: #4922
Patch to properly break CJK lines: #3875
Ready to include now?
Remove check for cmd_silent when calling search_stat()? (Gary Johnson) Remove check for cmd_silent when calling search_stat()? (Gary Johnson)
undo result wrong: Masato Nishihata, #4798 undo result wrong: Masato Nishihata, #4798
@@ -510,9 +527,6 @@ Further xdiff changes:
Difference between two regexp engines: #3373 Difference between two regexp engines: #3373
Patch to properly break CJK lines: #3875
Requires more tests. dbcs_ functions are not implemented.
Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639) Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639)
What is the practical use for this? What is the practical use for this?
@@ -783,7 +797,7 @@ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
MS-Windows: buffer completion doesn't work when using backslash (or slash) MS-Windows: buffer completion doesn't work when using backslash (or slash)
for a path separator. (xtal8, #2201) for a path separator. (xtal8, #2201)
Would be nice for insert mode completion to highlight the text that was added Would be nice for Insert mode completion to highlight the text that was added
(and may change when picking another completion). (and may change when picking another completion).
Test runtime files. Test runtime files.
@@ -1894,9 +1908,6 @@ Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
21, Ben Fritz, 2010 Sep 14) 21, Ben Fritz, 2010 Sep 14)
'cursorline' works on a text line only. Add 'cursorscreenline' for
highlighting the screen line. (Christian Brabandt, 2012 Mar 31)
Win32: Patch to use task dialogs when available. (Sergiu Dotenco, 2011 Sep 17) Win32: Patch to use task dialogs when available. (Sergiu Dotenco, 2011 Sep 17)
New feature, requires testing. Made some remarks. New feature, requires testing. Made some remarks.

View File

@@ -511,6 +511,11 @@ func s:DecodeMessage(quotedText)
" drop \n " drop \n
let i += 1 let i += 1
continue continue
elseif a:quotedText[i] == 't'
" append \t
let i += 1
let result .= "\t"
continue
endif endif
endif endif
let result .= a:quotedText[i] let result .= a:quotedText[i]
@@ -610,12 +615,22 @@ func s:CommOutput(chan, msg)
endfor endfor
endfunc endfunc
func s:GotoProgram()
if has('win32')
if executable('powershell')
call system(printf('powershell -Command "add-type -AssemblyName microsoft.VisualBasic;[Microsoft.VisualBasic.Interaction]::AppActivate(%d);"', s:pid))
endif
else
win_gotoid(s:ptywin)
endif
endfunc
" Install commands in the current window to control the debugger. " Install commands in the current window to control the debugger.
func s:InstallCommands() func s:InstallCommands()
let save_cpo = &cpo let save_cpo = &cpo
set cpo&vim set cpo&vim
command Break call s:SetBreakpoint() command -nargs=? Break call s:SetBreakpoint(<q-args>)
command Clear call s:ClearBreakpoint() command Clear call s:ClearBreakpoint()
command Step call s:SendCommand('-exec-step') command Step call s:SendCommand('-exec-step')
command Over call s:SendCommand('-exec-next') command Over call s:SendCommand('-exec-next')
@@ -633,7 +648,7 @@ func s:InstallCommands()
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>) command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
command Gdb call win_gotoid(s:gdbwin) command Gdb call win_gotoid(s:gdbwin)
command Program call win_gotoid(s:ptywin) command Program call s:GotoProgram()
command Source call s:GotoSourcewinOrCreateIt() command Source call s:GotoSourcewinOrCreateIt()
command Winbar call s:InstallWinbar() command Winbar call s:InstallWinbar()
@@ -733,7 +748,7 @@ func s:DeleteCommands()
endfunc endfunc
" :Break - Set a breakpoint at the cursor position. " :Break - Set a breakpoint at the cursor position.
func s:SetBreakpoint() func s:SetBreakpoint(at)
" Setting a breakpoint may not work while the program is running. " Setting a breakpoint may not work while the program is running.
" Interrupt to make it work. " Interrupt to make it work.
let do_continue = 0 let do_continue = 0
@@ -746,9 +761,11 @@ func s:SetBreakpoint()
endif endif
sleep 10m sleep 10m
endif endif
" Use the fname:lnum format, older gdb can't handle --source. " Use the fname:lnum format, older gdb can't handle --source.
call s:SendCommand('-break-insert ' let at = empty(a:at) ?
\ . fnameescape(expand('%:p')) . ':' . line('.')) \ fnameescape(expand('%:p')) . ':' . line('.') : a:at
call s:SendCommand('-break-insert ' . at)
if do_continue if do_continue
call s:SendCommand('-exec-continue') call s:SendCommand('-exec-continue')
endif endif

View File

@@ -1,6 +1,6 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network " netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN SECTION " PLUGIN SECTION
" Date: Feb 08, 2016 " Date: Feb 08, 2016 (update for gx 2019 Sep 20)
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1 " Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1
@@ -81,7 +81,7 @@ if !exists("g:netrw_nogx")
if !hasmapto('<Plug>NetrwBrowseX') if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX nmap <unique> gx <Plug>NetrwBrowseX
endif endif
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr> nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
endif endif
if maparg('gx','v') == "" if maparg('gx','v') == ""
if !hasmapto('<Plug>NetrwBrowseXVis') if !hasmapto('<Plug>NetrwBrowseXVis')

View File

@@ -2,7 +2,7 @@
" Language: JSON " Language: JSON
" Maintainer: vacancy " Maintainer: vacancy
" Previous Maintainer: Eli Parra <eli@elzr.com> " Previous Maintainer: Eli Parra <eli@elzr.com>
" Last Change: 2019 Jul 08 " Last Change: 2019 Sep 17
" Version: 0.12 " Version: 0.12
if !exists("main_syntax") if !exists("main_syntax")
@@ -20,7 +20,7 @@ syntax match jsonNoise /\%(:\|,\)/
" Syntax: JSON Keywords " Syntax: JSON Keywords
" Separated into a match and region because a region by itself is always greedy " Separated into a match and region because a region by itself is always greedy
syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
if has('conceal') if has('conceal') && (!exists("g:vim_json_conceal") || g:vim_json_conceal==1)
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained
else else
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained
@@ -31,7 +31,7 @@ endif
" Needs to come after keywords or else a json encoded string will break the " Needs to come after keywords or else a json encoded string will break the
" syntax " syntax
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString
if has('conceal') if has('conceal') && (!exists("g:vim_json_conceal") || g:vim_json_conceal==1)
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained
else else
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape contained syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape contained