Skip to content

Commit 492ea88

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 4bf1de8 + b29d328 commit 492ea88

46 files changed

Lines changed: 1385 additions & 1179 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/autoload/netrw.vim

Lines changed: 544 additions & 828 deletions
Large diffs are not rendered by default.

runtime/autoload/netrwSettings.vim

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" netrwSettings.vim: makes netrw settings simpler
2-
" Date: Nov 09, 2016
2+
" Date: Dec 30, 2014
33
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
4-
" Version: 16
4+
" Version: 15
55
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
66
" Permission is hereby granted to use and distribute this code,
77
" with or without modifications, provided that this copyright
@@ -19,7 +19,7 @@
1919
if exists("g:loaded_netrwSettings") || &cp
2020
finish
2121
endif
22-
let g:loaded_netrwSettings = "v16"
22+
let g:loaded_netrwSettings = "v15"
2323
if v:version < 700
2424
echohl WarningMsg
2525
echo "***warning*** this version of netrwSettings needs vim 7.0"
@@ -154,13 +154,9 @@ fun! netrwSettings#NetrwSettings()
154154
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
155155
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
156156
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
157-
put = 'let g:netrw_localcopycmdopt = '.g:netrw_localcopycmdopt
158157
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
159-
put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt
160158
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
161-
put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt
162159
put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir
163-
put = 'let g:netrw_localrmdiropt = '.g:netrw_localrmdiropt
164160
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
165161
put = 'let g:netrw_menu = '.g:netrw_menu
166162
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps

runtime/doc/eval.txt

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.0. Last change: 2017 Nov 24
1+
*eval.txt* For Vim version 8.0. Last change: 2017 Dec 09
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2031,7 +2031,7 @@ assert_true({actual} [, {msg}]) none assert {actual} is true
20312031
asin({expr}) Float arc sine of {expr}
20322032
atan({expr}) Float arc tangent of {expr}
20332033
atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
2034-
balloon_show({msg}) none show {msg} inside the balloon
2034+
balloon_show({expr}) none show {expr} inside the balloon
20352035
balloon_split({msg}) List split {msg} as used for a balloon
20362036
browse({save}, {title}, {initdir}, {default})
20372037
String put up a file requester
@@ -3056,12 +3056,16 @@ ch_open({address} [, {options}]) *ch_open()*
30563056
ch_read({handle} [, {options}]) *ch_read()*
30573057
Read from {handle} and return the received message.
30583058
{handle} can be a Channel or a Job that has a Channel.
3059+
For a NL channel this waits for a NL to arrive, except when
3060+
there is nothing more to read (channel was closed).
30593061
See |channel-more|.
30603062
{only available when compiled with the |+channel| feature}
30613063

30623064
ch_readraw({handle} [, {options}]) *ch_readraw()*
30633065
Like ch_read() but for a JS and JSON channel does not decode
3064-
the message. See |channel-more|.
3066+
the message. For a NL channel it does not block waiting for
3067+
the NL to arrive, but otherwise works like ch_read().
3068+
See |channel-more|.
30653069
{only available when compiled with the |+channel| feature}
30663070

30673071
ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
@@ -4169,6 +4173,7 @@ getbufinfo([{dict}])
41694173
be specified in {dict}:
41704174
buflisted include only listed buffers.
41714175
bufloaded include only loaded buffers.
4176+
bufmodified include only modified buffers.
41724177

41734178
Otherwise, {expr} specifies a particular buffer to return
41744179
information for. For the use of {expr}, see |bufname()|
@@ -4679,9 +4684,10 @@ getqflist([{what}]) *getqflist()*
46794684
the last quickfix list
46804685
size number of entries in the quickfix list
46814686
title get the list title
4682-
winid get the |window-ID| (if opened)
4687+
winid get the quickfix |window-ID|
46834688
all all of the above quickfix properties
4684-
Non-string items in {what} are ignored.
4689+
Non-string items in {what} are ignored. To get the value of a
4690+
particular item, set it to zero.
46854691
If "nr" is not present then the current quickfix list is used.
46864692
If both "nr" and a non-zero "id" are specified, then the list
46874693
specified by "id" is used.
@@ -4691,18 +4697,22 @@ getqflist([{what}]) *getqflist()*
46914697
When "lines" is specified, all the other items except "efm"
46924698
are ignored. The returned dictionary contains the entry
46934699
"items" with the list of entries.
4694-
In case of error processing {what}, an empty dictionary is
4695-
returned.
46964700

