summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-19 18:50:13 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-19 18:50:13 +0200
commit1d59aa1fdfb191d9872ff87eb94652acd374b293 (patch)
treecff1ad6b4c19ca301a4aea1b0227c85305ac560f
parenta05e524f3aa8eadc2dbd0ad8ff6db9407ac7ac7e (diff)
Update runtime files.
-rw-r--r--.github/CODEOWNERS100
-rw-r--r--nsis/lang/italian.nsi6
-rw-r--r--runtime/autoload/netrw.vim126
-rw-r--r--runtime/autoload/netrwFileHandlers.vim6
-rw-r--r--runtime/doc/cmdline.txt25
-rw-r--r--runtime/doc/eval.txt6
-rw-r--r--runtime/doc/insert.txt4
-rw-r--r--runtime/doc/map.txt4
-rw-r--r--runtime/doc/options.txt11
-rw-r--r--runtime/doc/pi_netrw.txt80
-rw-r--r--runtime/doc/popup.txt8
-rw-r--r--runtime/doc/tags9
-rw-r--r--runtime/doc/todo.txt59
-rw-r--r--runtime/doc/version8.txt4
-rw-r--r--runtime/doc/vim9.txt153
-rw-r--r--runtime/indent/erlang.vim147
-rw-r--r--runtime/plugin/netrwPlugin.vim2
-rw-r--r--runtime/syntax/erlang.vim6
-rw-r--r--runtime/syntax/netrw.vim2
19 files changed, 557 insertions, 201 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 0d4f264d0d..d88e773736 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -3,22 +3,25 @@
# You can use github users with @user or email addresses
# These owners will be the default owners for everything in the repo.
-* @brammool
+#* @brammool
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
-src/libvterm/* @leonerd
+src/iscygpty.* @k-takata
+src/libvterm/ @leonerd
runtime/autoload/getscript.vim @cecamp
runtime/autoload/netrw.vim @cecamp
runtime/autoload/netrwFileHandlers.vim @cecamp
runtime/autoload/netrwSettings.vim @cecamp
+runtime/autoload/rubycomplete.vim @segfault @dkearns
runtime/autoload/tar.vim @cecamp
runtime/autoload/vimball.vim @cecamp
runtime/autoload/zip.vim @cecamp
runtime/compiler/checkstyle.vim @dkearns
+runtime/compiler/cucumber.vim @tpope
runtime/compiler/dart.vim @dkearns
runtime/compiler/dart2js.vim @dkearns
runtime/compiler/dart2native.vim @dkearns
@@ -29,15 +32,20 @@ runtime/compiler/dartfmt.vim @dkearns
runtime/compiler/eruby.vim @dkearns
runtime/compiler/gawk.vim @dkearns
runtime/compiler/gjs.vim @dkearns
+runtime/compiler/haml.vim @tpope
runtime/compiler/javac.vim @dkearns
runtime/compiler/jest.vim @dkearns
runtime/compiler/jjs.vim @dkearns
runtime/compiler/jshint.vim @dkearns
runtime/compiler/jsonlint.vim @dkearns
runtime/compiler/php.vim @dkearns
+runtime/compiler/rake.vim @tpope @dkearns
runtime/compiler/rhino.vim @dkearns
+runtime/compiler/rspec.vim @tpope @dkearns
runtime/compiler/rubocop.vim @dkearns
+runtime/compiler/ruby.vim @tpope @dkearns
runtime/compiler/rubyunit.vim @dkearns
+runtime/compiler/sass.vim @tpope
runtime/compiler/se.vim @dkearns
runtime/compiler/stylelint.vim @dkearns
runtime/compiler/tcl.vim @dkearns
@@ -53,40 +61,92 @@ runtime/doc/pi_netrw.txt @cecamp
runtime/doc/pi_tar.txt @cecamp
runtime/doc/pi_vimball.txt @cecamp
runtime/doc/pi_zip.txt @cecamp
+runtime/ftplugin/bst.vim @tpope
runtime/ftplugin/css.vim @dkearns
+runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/eiffel.vim @dkearns
+runtime/ftplugin/eruby.vim @tpope @dkearns
+runtime/ftplugin/git.vim @tpope
+runtime/ftplugin/gitcommit.vim @tpope
+runtime/ftplugin/gitconfig.vim @tpope
+runtime/ftplugin/gitrebase.vim @tpope
+runtime/ftplugin/gitsendemail.vim @tpope
+runtime/ftplugin/haml.vim @tpope
+runtime/ftplugin/hgcommit.vim @k-takata
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
+runtime/ftplugin/liquid.vim @tpope
+runtime/ftplugin/markdown.vim @tpope
+runtime/ftplugin/matlab.vim @cecamp
+runtime/ftplugin/nsis.vim @k-takata
+runtime/ftplugin/pdf.vim @tpope
+runtime/ftplugin/ruby.vim @tpope @dkearns
+runtime/ftplugin/sass.vim @tpope
+runtime/ftplugin/scss.vim @tpope
+runtime/ftplugin/tmux.vim @ericpruitt
runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
-runtime/plugin/amiga.vim @cecamp
-runtime/plugin/csh.vim @cecamp
-runtime/plugin/dcl.vim @cecamp
-runtime/plugin/exports.vim @cecamp
+runtime/indent/bst.vim @tpope
+runtime/indent/cucumber.vim @tpope
+runtime/indent/dosbatch.vim @k-takata
+runtime/indent/eruby.vim @tpope @dkearns
+runtime/indent/gitconfig.vim @tpope
+runtime/indent/haml.vim @tpope
+runtime/indent/liquid.vim @tpope
+runtime/indent/nsis.vim @k-takata
+runtime/indent/ruby.vim @AndrewRadev @dkearns
+runtime/indent/sass.vim @tpope
+runtime/indent/scss.vim @tpope
+runtime/indent/teraterm.vim @k-takata
runtime/plugin/getscriptPlugin.vim @cecamp
-runtime/plugin/lex.vim @cecamp
-runtime/plugin/lisp.vim @cecamp
runtime/plugin/logiPat.vim @cecamp
-runtime/plugin/maple.vim @cecamp
-runtime/plugin/netrw.vim @cecamp
runtime/plugin/netrwPlugin.vim @cecamp
-runtime/plugin/rpcgen.vim @cecamp
-runtime/plugin/sh.vim @cecamp
-runtime/plugin/sm.vim @cecamp
-runtime/plugin/tags.vim @cecamp
runtime/plugin/tarPlugin.vim @cecamp
-runtime/plugin/tex.vim @cecamp
-runtime/plugin/vim.vim @cecamp
runtime/plugin/vimballPlugin.vim @cecamp
-runtime/plugin/wlmfilt.vim @cecamp
-runtime/plugin/xmath.vim @cecamp
-runtime/plugin/xxd.vim @cecamp
-runtime/plugin/yacc.vim @cecamp
runtime/plugin/zipPlugin.vim @cecamp
+runtime/syntax/amiga.vim @cecamp
+runtime/syntax/bst.vim @tpope
+runtime/syntax/csh.vim @cecamp
+runtime/syntax/cucumber.vim @tpope
+runtime/syntax/dcl.vim @cecamp
+runtime/syntax/elmfilt.vim @cecamp
+runtime/syntax/eruby.vim @tpope @dkearns
+runtime/syntax/exports.vim @cecamp
+runtime/syntax/git.vim @tpope
+runtime/syntax/gitcommit.vim @tpope
+runtime/syntax/gitconfig.vim @tpope
+runtime/syntax/gitrebase.vim @tpope
+runtime/syntax/haml.vim @tpope
+runtime/syntax/hgcommit.vim @k-takata
+runtime/syntax/lex.vim @cecamp
+runtime/syntax/liquid.vim @tpope
+runtime/syntax/lisp.vim @cecamp
runtime/syntax/lynx.vim @dkearns
runtime/syntax/mailcap.vim @dkearns
+runtime/syntax/make.vim @rohieb
+runtime/syntax/make.vim @rohieb
+runtime/syntax/maple.vim @cecamp
+runtime/syntax/markdown.vim @tpope
+runtime/syntax/netrw.vim @cecamp
+runtime/syntax/nsis.vim @k-takata
+runtime/syntax/pdf.vim @tpope
+runtime/syntax/php.vim @TysonAndre
runtime/syntax/privoxy.vim @dkearns
+runtime/syntax/rpcgen.vim @cecamp
runtime/syntax/ruby.vim @dkearns
+runtime/syntax/sass.vim @tpope
+runtime/syntax/scss.vim @tpope
+runtime/syntax/sh.vim @cecamp
+runtime/syntax/sm.vim @cecamp
+runtime/syntax/tags.vim @cecamp
+runtime/syntax/teraterm.vim @k-takata
+runtime/syntax/tex.vim @cecamp
runtime/syntax/tidy.vim @dkearns
+runtime/syntax/tmux.vim @ericpruitt
+runtime/syntax/vim.vim @cecamp
runtime/syntax/wget.vim @dkearns
runtime/syntax/xbl.vim @dkearns
+runtime/syntax/xmath.vim @cecamp
+runtime/syntax/xslt.vim @Boobies
+runtime/syntax/xxd.vim @cecamp
+runtime/syntax/yacc.vim @cecamp
diff --git a/nsis/lang/italian.nsi b/nsis/lang/italian.nsi
index 296bb84c6f..b90e0986cb 100644
--- a/nsis/lang/italian.nsi
+++ b/nsis/lang/italian.nsi
@@ -58,10 +58,10 @@ LangString str_desc_console ${LANG_ITALIAN} \
"Versione console di Vim (vim.exe)."
LangString str_section_batch ${LANG_ITALIAN} \
- "Crea file di invocazione (MS-DOS) .bat"
+ "Crea file .bat"
LangString str_desc_batch ${LANG_ITALIAN} \
- "Crea file di invocazione .bat per varianti di Vim nella directory \
- di Windows, per utilizzo da linea di comando (MS-DOS)."
+ "Crea file .bat per varianti di Vim nella directory \
+ di Windows, per utilizzo da riga di comando."
LangString str_group_icons ${LANG_ITALIAN} \
"Crea icone per Vim"
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index f4cc89e474..d095f6dd81 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
-" Date: Jan 07, 2020
-" Version: 168
+" Date: Sep 18, 2020
+" Version: 170
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
@@ -43,7 +43,7 @@ if exists("s:needspatches")
endfor
endif
-let g:loaded_netrw = "v168"
+let g:loaded_netrw = "v170"
if !exists("s:NOTE")
let s:NOTE = 0
let s:WARNING = 1
@@ -86,7 +86,16 @@ fun! netrw#ErrorMsg(level,msg,errnum)
endif
" call Decho("level=".level,'~'.expand("<slnum>"))
- if g:netrw_use_errorwindow
+ if g:netrw_use_errorwindow == 2 && (v:version > 802 || (v:version == 802 && has("patch486")))
+ " use popup window
+ if type(a:msg) == 3
+ let msg = [level]+a:msg
+ else
+ let msg= level.a:msg
+ endif
+ let s:popuperr_id = popup_beval(msg,{})
+ let s:popuperr_text= ""
+ elseif g:netrw_use_errorwindow
" (default) netrw creates a one-line window to show error/warning
" messages (reliably displayed)
@@ -203,7 +212,11 @@ let g:netrw_localrmdiropt = ""
" ---------------------------------------------------------------------
" Default values for netrw's global protocol variables {{{2
-call s:NetrwInit("g:netrw_use_errorwindow",1)
+if (v:version > 802 || (v:version == 802 && has("patch486"))) && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on") && has("mouse")
+ call s:NetrwInit("g:netrw_use_errorwindow",2)
+else
+ call s:NetrwInit("g:netrw_use_errorwindow",1)
+endif
if !exists("g:netrw_dav_cmd")
if executable("cadaver")
@@ -559,6 +572,7 @@ call s:NetrwInit("s:netrw_posn",'{}')
if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on")
" call Decho("installed beval events",'~'.expand("<slnum>"))
let &l:bexpr = "netrw#BalloonHelp()"
+" call Decho("&l:bexpr<".&l:bexpr."> buf#".bufnr())
au FileType netrw setl beval
au WinLeave * if &ft == "netrw" && exists("s:initbeval")|let &beval= s:initbeval|endif
au VimEnter * let s:initbeval= &beval
@@ -591,7 +605,18 @@ if v:version >= 700 && has("balloon_eval") && has("syntax") && exists("g:syntax_
if &ft != "netrw"
return ""
endif
- if !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval)
+ if exists("s:popuperr_id") && popup_getpos(s:popuperr_id) != {}
+ " popup error window is still showing
+ " s:pouperr_id and s:popuperr_text are set up in netrw#ErrorMsg()
+ if exists("s:popuperr_text") && s:popuperr_text != "" && v:beval_text != s:popuperr_text
+ " text under mouse hasn't changed; only close window when it changes
+ call popup_close(s:popuperr_id)
+ unlet s:popuperr_text
+ else
+ let s:popuperr_text= v:beval_text
+ endif
+ let mesg= ""
+ elseif !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval)
let mesg= ""
elseif v:beval_text == "Netrw" || v:beval_text == "Directory" || v:beval_text == "Listing"
let mesg = "i: thin-long-wide-tree gh: quick hide/unhide of dot-files qf: quick file info %:open new file"
@@ -1247,6 +1272,10 @@ fun! netrw#Lexplore(count,rightside,...)
setlocal winfixwidth
let g:netrw_altv = keep_altv
let t:netrw_lexbufnr = bufnr("%")
+ " done to prevent build-up of hidden buffers due to quitting and re-invocation of :Lexplore.
+ " Since the intended use of :Lexplore is to have an always-present explorer window, the extra
+ " effort to mis-use :Lex is warranted.
+ set bh=wipe
" call Decho("let t:netrw_lexbufnr=".t:netrw_lexbufnr)
" call Decho("t:netrw_lexposn".(exists("t:netrw_lexposn")? string(t:netrw_lexposn) : " n/a"))
if exists("t:netrw_lexposn")
@@ -1908,7 +1937,7 @@ fun! s:NetrwRestoreSetting(keepvar,setting)
if type(a:setting) == 0
exe "let ".a:setting."= ".keepvarval
elseif type(a:setting) == 1
- exe "let ".a:setting."= '".keepvarval."'"
+ exe "let ".a:setting."= '".substitute(keepvarval,"'","''","g")."'"
else
call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:keepvar." with a setting of type#".type(a:setting),105)
endif
@@ -3640,6 +3669,8 @@ fun! s:NetrwBookHistSave()
let savefile= s:NetrwHome()."/.netrwhist"
" call Decho("savefile<".savefile.">",'~'.expand("<slnum>"))
1split
+
+ " setting up a new buffer which will become .netrwhist
call s:NetrwEnew()
" call Decho("case g:netrw_use_noswf=".g:netrw_use_noswf.(exists("+acd")? " +acd" : " -acd"),'~'.expand("<slnum>"))
if g:netrw_use_noswf
@@ -4722,7 +4753,7 @@ endfun
" "new directory name" is actually a file,
" NetrwBrowseChgDir() edits the file.
fun! s:NetrwBrowseChgDir(islocal,newdir,...)
-" call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
+" call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." win#".winnr()." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
let ykeep= @@
@@ -4751,13 +4782,14 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
let newdir = a:newdir
let dolockout = 0
let dorestore = 1
+" call Decho("win#".winnr(),'~'.expand("<slnum>"))
" call Decho("dirname<".dirname.">",'~'.expand("<slnum>"))
" call Decho("newdir<".newdir.">",'~'.expand("<slnum>"))
" ignore <cr>s when done in the banner
" call Decho('(s:NetrwBrowseChgDir) ignore [return]s when done in banner (g:netrw_banner='.g:netrw_banner.")",'~'.expand("<slnum>"))
if g:netrw_banner
-" call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." line(.)#".line('.')." line($)#".line("#"),'~'.expand("<slnum>"))
+" call Decho("win#".winnr()." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." line(.)#".line('.')." line($)#".line("#"),'~'.expand("<slnum>"))
if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt && line("$") >= w:netrw_bannercnt
if getline(".") =~# 'Quick Help'
" call Decho("#1: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
@@ -4794,7 +4826,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" ------------------------------
" NetrwBrowseChgDir: edit a file {{{3
" ------------------------------
-" call Decho('(s:NetrwBrowseChgDir) edit-a-file: case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">",'~'.expand("<slnum>"))
+" call Decho('edit-a-file: case "handling a file": win#'.winnr().' newdir<'.newdir.'> !~ dirpat<'.dirpat.">",'~'.expand("<slnum>"))
" save position for benefit of Rexplore
let s:rexposn_{bufnr("%")}= winsaveview()
@@ -4829,7 +4861,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
NetrwKeepj call s:NetrwOptionsRestore("s:")
let curdir= b:netrw_curdir
if !exists("s:didsplit")
-" call Decho("edit-a-file: s:didsplit does not exist; g:netrw_browse_split=".string(g:netrw_browse_split)." win#".winnr(),'~'.expand("<slnum>"))
+" " call Decho("edit-a-file: s:didsplit does not exist; g:netrw_browse_split=".string(g:netrw_browse_split)." win#".winnr()." g:netrw_chgwin=".g:netrw_chgwin",'~'.expand("<slnum>"))
if type(g:netrw_browse_split) == 3
" open file in server
" Note that g:netrw_browse_split is a List: [servername,tabnr,winnr]
@@ -4837,22 +4869,27 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
call s:NetrwServerEdit(a:islocal,dirname)
" call Dret("s:NetrwBrowseChgDir")
return
+
elseif g:netrw_browse_split == 1
" horizontally splitting the window first
" call Decho("edit-a-file: horizontally splitting window prior to edit",'~'.expand("<slnum>"))
- keepalt new
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
+ exe "keepalt ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
if !&ea
keepalt wincmd _
endif
call s:SetRexDir(a:islocal,curdir)
+
elseif g:netrw_browse_split == 2
" vertically splitting the window first
" call Decho("edit-a-file: vertically splitting window prior to edit",'~'.expand("<slnum>"))
- keepalt rightb vert new
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
+ exe "keepalt ".(g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s"
if !&ea
keepalt wincmd |
endif
call s:SetRexDir(a:islocal,curdir)
+
elseif g:netrw_browse_split == 3
" open file in new tab
" call Decho("edit-a-file: opening new tab prior to edit",'~'.expand("<slnum>"))
@@ -4861,6 +4898,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
let b:netrw_curdir= getcwd()
endif
call s:SetRexDir(a:islocal,curdir)
+
elseif g:netrw_browse_split == 4
" act like "P" (ie. open previous window)
" call Decho("edit-a-file: use previous window for edit",'~'.expand("<slnum>"))
@@ -4870,13 +4908,14 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
return
endif
call s:SetRexDir(a:islocal,curdir)
+
else
" handling a file, didn't split, so remove menu
" call Decho("edit-a-file: handling a file+didn't split, so remove menu",'~'.expand("<slnum>"))
call s:NetrwMenu(0)
" optional change to window
if g:netrw_chgwin >= 1
-" call Decho("edit-a-file: changing window to #".g:netrw_chgwin,'~'.expand("<slnum>"))
+" call Decho("edit-a-file: changing window to #".g:netrw_chgwin.": (due to g:netrw_chgwin)",'~'.expand("<slnum>"))
if winnr("$")+1 == g:netrw_chgwin
" if g:netrw_chgwin is set to one more than the last window, then
" vertically split the last window to make that window available.
@@ -4889,19 +4928,26 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
endif
call s:SetRexDir(a:islocal,curdir)
endif
+
endif
" the point where netrw actually edits the (local) file
" if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will
" no keepalt to support :e # to return to a directory listing
+ if !&mod
+ " if e the new file would fail due to &mod, then don't change any of the flags
+ let dolockout= 1
+ endif
if a:islocal
" call Decho("edit-a-file: edit local file: exe e! ".fnameescape(dirname),'~'.expand("<slnum>"))
" some like c-^ to return to the last edited file
" others like c-^ to return to the netrw buffer
+ " Apr 30, 2020: used to have e! here. That can cause loss of a modified file,
+ " so emit error E37 instead.
if exists("g:netrw_altfile") && g:netrw_altfile
- exe "NetrwKeepj keepalt e! ".fnameescape(dirname)
+ exe "NetrwKeepj keepalt e ".fnameescape(dirname)
else
- exe "NetrwKeepj e! ".fnameescape(dirname)
+ exe "NetrwKeepj e ".fnameescape(dirname)
endif
" call Decho("edit-a-file: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod,'~'.expand("<slnum>"))
call s:NetrwCursor()
@@ -4912,7 +4958,6 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
else
" call Decho("edit-a-file: remote file: NetrwBrowse will edit it",'~'.expand("<slnum>"))
endif
- let dolockout= 1
" handle g:Netrw_funcref -- call external-to-netrw functions
" This code will handle g:Netrw_funcref as an individual function reference
@@ -5376,16 +5421,6 @@ fun! netrw#BrowseX(fname,remote)
endif
let ret= v:shell_error
- elseif has("unix") && executable("kfmclient") && s:CheckIfKde()
-" call Decho("(netrw#BrowseX) unix and kfmclient",'~'.expand("<slnum>"))
- call s:NetrwExe("sil !kfmclient exec ".s:ShellEscape(fname,1)." ".redir)
- let ret= v:shell_error
-
- elseif has("unix") && executable("exo-open") && executable("xdg-open") && executable("setsid")
-" call Decho("(netrw#BrowseX) unix, exo-open, xdg-open",'~'.expand("<slnum>"))
- call s:NetrwExe("sil !setsid xdg-open ".s:ShellEscape(fname,1).redir)
- let ret= v:shell_error
-
elseif has("unix") && $DESKTOP_SESSION == "mate" && executable("atril")
" call Decho("(netrw#BrowseX) unix and atril",'~'.expand("<slnum>"))
if a:fname =~ '^https\=://'
@@ -5400,9 +5435,19 @@ fun! netrw#BrowseX(fname,remote)
endif
let ret= v:shell_error
+ elseif has("unix") && executable("kfmclient") && s:CheckIfKde()
+" call Decho("(netrw#BrowseX) unix and kfmclient",'~'.expand("<slnum>"))
+ call s:NetrwExe("sil !kfmclient exec ".s:ShellEscape(fname,1)." ".redir)
+ let ret= v:shell_error
+
+ elseif has("unix") && executable("exo-open") && executable("xdg-open") && executable("setsid")
+" call Decho("(netrw#BrowseX) unix, exo-open, xdg-open",'~'.expand("<slnum>"))
+ call s:NetrwExe("sil !setsid xdg-open ".s:ShellEscape(fname,1).redir.'&')
+ let ret= v:shell_error
+
elseif has("unix") && executable("xdg-open")
" call Decho("(netrw#BrowseX) unix and xdg-open",'~'.expand("<slnum>"))
- call s:NetrwExe("sil !xdg-open ".s:ShellEscape(fname,1).redir)
+ call s:NetrwExe("sil !xdg-open ".s:ShellEscape(fname,1).redir.'&')
let ret= v:shell_error
elseif has("macunix") && executable("open")
@@ -6107,10 +6152,10 @@ fun! s:NetrwListHide()
" Duplicate characters don't matter.
" Remove all such characters from the '/~@#...890' string.
" Use the first character left as a separator character.
-" call Decho("find a character not in the hide string to use as a separator")
+" call Decho("find a character not in the hide string to use as a separator",'~'.expand("<slnum>"))
let listhide= g:netrw_list_hide
let sep = strpart(substitute('~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1)
-" call Decho("sep=".sep," (sep not in hide string)'~'.expand("<slnum>"))
+" call Decho("sep<".sep."> (sep not in hide string)",'~'.expand("<slnum>"))
while listhide != ""
if listhide =~ ','
@@ -6120,7 +6165,7 @@ fun! s:NetrwListHide()
let hide = listhide
let listhide = ""
endif
-" call Decho("..extracted from listhide: hide<".hide."> g:netrw_sort_by<".g:netrw_sort_by.'>','~'.expand("<slnum>"))
+" call Decho("..extracted pattern from listhide: hide<".hide."> g:netrw_sort_by<".g:netrw_sort_by.'>','~'.expand("<slnum>"))
if g:netrw_sort_by =~ '^[ts]'
if hide =~ '^\^'
" call Decho("..modify hide to handle a \"^...\" pattern",'~'.expand("<slnum>"))
@@ -6132,7 +6177,7 @@ fun! s:NetrwListHide()
endif
" Prune the list by hiding any files which match
-" call Decho("..prune the list by hiding any files which ",((g:netrw_hide == 1)? "" : "don't")." match hide<".hide.">")
+" call Decho("..prune the list by hiding any files which ".((g:netrw_hide == 1)? "" : "don't")."match hide<".hide.">")
if g:netrw_hide == 1
" call Decho("..hiding<".hide.">",'~'.expand("<slnum>"))
exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d'
@@ -9215,6 +9260,7 @@ endfun
" (full path directory with trailing slash returned)
fun! s:NetrwTreeDir(islocal)
" call Dfunc("s:NetrwTreeDir(islocal=".a:islocal.") getline(".line(".").")"."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft)
+" call Decho("Determine tree directory given current cursor position")
" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("<slnum>"))
" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))
" call Decho("w:netrw_treetop =".(exists("w:netrw_treetop")? w:netrw_treetop : 'n/a'),'~'.expand("<slnum>"))
@@ -9320,7 +9366,6 @@ fun! s:NetrwTreeDisplay(dir,depth)
call setline(line("$")+1,a:depth.shortdir.'/')
endif
" call Decho("setline#".line("$")." shortdir<".a:depth.shortdir.">",'~'.expand("<slnum>"))
-
" append a / to dir if its missing one
let dir= a:dir
@@ -9334,7 +9379,7 @@ fun! s:NetrwTreeDisplay(dir,depth)
let listhide= split(g:netrw_list_hide,',')
" call Decho("listhide=".string(listhide))
for pat in listhide
- call filter(w:netrw_treedict[dir],'v:val !~ "'.pat.'"')
+ call filter(w:netrw_treedict[dir],'v:val !~ "'.escape(pat,'\\').'"')
endfor
elseif g:netrw_hide == 2
@@ -9472,6 +9517,7 @@ fun! s:NetrwTreeListing(dirname)
" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
" display from treetop on down
+" call Decho("(s:NetrwTreeListing) w:netrw_treetop<".w:netrw_treetop.">")
NetrwKeepj call s:NetrwTreeDisplay(w:netrw_treetop,"")
" call Decho("s:NetrwTreeDisplay) setl noma nomod ro",'~'.expand("<slnum>"))
@@ -9742,7 +9788,7 @@ fun! s:PerformListing(islocal)
" Hiding... -or- Showing... {{{3
if g:netrw_banner
-" call Decho("--handle hiding/showing (g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("<slnum>"))
+" call Decho("--handle hiding/showing in banner (g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("<slnum>"))
if g:netrw_list_hide != "" && g:netrw_hide
if g:netrw_hide == 1
NetrwKeepj put ='\" Hiding: '.g:netrw_list_hide
@@ -9795,7 +9841,7 @@ fun! s:PerformListing(islocal)
" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
if !g:netrw_banner || line("$") >= w:netrw_bannercnt
-" call Decho("manipulate directory listing (hide)",'~'.expand("<slnum>"))
+" call Decho("manipulate directory listing (support hide)",'~'.expand("<slnum>"))
" call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("<slnum>"))
if g:netrw_hide && g:netrw_list_hide != ""
NetrwKeepj call s:NetrwListHide()
@@ -11808,7 +11854,7 @@ endfun
" ---------------------------------------------------------------------
" s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2
fun! s:NetrwEnew(...)
-" call Dfunc("s:NetrwEnew() a:0=".a:0." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">")
+" call Dfunc("s:NetrwEnew() a:0=".a:0." win#".winnr()." winnr($)=".winnr("$")." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">")
" call Decho("curdir<".((a:0>0)? a:1 : "")."> buf#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))
" grab a function-local-variable copy of buffer variables
@@ -11875,6 +11921,9 @@ fun! s:NetrwEnew(...)
endif
endif
endif
+ if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on")
+ let &l:bexpr = "netrw#BalloonHelp()"
+ endif
" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#")."> bh=".&bh." win#".winnr()." winnr($)#".winnr("$"))
endfun
@@ -11934,6 +11983,7 @@ endfun
" -1=failed
fun! s:NetrwLcd(newdir)
" call Dfunc("s:NetrwLcd(newdir<".a:newdir.">)")
+" call Decho("changing local directory",'~'.expand("<slnum>"))
let err472= 0
try
@@ -11969,6 +12019,8 @@ fun! s:NetrwLcd(newdir)
return -1
endif
+" call Decho("getcwd <".getcwd().">")
+" call Decho("b:netrw_curdir<".b:netrw_curdir.">")
" call Dret("s:NetrwLcd 0")
return 0
endfun
diff --git a/runtime/autoload/netrwFileHandlers.vim b/runtime/autoload/netrwFileHandlers.vim
index ed31e29a66..d07235c107 100644
--- a/runtime/autoload/netrwFileHandlers.vim
+++ b/runtime/autoload/netrwFileHandlers.vim
@@ -1,8 +1,8 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell
-" Date: May 03, 2013
-" Version: 11b ASTRO-ONLY
+" Date: Sep 18, 2020
+" Version: 11
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -20,7 +20,7 @@
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
-let g:loaded_netrwFileHandlers= "v11b"
+let g:loaded_netrwFileHandlers= "v11"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 91aab3b261..e536dac717 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 8.2. Last change: 2020 Aug 09
+*cmdline.txt* For Vim version 8.2. Last change: 2020 Sep 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -797,7 +797,7 @@ three lines: >
<
Visual Mode and Range *v_:*
-
+ *:star-visual-range*
{Visual}: Starts a command-line with the Visual selected lines as a
range. The code `:'<,'>` is used for this range, which makes
it possible to select a similar line from the command-line
@@ -873,34 +873,37 @@ it, no matter how many backslashes.
\\# \#
Also see |`=|.
- *:<cword>* *<cword>* *:<cWORD>* *<cWORD>*
- *:<cexpr>* *<cexpr>* *:<cfile>* *<cfile>*
- *:<afile>* *<afile>* *:<abuf>* *<abuf>*
- *:<amatch>* *<amatch>* *:<stack>* *<stack>*
- *:<sfile>* *<sfile>* *:<slnum>* *<slnum>*
- *:<sflnum>* *<sflnum>* *E499* *E500*
+ *E499* *E500*
Note: these are typed literally, they are not special keys!
+ *:<cword>* *<cword>*
<cword> is replaced with the word under the cursor (like |star|)
+ *:<cWORD>* *<cWORD>*
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
+ *:<cexpr>* *<cexpr>*
<cexpr> is replaced with the word under the cursor, including more
to form a C expression. E.g., when the cursor is on "arg"
of "ptr->arg" then the result is "ptr->arg"; when the
cursor is on "]" of "list[idx]" then the result is
"list[idx]". This is used for |v:beval_text|.
+ *:<cfile>* *<cfile>*
<cfile> is replaced with the path name under the cursor (like what
|gf| uses)
+ *:<afile>* *<afile>*
<afile> When executing autocommands, is replaced with the file name
of the buffer being manipulated, or the file for a read or
write. *E495*
+ *:<abuf>* *<abuf>*
<abuf> When executing autocommands, is replaced with the currently
effective buffer number (for ":r file" and ":so file" it is
the current buffer, the file being read/sourced is not in a
buffer). *E496*
+ *:<amatch>* *<amatch>*
<amatch> When executing autocommands, is replaced with the match for
which this autocommand was executed. *E497*
It differs from <afile> only when the file name isn't used
to match with (for FileType, Syntax and SpellFileMissing
events).
+ *:<sfile>* *<sfile>*
<sfile> When executing a ":source" command, is replaced with the
file name of the sourced file. *E498*
When executing a function, is replaced with the call stack,
@@ -908,18 +911,24 @@ Note: these are typed literally, they are not special keys!
<stack> is preferred).
Note that filename-modifiers are useless when <sfile> is
not used inside a script.
+ *:<stack>* *<stack>*
<stack> is replaced with the call stack, using
"function {function-name}[{lnum}]" for a function line
and "script {file-name}[{lnum}]" for a script line, and
".." in between items. E.g.:
"function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
+ *:<slnum>* *<slnum>*
<slnum> When executing a ":source" command, is replaced with the
line number. *E842*
When executing a function it's the line number relative to
the start of the function.
+ *:<sflnum>* *<sflnum>*
<sflnum> When executing a script, is replaced with the line number.
It differs from <slnum> in that <sflnum> is replaced with
the script line number in any situation. *E961*
+ *:<client>* *<client>*
+ <client> is replaced with the {clinetid} of the last received
+ message in |server2client()|
*filename-modifiers*
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 7dbf7772aa..82b81fbb32 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2020 Sep 06
+*eval.txt* For Vim version 8.2. Last change: 2020 Sep 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4302,6 +4302,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
<afile> autocmd file name
<abuf> autocmd buffer number (as a String!)
<amatch> autocmd matched name
+ <cexpr> C expression under the cursor
<sfile> sourced script file or function name
<slnum> sourced script line number or function
line number
@@ -4309,6 +4310,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
a function
<SID> "<SNR>123_" where "123" is the
current script ID |<SID>|
+ <stack> call stack
<cword> word under the cursor
<cWORD> WORD under the cursor
<client> the {clientid} of the last received
@@ -5489,7 +5491,7 @@ getmarklist([{expr}]) *getmarklist()*
local marks defined in buffer {expr}. For the use of {expr},
see |bufname()|.
- Each item in the retuned List is a |Dict| with the following:
+ Each item in the returned List is a |Dict| with the following:
name - name of the mark prefixed by "'"
pos - a |List| with the position of the mark:
[bufnum, lnum, col, off]
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index fed81e5db4..b202a939a8 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 8.2. Last change: 202