diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-19 18:50:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-19 18:50:13 +0200 |
commit | 1d59aa1fdfb191d9872ff87eb94652acd374b293 (patch) | |
tree | cff1ad6b4c19ca301a4aea1b0227c85305ac560f /runtime | |
parent | a05e524f3aa8eadc2dbd0ad8ff6db9407ac7ac7e (diff) |
Update runtime files.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/netrw.vim | 126 | ||||
-rw-r--r-- | runtime/autoload/netrwFileHandlers.vim | 6 | ||||
-rw-r--r-- | runtime/doc/cmdline.txt | 25 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 6 | ||||
-rw-r--r-- | runtime/doc/insert.txt | 4 | ||||
-rw-r--r-- | runtime/doc/map.txt | 4 | ||||
-rw-r--r-- | runtime/doc/options.txt | 11 | ||||
-rw-r--r-- | runtime/doc/pi_netrw.txt | 80 | ||||
-rw-r--r-- | runtime/doc/popup.txt | 8 | ||||
-rw-r--r-- | runtime/doc/tags | 9 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 59 | ||||
-rw-r--r-- | runtime/doc/version8.txt | 4 | ||||
-rw-r--r-- | runtime/doc/vim9.txt | 153 | ||||
-rw-r--r-- | runtime/indent/erlang.vim | 147 | ||||
-rw-r--r-- | runtime/plugin/netrwPlugin.vim | 2 | ||||
-rw-r--r-- | runtime/syntax/erlang.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/netrw.vim | 2 |
17 files changed, 474 insertions, 178 deletions
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: 2020 Apr 30 +*insert.txt* For Vim version 8.2. Last change: 2020 Sep 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1843,6 +1843,7 @@ a Append text after the cursor [count] times. If the *A* A Append text at the end of the line [count] times. + For using "A" in Visual block mode see |v_b_A|. <insert> or *i* *insert* *<Insert>* i Insert text before the cursor [count] times. @@ -1855,6 +1856,7 @@ I Insert text before the first non-blank in the line When the 'H' flag is present in 'cpoptions' and the line only contains blanks, insert start just before the last blank. + For using "I" in Visual block mode see |v_b_I|. *gI* gI Insert text in column 1 [count] times. diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 8900026a1f..df96bde941 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 8.2. Last change: 2020 Sep 06 +*map.txt* For Vim version 8.2. Last change: 2020 Sep 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1506,7 +1506,7 @@ The valid escape sequences are <bang> (See the '-bang' attribute) Expands to a ! if the command was executed with a ! modifier, otherwise expands to nothing. - *<mods>* *:command-modifiers* + *<mods>* *<q-mods>* *:command-modifiers* <mods> The command modifiers, if specified. Otherwise, expands to nothing. Supported modifiers are |:aboveleft|, |:belowright|, |:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|, diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 85a0296e0b..713f3ba3e5 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.2. Last change: 2020 Sep 06 +*options.txt* For Vim version 8.2. Last change: 2020 Sep 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2806,7 +2806,10 @@ A jump table for the options with a short description can be found at |Q_op|. 'emoji' 'emo' boolean (default: on) global When on all Unicode emoji characters are considered to be full width. - + This excludes "text emoji" characters, which are normally displayed as + single width. Unfortunately there is no good specification for this + and it has been determined on trial-and-error basis. Use the + |setcellwidths()| function to change the behavior. *'encoding'* *'enc'* *E543* 'encoding' 'enc' string (default: "latin1" or value from $LANG) @@ -7288,8 +7291,8 @@ A jump table for the options with a short description can be found at |Q_op|. N N Printer page number. (Only works in the 'printheader' option.) l N Line number. L N Number of lines in buffer. - c N Column number. - v N Virtual column number. + c N Column number (byte index). + v N Virtual column number (screen column). V N Virtual column number as -{num}. Not displayed if equal to 'c'. p N Percentage through file in lines as in |CTRL-G|. P S Percentage through file of displayed window. This is like the diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index d5dfd37fab..b293d9b15f 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 8.2. Last change: 2020 Aug 15 +*pi_netrw.txt* For Vim version 8.2. Last change: 2020 Sep 19 ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell @@ -437,9 +437,13 @@ settings are described below, in |netrw-browser-options|, and in *g:netrw_silent* =0 : transfers done normally =1 : transfers done silently - *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one + *g:netrw_use_errorwindow* =2: messages from netrw will use a popup window + Move the mouse and pause to remove the popup window. + (default value if popup windows are availble) + =1 : messages from netrw will use a separate one line window. This window provides reliable - delivery of messages. (default) + delivery of messages. + (default value if popup windows are not availble) =0 : messages from netrw will use echoerr ; messages don't always seem to show up this way, but one doesn't have to quit the window. @@ -725,6 +729,8 @@ just as easily as if they were local files! > See |netrw-activate| for more on how to encourage your vim to use plugins such as netrw. +For password-free use of scp:, see |netrw-ssh-hack|. + ============================================================================== 7. Ex Commands *netrw-ex* {{{1 @@ -1063,7 +1069,7 @@ QUICK HELP *netrw-quickhelp* {{{2 Reverse sorting order.........................|netrw-r| - *netrw-quickmap* *netrw-quickmaps* + *netrw-quickmap* *netrw-quickmaps* QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 > --- ----------------- ---- @@ -1080,7 +1086,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 a Cycles between normal display, |netrw-a| hiding (suppress display of files matching g:netrw_list_hide) and showing (display only files which match g:netrw_list_hide) - c Make browsing directory the current directory |netrw-c| + cd Make browsing directory the current directory |netrw-cd| C Setting the editing window |netrw-C| d Make a directory |netrw-d| D Attempt to remove the file(s)/directory(ies) |netrw-D| @@ -2098,7 +2104,7 @@ the two directories the same, use the "cd" map (type cd). That map will set Vim's notion of the current directory to netrw's current browsing directory. -*netrw-c* : This map's name has been changed from "c" to cd (see |netrw-cd|). +|netrw-cd|: This map's name was changed from "c" to cd (see |netrw-cd|). This change was done to allow for |netrw-cb| and |netrw-cB| maps. Associated setting variable: |g:netrw_keepdir| @@ -2753,7 +2759,7 @@ your browsing preferences. (see also: |netrw-settings|) =0 keep the current directory the same as the browsing directory. The current browsing directory is contained in - b:netrw_curdir (also see |netrw-c|) + b:netrw_curdir (also see |netrw-cd|) *g:netrw_keepj* ="keepj" (default) netrw attempts to keep the |:jumps| table unaffected. @@ -3054,7 +3060,7 @@ your browsing preferences. (see also: |netrw-settings|) (see |netrw-c-tab|). *g:netrw_xstrlen* Controls how netrw computes string lengths, - including multibyte characters' string + including multi-byte characters' string length. (thanks to N Weibull, T Mechelynck) =0: uses Vim's built-in strlen() =1: number of codepoints (Latin a + combining @@ -3124,7 +3130,8 @@ a file usin |