46974701
The returned dictionary contains the following entries:
4698-
context context information stored with |setqflist()|
4699-
id quickfix list ID |quickfix-ID|
4700-
idx index of the current entry in the list
4701-
items quickfix list entries
4702-
nr quickfix list number
4703-
size number of entries in the quickfix list
4704-
title quickfix list title text
4705-
winid quickfix |window-ID| (if opened)
4702+
context context information stored with |setqflist()|.
4703+
If not present, set to "".
4704+
id quickfix list ID |quickfix-ID|. If not
4705+
present, set to 0.
4706+
idx index of the current entry in the list. If not
4707+
present, set to 0.
4708+
items quickfix list entries. If not present, set to
4709+
an empty list.
4710+
nr quickfix list number. If not present, set to 0
4711+
size number of entries in the quickfix list. If not
4712+
present, set to 0.
4713+
title quickfix list title text. If not present, set
4714+
to "".
4715+
winid quickfix |window-ID|. If not present, set to 0
47064716

47074717
Examples: >
47084718
:echo getqflist({'all': 1})
@@ -8793,8 +8803,8 @@ writefile({list}, {fname} [, {flags}])
87938803
the file. This flushes the file to disk, if possible. This
87948804
takes more time but avoids losing the file if the system
87958805
crashes.
8796-
When {flags} does not contain "S" or "s" then fsync is called
8797-
if the 'fsync' option is set.
8806+
When {flags} does not contain "S" or "s" then fsync() is
8807+
called if the 'fsync' option is set.
87988808
When {flags} contains "S" then fsync() is not called, even
87998809
when 'fsync' is set.
88008810

runtime/doc/if_pyth.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,8 @@ or 'pythonthreedll' option can be also used to specify the Python DLL.
736736

737737
The name of the DLL should match the Python version Vim was compiled with.
738738
Currently the name for Python 2 is "python27.dll", that is for Python 2.7.
739-
That is the default value for 'pythondll'. For Python 3 it is python35.dll
740-
(Python 3.5). To know for sure edit "gvim.exe" and search for
739+
That is the default value for 'pythondll'. For Python 3 it is python36.dll
740+
(Python 3.6). To know for sure edit "gvim.exe" and search for
741741
"python\d*.dll\c".
742742

743743

runtime/doc/quickfix.txt

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,50 @@ use this code: >
341341
au QuickfixCmdPost make call QfMakeConv()
342342
Another option is using 'makeencoding'.
343343

344+
*quickfix-title*
345+
Every quickfix and location list has a title. By default the title is set to
346+
the command that created the list. The |getqflist()| and |getloclist()|
347+
functions can be used to get the title of a quickfix and a location list
348+
respectively. The |setqflist()| and |setloclist()| functions can be used to
349+
modify the title of a quickfix and location list respectively. Examples: >
350+
call setqflist([], 'a', {'title' : 'Cmd output'})
351+
echo getqflist({'title' : 1})
352+
call setloclist(3, [], 'a', {'title' : 'Cmd output'})
353+
echo getloclist(3, {'title' : 1})
354+
<
355+
*quickfix-size*
356+
You can get the number of entries (size) in a quickfix and a location list
357+
using the |getqflist()| and |getloclist()| functions respectively. Examples: >
358+
echo getqflist({'size' : 1})
359+
echo getloclist(5, {'size' : 1})
360+
<
361+
*quickfix-context*
362+
Any Vim type can be associated as a context with a quickfix or location list.
363+
The |setqflist()| and the |setloclist()| functions can be used to associate a
364+
context with a quickfix and a location list respectively. The |getqflist()|
365+
and the |getloclist()| functions can be used to retrieve the context of a
366+
quickifx and a location list respectively. This is useful for a Vim plugin
367+
dealing with multiple quickfix/location lists.
368+
Examples: >
369+
370+
let somectx = {'name' : 'Vim', 'type' : 'Editor'}
371+
call setqflist([], 'a', {'context' : somectx})
372+
echo getqflist({'context' : 1})
373+
374+
let newctx = ['red', 'green', 'blue']
375+
call setloclist(2, [], 'a', {'id' : qfid, 'context' : newctx})
376+
echo getloclist(2, {'id' : qfid, 'context' : 1})
377+
<
378+
*quickfix-parse*
379+
You can parse a list of lines using 'erroformat' without creating or modifying
380+
a quickfix list using the |getqflist()| function. Examples: >
381+
echo getqflist({'lines' : ["F1:10:Line10", "F2:20:Line20"]})
382+
echo getqflist({'lines' : systemlist('grep -Hn quickfix *')})
383+
This returns a dictionary where the 'items' key contains the list of quickfix
384+
entries parsed from lines. The following shows how to use a custom
385+
'errorformat' to parse the lines without modifying the 'erroformat' option: >
386+
echo getqflist({'efm' : '%f#%l#%m', 'lines' : ['F1#10#Line']})
387+
<
344388

345389
EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
346390
*:cdo*
@@ -542,6 +586,13 @@ In all of the above cases, if the location list for the selected window is not
542586
yet set, then it is set to the location list displayed in the location list
543587
window.
544588

589+
*quickfix-window-ID*
590+
You can use the |getqflist()| and |getloclist()| functions to obtain the
591+
window ID of the quickfix window and location list window respectively (if
592+
present). Examples: >
593+
echo getqflist({'winid' : 1}).winid
594+
echo getloclist(2, {'winid' : 1}).winid
595+
<
545596
=============================================================================
546597
3. Using more than one list of errors *quickfix-error-lists*
547598

@@ -586,6 +637,14 @@ list, one newer list is overwritten. This is especially useful if you are
586637
browsing with ":grep" |grep|. If you want to keep the more recent error
587638
lists, use ":cnewer 99" first.
588639

640+
To get the number of lists in the quickfix and location list stack, you can
641+
use the |getqflist()| and |getloclist()| functions respectively with the list
642+
number set to the special value '$'. Examples: >
643+
echo getqflist({'nr' : '$'}).nr
644+
echo getloclist(3, {'nr' : '$'}).nr
645+
To get the number of the current list in the stack: >
646+
echo getqflist({'nr' : 0}).nr
647+
<
589648
=============================================================================
590649
4. Using :make *:make_makeprg*
591650

runtime/plugin/netrwPlugin.vim

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
if &cp || exists("g:loaded_netrwPlugin")
2121
finish
2222
endif
23-
let g:loaded_netrwPlugin = "v162"
23+
let g:loaded_netrwPlugin = "v156"
2424
let s:keepcpo = &cpo
2525
set cpo&vim
2626
"DechoRemOn
@@ -42,8 +42,8 @@ augroup END
4242
" Network Browsing Reading Writing: {{{2
4343
augroup Network
4444
au!
45-
au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>"))
46-
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
45+
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
46+
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
4747
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
4848
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
4949
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
@@ -59,7 +59,7 @@ com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(
5959
com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
6060
com! -nargs=* NetUserPass call NetUserPass(<f-args>)
6161
com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
62-
com! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
62+
com! -nargs=? Ntree call netrw#SetTreetop(<q-args>)
6363

6464
" Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
6565
com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
@@ -81,7 +81,7 @@ if !exists("g:netrw_nogx")
8181
if !hasmapto('<Plug>NetrwBrowseX')
8282
nmap <unique> gx <Plug>NetrwBrowseX
8383
endif
84-
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr>
84+
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
8585
endif
8686
if maparg('gx','v') == ""
8787
if !hasmapto('<Plug>NetrwBrowseXVis')
@@ -129,15 +129,19 @@ fun! s:LocalBrowse(dirname)
129129
elseif isdirectory(a:dirname)
130130
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
131131
" call Dredir("LocalBrowse ft last set: ","verbose set ft")
132+
" call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
132133
sil! call netrw#LocalBrowseCheck(a:dirname)
134+
" call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
133135
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
134136
exe w:netrw_bannercnt
137+
" call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
135138
endif
136139

137140
else
138141
" not a directory, ignore it
139142
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
140143
endif
144+
" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
141145

142146
" call Dret("s:LocalBrowse")
143147
endfun

0 commit comments

Comments
 (0)