neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 1e2b75abb765b887bfc391f2a3e9582a397a3f9e
parent db423ccf27cc07d943e7f4367fd98b72c0306194
Author: Jaehwang Jung <tomtomjhj@gmail.com>
Date:   Sat, 13 Sep 2025 01:36:32 +0900

vim-patch:600cd88: runtime(netrw): remove comment separators

closes: vim/vim#17514

https://github.com/vim/vim/commit/600cd88cdfb1705d7aac9755839ba92282bc32ad

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>

Diffstat:
Mruntime/pack/dist/opt/netrw/autoload/netrw.vim | 186+------------------------------------------------------------------------------
1 file changed, 1 insertion(+), 185 deletions(-)

diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim @@ -29,11 +29,8 @@ endif let s:keepcpo= &cpo setl cpo&vim -" ====================== " Netrw Variables: {{{1 -" ====================== -" --------------------------------------------------------------------- " netrw#ErrorMsg: {{{2 " 0=note = s:NOTE " 1=warning = s:WARNING @@ -50,7 +47,6 @@ function! netrw#ErrorMsg(level, msg, errnum) endif endfunction -" --------------------------------------------------------------------- " s:NetrwInit: initializes variables if they haven't been defined {{{2 " Loosely, varname = value. fun s:NetrwInit(varname,value) @@ -67,7 +63,6 @@ fun s:NetrwInit(varname,value) endif endfun -" --------------------------------------------------------------------- " Netrw Constants: {{{2 call s:NetrwInit("g:netrw_dirhistcnt",0) if !exists("s:LONGLIST") @@ -89,14 +84,12 @@ let s:has_balloon = !has('nvim') && \ exists("g:syntax_on") && \ !exists("g:netrw_nobeval") -" --------------------------------------------------------------------- " Default option values: {{{2 call s:NetrwInit("g:netrw_localcopycmdopt","") call s:NetrwInit("g:netrw_localcopydircmdopt","") call s:NetrwInit("g:netrw_localmkdiropt","") call s:NetrwInit("g:netrw_localmovecmdopt","") -" --------------------------------------------------------------------- " Default values for netrw's global protocol variables {{{2 if !exists("g:netrw_dav_cmd") @@ -177,7 +170,6 @@ else let s:netrw_rcpmode = '' endif -" --------------------------------------------------------------------- " Default values for netrw's global variables {{{2 " Cygwin Detection ------- {{{3 if !exists("g:netrw_cygwin") @@ -427,7 +419,6 @@ call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.") call s:NetrwInit("g:netrw_winsize",50) call s:NetrwInit("g:netrw_wiw",1) if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif -" --------------------------------------------------------------------- " Default values for netrw's script variables: {{{2 call s:NetrwInit("g:netrw_fname_escape",' ?&;%') if has("win32") @@ -449,9 +440,7 @@ call s:NetrwInit("s:netrw_posn",'{}') " Has a side effect that doau BufReadPost doesn't work, so " files read by network transfer aren't appropriately highlighted. -" ====================== " Netrw Initialization: {{{1 -" ====================== if s:has_balloon let &l:bexpr = "netrw#BalloonHelp()" au FileType netrw setl beval @@ -468,11 +457,8 @@ else com! -nargs=* NetrwKeepj <args> endif -" ============================== " Netrw Utility Functions: {{{1 -" ============================== -" --------------------------------------------------------------------- " netrw#BalloonHelp: {{{2 if s:has_balloon @@ -516,7 +502,6 @@ if s:has_balloon endfunction endif -" ------------------------------------------------------------------------ " netrw#Explore: launch the local browser in the directory of the current file {{{2 " indx: == -1: Nexplore " == -2: Pexplore @@ -934,7 +919,6 @@ fun! netrw#Explore(indx,dosplit,style,...) sil! let @/ = keepregslash endfun -" --------------------------------------------------------------------- " netrw#Lexplore: toggle Explorer window, keeping it on the left of the current tab {{{2 " Uses g:netrw_chgwin : specifies the window where Lexplore files are to be opened " t:netrw_lexposn : winsaveview() output (used on Lexplore window) @@ -1032,7 +1016,6 @@ fun! netrw#Lexplore(count,rightside,...) endfun -" --------------------------------------------------------------------- " netrw#MakeTgt: make a target out of the directory name provided {{{2 fun! netrw#MakeTgt(dname) " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) @@ -1055,7 +1038,6 @@ fun! netrw#MakeTgt(dname) call winrestview(svpos) endfun -" --------------------------------------------------------------------- " netrw#Obtain: {{{2 " netrw#Obtain(islocal,fname[,tgtdirectory]) " islocal=0 obtain from remote source @@ -1260,7 +1242,6 @@ fun! netrw#Obtain(islocal,fname,...) endfun -" --------------------------------------------------------------------- " netrw#Nread: save position, call netrw#NetRead(), and restore position {{{2 fun! netrw#Nread(mode,fname) let svpos= winsaveview() @@ -1275,7 +1256,6 @@ fun! netrw#Nread(mode,fname) endif endfun -" ------------------------------------------------------------------------ " s:NetrwOptionsSave: save options prior to setting to "netrw-buffer-standard" form {{{2 " Options get restored by s:NetrwOptionsRestore() " @@ -1354,7 +1334,6 @@ fun! s:NetrwOptionsSave(vt) endfun -" --------------------------------------------------------------------- " s:NetrwOptionsSafe: sets options to help netrw do its job {{{2 " Use s:NetrwSaveOptions() to save user settings " Use s:NetrwOptionsRestore() to restore user settings @@ -1409,7 +1388,6 @@ fun! s:NetrwOptionsSafe(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwOptionsRestore: restore options (based on prior s:NetrwOptionsSave) {{{2 fun! s:NetrwOptionsRestore(vt) if !exists("{a:vt}netrw_optionsave") @@ -1515,7 +1493,6 @@ fun! s:NetrwOptionsRestore(vt) endif endfun -" --------------------------------------------------------------------- " s:NetrwSetSafeSetting: sets an option to a safe setting {{{2 " but only when the options' value and the safe setting differ " Doing this means that netrw will not come up as having changed a @@ -1541,7 +1518,6 @@ fun! s:NetrwSetSafeSetting(setting,safesetting) endfun -" ------------------------------------------------------------------------ " s:NetrwRestoreSetting: restores specified setting using associated keepvar, {{{2 " but only if the setting value differs from the associated keepvar. " Doing this means that netrw will not come up as having changed a @@ -1575,7 +1551,6 @@ fun! s:NetrwRestoreSetting(keepvar,setting) endfun -" --------------------------------------------------------------------- " NetrwStatusLine: {{{2 fun! NetrwStatusLine() @@ -1608,11 +1583,8 @@ fun! NetrwStatusLine() endif endfun -" =============================== " Netrw Transfer Functions: {{{1 -" =============================== -" ------------------------------------------------------------------------ " netrw#NetRead: responsible for reading a file over the net {{{2 " mode: =0 read remote file and insert before current line " =1 read remote file and insert after current line @@ -1987,7 +1959,6 @@ fun! netrw#NetRead(mode,...) endfun -" ------------------------------------------------------------------------ " netrw#NetWrite: responsible for writing a file over the net {{{2 fun! netrw#NetWrite(...) range @@ -2327,7 +2298,6 @@ fun! netrw#NetWrite(...) range endfun -" --------------------------------------------------------------------- " netrw#NetSource: source a remotely hosted Vim script {{{2 " uses NetRead to get a copy of the file into a temporarily file, " then sources that file, @@ -2363,7 +2333,6 @@ fun! netrw#NetSource(...) endif endfun -" --------------------------------------------------------------------- " netrw#SetTreetop: resets the tree top to the current directory/specified directory {{{2 " (implements the :Ntree command) fun! netrw#SetTreetop(iscmd,...) @@ -2411,7 +2380,6 @@ fun! netrw#SetTreetop(iscmd,...) endfun -" =========================================== " s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2 " readcmd == %r : replace buffer with newly read file " == 0r : read file at top of buffer @@ -2510,7 +2478,6 @@ fun! s:NetrwGetFile(readcmd, tfile, method) endfun -" ------------------------------------------------------------------------ " s:NetrwMethod: determine method of transfer {{{2 " Input: " choice = url [protocol:]//[userid@]hostname[:port]/[path-to-file] @@ -2755,7 +2722,6 @@ fun! s:NetrwValidateHostname(hostname) return a:hostname =~? '^[a-z0-9]' endfun -" --------------------------------------------------------------------- " NetUserPass: set username and password for subsequent ftp transfer {{{2 " Usage: :call NetUserPass() -- will prompt for userid and password " :call NetUserPass("uid") -- will prompt for password @@ -2854,11 +2820,8 @@ fun! NetUserPass(...) endfun -" ================================= " Shared Browsing Support: {{{1 -" ================================= -" --------------------------------------------------------------------- " s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2 fun! s:ExplorePatHls(pattern) let repat= substitute(a:pattern,'^**/\{1,2}','','') @@ -2867,7 +2830,6 @@ fun! s:ExplorePatHls(pattern) return repat endfun -" --------------------------------------------------------------------- " s:NetrwBookHistHandler: {{{2 " 0: (user: <mb>) bookmark current directory " 1: (user: <gb>) change to the bookmarked directory @@ -3027,7 +2989,6 @@ fun! s:NetrwBookHistHandler(chg,curdir) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwBookHistRead: this function reads bookmarks and history {{{2 " Will source the history file (.netrwhist) only if the g:netrw_disthistmax is > 0. " Sister function: s:NetrwBookHistSave() @@ -3059,7 +3020,6 @@ fun! s:NetrwBookHistRead() let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwBookHistSave: this function saves bookmarks and history to files {{{2 " Sister function: s:NetrwBookHistRead() " I used to do this via viminfo but that appears to @@ -3140,7 +3100,6 @@ fun! s:NetrwBookHistSave() endfun -" --------------------------------------------------------------------- " s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{2 " list of the contents of a local or remote directory. It is assumed that the " g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted @@ -3389,7 +3348,6 @@ fun! s:NetrwBrowse(islocal,dirname) return endfun -" --------------------------------------------------------------------- " s:NetrwFile: because of g:netrw_keepdir, isdirectory(), type(), etc may or {{{2 " may not apply correctly; ie. netrw's idea of the current directory may " differ from vim's. This function insures that netrw's idea of the current @@ -3434,7 +3392,6 @@ fun! s:NetrwFile(fname) return ret endfun -" --------------------------------------------------------------------- " s:NetrwFileInfo: supports qf (query for file information) {{{2 fun! s:NetrwFileInfo(islocal,fname) let ykeep= @@ @@ -3479,7 +3436,6 @@ fun! s:NetrwFileInfo(islocal,fname) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwGetBuffer: [get a new|find an old netrw] buffer for a netrw listing {{{2 " returns 0=cleared buffer " 1=re-used buffer (buffer not cleared) @@ -3611,7 +3567,6 @@ fun! s:NetrwGetBuffer(islocal,dirname) return 0 endfun -" --------------------------------------------------------------------- " s:NetrwGetWord: it gets the directory/file named under the cursor {{{2 fun! s:NetrwGetWord() let keepsol= &l:sol @@ -3718,7 +3673,6 @@ fun! s:NetrwGetWord() return dirname endfun -" --------------------------------------------------------------------- " s:NetrwListSettings: make standard settings for making a netrw listing {{{2 " g:netrw_bufsettings will be used after the listing is produced. " Called by s:NetrwGetBuffer() @@ -3739,7 +3693,6 @@ fun! s:NetrwListSettings(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwListStyle: change list style (thin - long - wide - tree) {{{2 " islocal=0: remote browsing " =1: local browsing @@ -3798,7 +3751,6 @@ fun! s:NetrwListStyle(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwBannerCtrl: toggles the display of the banner {{{2 fun! s:NetrwBannerCtrl(islocal) let ykeep= @@ @@ -3821,7 +3773,6 @@ fun! s:NetrwBannerCtrl(islocal) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwBookmark: supports :NetrwMB[!] [file]s {{{2 " " No bang: enters files/directories into Netrw's bookmark system @@ -3887,7 +3838,6 @@ fun! s:NetrwBookmark(del,...) call s:NetrwBookmarkMenu() endfun -" --------------------------------------------------------------------- " s:NetrwBookmarkMenu: Uses menu priorities {{{2 " .2.[cnt] for bookmarks, and " .3.[cnt] for history @@ -3946,7 +3896,6 @@ fun! s:NetrwBookmarkMenu() endif endfun -" --------------------------------------------------------------------- " s:NetrwBrowseChgDir: constructs a new directory based on the current {{{2 " directory and a new directory name. Also, if the " "new directory name" is actually a file, @@ -4285,7 +4234,6 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,cursor,...) return dirname endfun -" --------------------------------------------------------------------- " s:NetrwBrowseUpDir: implements the "-" mappings {{{2 " for thin, long, and wide: cursor placed just after banner " for tree, keeps cursor on current filename @@ -4350,7 +4298,6 @@ fun! s:NetrwBrowseUpDir(islocal) endif endfun -" --------------------------------------------------------------------- " netrw#BrowseX: (implements "x") executes a special "viewer" script or program for the {{{2 " given filename; typically this means given their extension. " 0=local, 1=remote @@ -4453,7 +4400,6 @@ fun! netrw#BrowseX(fname,remote) let &aw= awkeep endfun -" --------------------------------------------------------------------- " s:NetrwBufRename: renames a buffer without the side effect of retaining an unlisted buffer having the old name {{{2 " Using the file command on a "[No Name]" buffer does not seem to cause the old "[No Name]" buffer " to become an unlisted buffer, so in that case don't bwipe it. @@ -4471,7 +4417,6 @@ fun! s:NetrwBufRename(newname) endfun -" --------------------------------------------------------------------- " netrw#CheckIfRemote: returns 1 if current file looks like an url, 0 else {{{2 fun! netrw#CheckIfRemote(...) if a:0 > 0 @@ -4490,7 +4435,6 @@ fun! netrw#CheckIfRemote(...) endif endfun -" --------------------------------------------------------------------- " s:NetrwChgPerm: (implements "gp") change file permission {{{2 fun! s:NetrwChgPerm(islocal,curdir) let ykeep = @@ @@ -4509,7 +4453,6 @@ fun! s:NetrwChgPerm(islocal,curdir) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwClearExplore: clear explore variables (if any) {{{2 fun! s:NetrwClearExplore() 2match none @@ -4525,7 +4468,6 @@ fun! s:NetrwClearExplore() " redraw! endfun -" --------------------------------------------------------------------- " s:NetrwEditBuf: decides whether or not to use keepalt to edit a buffer {{{2 fun! s:NetrwEditBuf(bufnum) if exists("g:netrw_altfile") && g:netrw_altfile && &ft == "netrw" @@ -4535,7 +4477,6 @@ fun! s:NetrwEditBuf(bufnum) endif endfun -" --------------------------------------------------------------------- " s:NetrwEditFile: decides whether or not to use keepalt to edit a file {{{2 " NetrwKeepj [keepalt] <OPT> <CMD> <FILENAME> fun! s:NetrwEditFile(cmd,opt,fname) @@ -4549,7 +4490,6 @@ fun! s:NetrwEditFile(cmd,opt,fname) endif endfun -" --------------------------------------------------------------------- " s:NetrwExploreListUniq: {{{2 fun! s:NetrwExploreListUniq(explist) " this assumes that the list is already sorted @@ -4563,7 +4503,6 @@ fun! s:NetrwExploreListUniq(explist) return newexplist endfun -" --------------------------------------------------------------------- " s:NetrwForceChgDir: (gd support) Force treatment as a directory {{{2 fun! s:NetrwForceChgDir(islocal,newdir) let ykeep= @@ @@ -4585,7 +4524,6 @@ fun! s:NetrwForceChgDir(islocal,newdir) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwForceFile: (gf support) Force treatment as a file {{{2 fun! s:NetrwForceFile(islocal,newfile) if a:newfile =~ '[/@*=|\\]$' @@ -4600,7 +4538,6 @@ fun! s:NetrwForceFile(islocal,newfile) endif endfun -" --------------------------------------------------------------------- " s:NetrwHide: this function is invoked by the "a" map for browsing {{{2 " and switches the hiding mode. The actual hiding is done by " s:NetrwListHide(). @@ -4649,7 +4586,6 @@ fun! s:NetrwHide(islocal) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwHideEdit: allows user to edit the file/directory hiding list {{{2 fun! s:NetrwHideEdit(islocal) let ykeep= @@ @@ -4670,7 +4606,6 @@ fun! s:NetrwHideEdit(islocal) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwHidden: invoked by "gh" {{{2 fun! s:NetrwHidden(islocal) let ykeep= @@ @@ -4695,7 +4630,6 @@ fun! s:NetrwHidden(islocal) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2 function! s:NetrwHome() if has('nvim') @@ -4737,7 +4671,6 @@ function! s:NetrwHome() return home endfunction -" --------------------------------------------------------------------- " s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{2 fun! s:NetrwLeftmouse(islocal) if exists("s:netrwdrag") @@ -4783,7 +4716,6 @@ fun! s:NetrwLeftmouse(islocal) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwCLeftmouse: used to select a file/directory for a target {{{2 fun! s:NetrwCLeftmouse(islocal) if &ft != "netrw" @@ -4792,7 +4724,6 @@ fun! s:NetrwCLeftmouse(islocal) call s:NetrwMarkFileTgt(a:islocal) endfun -" --------------------------------------------------------------------- " s:NetrwServerEdit: edit file in a server gvim, usually NETRWSERVER (implements <c-r>){{{2 " a:islocal=0 : <c-r> not used, remote " a:islocal=1 : <c-r> not used, local @@ -4895,7 +4826,6 @@ fun! s:NetrwServerEdit(islocal,fname) endfun -" --------------------------------------------------------------------- " s:NetrwSLeftmouse: marks the file under the cursor. May be dragged to select additional files {{{2 fun! s:NetrwSLeftmouse(islocal) if &ft != "netrw" @@ -4907,7 +4837,6 @@ fun! s:NetrwSLeftmouse(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwSLeftdrag: invoked via a shift-leftmouse and dragging {{{2 " Used to mark multiple files. fun! s:NetrwSLeftdrag(islocal) @@ -4926,7 +4855,6 @@ fun! s:NetrwSLeftdrag(islocal) let s:ngw= ngw endfun -" --------------------------------------------------------------------- " s:NetrwSLeftrelease: terminates shift-leftmouse dragging {{{2 fun! s:NetrwSLeftrelease(islocal) if exists("s:netrwdrag") @@ -4942,7 +4870,6 @@ fun! s:NetrwSLeftrelease(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwListHide: uses [range]g~...~d to delete files that match {{{2 " comma-separated patterns given in g:netrw_list_hide fun! s:NetrwListHide() @@ -4992,7 +4919,6 @@ fun! s:NetrwListHide() let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwMakeDir: this function makes a directory (both local and remote) {{{2 " implements the "d" mapping. fun! s:NetrwMakeDir(usrhost) @@ -5107,7 +5033,6 @@ fun! s:NetrwMakeDir(usrhost) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:TreeSqueezeDir: allows a shift-cr (gvim only) to squeeze the current tree-listing directory {{{2 fun! s:TreeSqueezeDir(islocal) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") @@ -5132,7 +5057,6 @@ fun! s:TreeSqueezeDir(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMaps: {{{2 fun! s:NetrwMaps(islocal) @@ -5385,7 +5309,6 @@ fun! s:NetrwMaps(islocal) endif " }}}3 endfun -" --------------------------------------------------------------------- " s:NetrwCommands: set up commands {{{2 " If -buffer, the command is only available from within netrw buffers " Otherwise, the command is available from any window, so long as netrw @@ -5404,7 +5327,6 @@ fun! s:NetrwCommands(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwMarkFiles: apply s:NetrwMarkFile() to named file(s) {{{2 " glob()ing only works with local files fun! s:NetrwMarkFiles(islocal,...) @@ -5423,7 +5345,6 @@ fun! s:NetrwMarkFiles(islocal,...) endwhile endfun -" --------------------------------------------------------------------- " s:NetrwMarkTarget: implements :MT (mark target) {{{2 fun! s:NetrwMarkTarget(...) if a:0 == 0 || (a:0 == 1 && a:1 == "") @@ -5441,7 +5362,6 @@ fun! s:NetrwMarkTarget(...) call winrestview(svpos) endfun -" --------------------------------------------------------------------- " s:NetrwMarkFile: (invoked by mf) This function is used to both {{{2 " mark and unmark files. If a markfile list exists, " then the rename and delete functions will use it instead @@ -5551,7 +5471,6 @@ fun! s:NetrwMarkFile(islocal,fname) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileArgList: ma: move the marked file list to the argument list (tomflist=0) {{{2 " mA: move the argument list to marked file list (tomflist=1) " Uses the global marked file list @@ -5585,7 +5504,6 @@ fun! s:NetrwMarkFileArgList(islocal,tomflist) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileCompress: (invoked by mz) This function is used to {{{2 " compress/decompress files using the programs " in g:netrw_compress and g:netrw_uncompress, @@ -5649,7 +5567,6 @@ fun! s:NetrwMarkFileCompress(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileCopy: (invoked by mc) copy marked files to target {{{2 " If no marked files, then set up directory as the " target. Currently does not support copying entire @@ -5837,7 +5754,6 @@ fun! s:NetrwMarkFileCopy(islocal,...) return 1 endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileDiff: (invoked by md) This function is used to {{{2 " invoke vim's diff mode on the marked files. " Either two or three files can be so handled. @@ -5872,7 +5788,6 @@ fun! s:NetrwMarkFileDiff(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileEdit: (invoked by me) put marked files on arg list and start editing them {{{2 " Uses global markfilelist fun! s:NetrwMarkFileEdit(islocal) @@ -5898,7 +5813,6 @@ fun! s:NetrwMarkFileEdit(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileQFEL: convert a quickfix-error or location list into a marked file list {{{2 fun! s:NetrwMarkFileQFEL(islocal,qfel) call s:NetrwUnmarkAll() @@ -5923,7 +5837,6 @@ fun! s:NetrwMarkFileQFEL(islocal,qfel) endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileExe: (invoked by mx and mX) execute arbitrary system command on marked files {{{2 " mx enbloc=0: Uses the local marked-file list, applies command to each file individually " mX enbloc=1: Uses the global marked-file list, applies command to entire list @@ -6023,7 +5936,6 @@ fun! s:NetrwMarkFileExe(islocal,enbloc) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkHideSfx: (invoked by mh) (un)hide files having same suffix " as the marked file(s) (toggles suffix presence) " Uses the local marked file list. @@ -6075,7 +5987,6 @@ fun! s:NetrwMarkHideSfx(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileVimCmd: (invoked by mv) execute arbitrary vim command on marked files, one at a time {{{2 " Uses the local marked-file list. fun! s:NetrwMarkFileVimCmd(islocal) @@ -6122,7 +6033,6 @@ fun! s:NetrwMarkFileVimCmd(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkHideSfx: (invoked by mh) (un)hide files having same suffix " as the marked file(s) (toggles suffix presence) " Uses the local marked file list. @@ -6174,7 +6084,6 @@ fun! s:NetrwMarkHideSfx(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileGrep: (invoked by mg) This function applies vimgrep to marked files {{{2 " Uses the global markfilelist fun! s:NetrwMarkFileGrep(islocal) @@ -6226,7 +6135,6 @@ fun! s:NetrwMarkFileGrep(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileMove: (invoked by mm) execute arbitrary command on marked files, one at a time {{{2 " uses the global marked file list " s:netrwmfloc= 0: target directory is remote @@ -6335,7 +6243,6 @@ fun! s:NetrwMarkFileMove(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwMarkFilePrint: (invoked by mp) This function prints marked files {{{2 " using the hardcopy command. Local marked-file list only. fun! s:NetrwMarkFilePrint(islocal) @@ -6369,7 +6276,6 @@ fun! s:NetrwMarkFilePrint(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileRegexp: (invoked by mr) This function is used to mark {{{2 " files when given a regexp (for which a prompt is " issued) (matches to name of files). @@ -6439,7 +6345,6 @@ fun! s:NetrwMarkFileRegexp(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileSource: (invoked by ms) This function sources marked files {{{2 " Uses the local marked file list. fun! s:NetrwMarkFileSource(islocal) @@ -6470,7 +6375,6 @@ fun! s:NetrwMarkFileSource(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileTag: (invoked by mT) This function applies g:netrw_ctags to marked files {{{2 " Uses the global markfilelist fun! s:NetrwMarkFileTag(islocal) @@ -6512,7 +6416,6 @@ fun! s:NetrwMarkFileTag(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMarkFileTgt: (invoked by mt) This function sets up a marked file target {{{2 " Sets up two variables, " s:netrwmftgt : holds the target directory @@ -6582,7 +6485,6 @@ fun! s:NetrwMarkFileTgt(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwGetCurdir: gets current directory and sets up b:netrw_curdir if necessary {{{2 fun! s:NetrwGetCurdir(islocal) @@ -6602,7 +6504,6 @@ fun! s:NetrwGetCurdir(islocal) return b:netrw_curdir endfun -" --------------------------------------------------------------------- " s:NetrwOpenFile: query user for a filename and open it {{{2 fun! s:NetrwOpenFile(islocal) let ykeep= @@ @@ -6647,7 +6548,6 @@ fun! s:NetrwOpenFile(islocal) let @@= ykeep endfun -" --------------------------------------------------------------------- " netrw#Shrink: shrinks/expands a netrw or Lexplorer window {{{2 " For the mapping to this function be made via " netrwPlugin, you'll need to have had @@ -6691,7 +6591,6 @@ fun! netrw#Shrink() endfun -" --------------------------------------------------------------------- " s:NetSortSequence: allows user to edit the sorting sequence {{{2 fun! s:NetSortSequence(islocal) let ykeep= @@ @@ -6707,7 +6606,6 @@ fun! s:NetSortSequence(islocal) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwUnmarkList: delete local marked file list and remove their contents from the global marked-file list {{{2 " User access provided by the <mF> mapping. (see :help netrw-mF) " Used by many MarkFile functions. @@ -6733,7 +6631,6 @@ fun! s:NetrwUnmarkList(curbufnr,curdir) 2match none endfun -" --------------------------------------------------------------------- " s:NetrwUnmarkAll: remove the global marked file list and all local ones {{{2 fun! s:NetrwUnmarkAll() if exists("s:netrwmarkfilelist") @@ -6743,7 +6640,6 @@ fun! s:NetrwUnmarkAll() 2match none endfun -" --------------------------------------------------------------------- " s:NetrwUnmarkAll2: unmark all files from all buffers {{{2 fun! s:NetrwUnmarkAll2() redir => netrwmarkfilelist_let @@ -6759,7 +6655,6 @@ fun! s:NetrwUnmarkAll2() endfor endfun -" --------------------------------------------------------------------- " s:NetrwUnMarkFile: called via mu map; unmarks *all* marked files, both global and buffer-local {{{2 " " Marked files are in two types of lists: @@ -6792,7 +6687,6 @@ fun! s:NetrwUnMarkFile(islocal) call winrestview(svpos) endfun -" --------------------------------------------------------------------- " s:NetrwMenu: generates the menu for gvim and netrw {{{2 fun! s:NetrwMenu(domenu) @@ -6893,7 +6787,6 @@ fun! s:NetrwMenu(domenu) endfun -" --------------------------------------------------------------------- " s:NetrwObtain: obtain file under cursor or from markfile list {{{2 " Used by the O maps (as <SID>NetrwObtain()) fun! s:NetrwObtain(islocal) @@ -6910,7 +6803,6 @@ fun! s:NetrwObtain(islocal) endfun -" --------------------------------------------------------------------- " s:NetrwPrevWinOpen: open file/directory in previous window. {{{2 " If there's only one window, then the window will first be split. " Returns: @@ -7026,7 +6918,6 @@ fun! s:NetrwPrevWinOpen(islocal) return choice endfun -" --------------------------------------------------------------------- " s:NetrwUpload: load fname to tgt (used by NetrwMarkFileCopy()) {{{2 " Always assumed to be local -> remote " call s:NetrwUpload(filename, target) @@ -7187,7 +7078,6 @@ fun! s:NetrwUpload(fname,tgt,...) endfun -" --------------------------------------------------------------------- " s:NetrwPreview: supports netrw's "p" map {{{2 fun! s:NetrwPreview(path) range let ykeep= @@ @@ -7235,7 +7125,6 @@ fun! s:NetrwPreview(path) range let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwRefresh: {{{2 fun! s:NetrwRefresh(islocal,dirname) " at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first. @@ -7278,7 +7167,6 @@ fun! s:NetrwRefresh(islocal,dirname) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwRefreshDir: refreshes a directory by name {{{2 " Called by NetrwMarkFileCopy() " Interfaces to s:NetrwRefresh() and s:LocalBrowseRefresh() @@ -7304,7 +7192,6 @@ fun! s:NetrwRefreshDir(islocal,dirname) endif endfun -" --------------------------------------------------------------------- " s:NetrwSetChgwin: set g:netrw_chgwin; a <cr> will use the specified " window number to do its editing in. " Supports [count]C where the count, if present, is used to specify @@ -7324,7 +7211,6 @@ fun! s:NetrwSetChgwin(...) echo "editing window now set to window#".g:netrw_chgwin endfun -" --------------------------------------------------------------------- " s:NetrwSetSort: sets up the sort based on the g:netrw_sort_sequence {{{2 " What this function does is to compute a priority for the patterns " in the g:netrw_sort_sequence. It applies a substitute to any @@ -7394,7 +7280,6 @@ fun! s:NetrwSetSort() endfun -" --------------------------------------------------------------------- " s:NetrwSetTgt: sets the target to the specified choice index {{{2 " Implements [count]Tb (bookhist<b>) " [count]Th (bookhist<h>) @@ -7429,7 +7314,6 @@ fun! s:NetrwSetTgt(islocal,bookhist,choice) endfun -" ===================================================================== " s:NetrwSortStyle: change sorting style (name - time - size - exten) and refresh display {{{2 fun! s:NetrwSortStyle(islocal) NetrwKeepj call s:NetrwSaveWordPosn() @@ -7441,7 +7325,6 @@ fun! s:NetrwSortStyle(islocal) NetrwKeepj call winrestview(svpos) endfun -" --------------------------------------------------------------------- " s:NetrwSplit: mode {{{2 " =0 : net and o " =1 : net and t @@ -7537,7 +7420,6 @@ fun! s:NetrwSplit(mode) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwTgtMenu: {{{2 fun! s:NetrwTgtMenu() if !exists("s:netrw_menucnt") @@ -7593,7 +7475,6 @@ fun! s:NetrwTgtMenu() endif endfun -" --------------------------------------------------------------------- " s:NetrwTreeDir: determine tree directory given current cursor position {{{2 " (full path directory with trailing slash returned) fun! s:NetrwTreeDir(islocal) @@ -7653,7 +7534,6 @@ fun! s:NetrwTreeDir(islocal) return treedir endfun -" --------------------------------------------------------------------- " s:NetrwTreeDisplay: recursive tree display {{{2 fun! s:NetrwTreeDisplay(dir,depth) " ensure that there are no folds @@ -7728,7 +7608,6 @@ fun! s:NetrwTreeDisplay(dir,depth) endfor endfun -" --------------------------------------------------------------------- " s:NetrwRefreshTreeDict: updates the contents information for a tree (w:netrw_treedict) {{{2 fun! s:NetrwRefreshTreeDict(dir) if !exists("w:netrw_treedict") @@ -7758,7 +7637,6 @@ fun! s:NetrwRefreshTreeDict(dir) endfor endfun -" --------------------------------------------------------------------- " s:NetrwTreeListing: displays tree listing from treetop on down, using NetrwTreeDisplay() {{{2 " Called by s:PerformListing() fun! s:NetrwTreeListing(dirname) @@ -7813,7 +7691,6 @@ fun! s:NetrwTreeListing(dirname) endif endfun -" --------------------------------------------------------------------- " s:NetrwTreePath: returns path to current file/directory in tree listing {{{2 " Normally, treetop is w:netrw_treetop, but a " user of the function ( netrw#SetTreetop() ) @@ -7855,7 +7732,6 @@ fun! s:NetrwTreePath(treetop) return treedir endfun -" --------------------------------------------------------------------- " s:NetrwWideListing: {{{2 fun! s:NetrwWideListing() @@ -7936,7 +7812,6 @@ fun! s:NetrwWideListing() endif endfun -" --------------------------------------------------------------------- " s:PerformListing: {{{2 fun! s:PerformListing(islocal) sil! NetrwKeepj %d _ @@ -8161,7 +8036,6 @@ fun! s:PerformListing(islocal) endfun -" --------------------------------------------------------------------- " s:SetupNetrwStatusLine: {{{2 fun! s:SetupNetrwStatusLine(statline) @@ -8201,11 +8075,8 @@ fun! s:SetupNetrwStatusLine(statline) endfun -" ========================================= " Remote Directory Browsing Support: {{{1 -" ========================================= -" --------------------------------------------------------------------- " s:NetrwRemoteFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2 " This function assumes that a long listing will be received. Size, time, " and reverse sorts will be requested of the server but not otherwise @@ -8333,7 +8204,6 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd) let &l:ff= ffkeep endfun -" --------------------------------------------------------------------- " s:NetrwRemoteListing: {{{2 fun! s:NetrwRemoteListing() @@ -8502,7 +8372,6 @@ fun! s:NetrwRemoteListing() return 0 endfun -" --------------------------------------------------------------------- " s:NetrwRemoteRm: remove/delete a remote file or directory {{{2 fun! s:NetrwRemoteRm(usrhost,path) range let svpos= winsaveview() @@ -8547,7 +8416,6 @@ fun! s:NetrwRemoteRm(usrhost,path) range NetrwKeepj call winrestview(svpos) endfun -" --------------------------------------------------------------------- " s:NetrwRemoteRmFile: {{{2 fun! s:NetrwRemoteRmFile(path,rmfile,all) @@ -8646,7 +8514,6 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all) return ok endfun -" --------------------------------------------------------------------- " s:NetrwRemoteRename: rename a remote file or directory {{{2 fun! s:NetrwRemoteRename(usrhost,path) range @@ -8714,11 +8581,8 @@ fun! s:NetrwRemoteRename(usrhost,path) range NetrwKeepj call winrestview(svpos) endfun -" ========================================== " Local Directory Browsing Support: {{{1 -" ========================================== -" --------------------------------------------------------------------- " netrw#FileUrlEdit: handles editing file://* files {{{2 " Should accept: file://localhost/etc/fstab " file:///etc/fstab @@ -8755,7 +8619,6 @@ fun! netrw#FileUrlEdit(fname) exe "sil doau BufReadPost ".fname2396e endfun -" --------------------------------------------------------------------- " netrw#LocalBrowseCheck: {{{2 fun! netrw#LocalBrowseCheck(dirname) " This function is called by netrwPlugin.vim's s:LocalBrowseCheck(), s:NetrwRexplore(), @@ -8804,7 +8667,6 @@ fun! netrw#LocalBrowseCheck(dirname) " not a directory, ignore it endfun -" --------------------------------------------------------------------- " s:LocalBrowseRefresh: this function is called after a user has {{{2 " performed any shell command. The idea is to cause all local-browsing " buffers to be refreshed after a user has executed some shell command, @@ -8866,7 +8728,6 @@ fun! s:LocalBrowseRefresh() let @@= ykeep endfun -" --------------------------------------------------------------------- " s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2 " " g:netrw_ Directory Is @@ -9026,7 +8887,6 @@ fun! s:NetrwLocalListingList(dirname,setmaxfilenamelen) return resultfilelist endfun -" --------------------------------------------------------------------- " s:LocalListing: does the job of "ls" for local directories {{{2 fun! s:LocalListing() @@ -9042,7 +8902,6 @@ fun! s:LocalListing() exe "setl ts=".(g:netrw_maxfilenamelen+1) endfun -" --------------------------------------------------------------------- " s:NetrwLocalExecute: uses system() to execute command under cursor ("X" command support) {{{2 fun! s:NetrwLocalExecute(cmd) let ykeep= @@ @@ -9065,7 +8924,6 @@ fun! s:NetrwLocalExecute(cmd) endfun -" --------------------------------------------------------------------- " s:NetrwLocalRename: rename a local file or directory {{{2 fun! s:NetrwLocalRename(path) range @@ -9154,7 +9012,6 @@ fun! s:NetrwLocalRename(path) range let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwLocalRm: {{{2 function! s:NetrwLocalRm(path) range if !exists("w:netrw_bannercnt") @@ -9222,7 +9079,6 @@ function! s:NetrwLocalRm(path) range let @@= ykeep endfunction -" --------------------------------------------------------------------- " s:NetrwLocalRmFile: remove file fname given the path {{{2 " Give confirmation prompt unless all==1 function! s:NetrwLocalRmFile(path, fname, all) @@ -9275,16 +9131,13 @@ function! s:NetrwLocalRmFile(path, fname, all) return ok endfunction -" ===================================================================== " Support Functions: {{{1 -" --------------------------------------------------------------------- " netrw#Call: allows user-specified mappings to call internal netrw functions {{{2 fun! netrw#Call(funcname,...) return call("s:".a:funcname,a:000) endfun -" --------------------------------------------------------------------- " netrw#LogLevel: returns the specified loglevel fun! netrw#LogLevel(level) if a:level == 'WARNING' @@ -9296,7 +9149,6 @@ fun! netrw#LogLevel(level) endif endfun -" --------------------------------------------------------------------- " netrw#Expose: allows UserMaps and pchk to look at otherwise script-local variables {{{2 " I expect this function to be used in " :PChkAssert netrw#Expose("netrwmarkfilelist") @@ -9323,20 +9175,17 @@ fun! netrw#Expose(varname) return retval endfun -" --------------------------------------------------------------------- " netrw#Modify: allows UserMaps to set (modify) script-local variables {{{2 fun! netrw#Modify(varname,newvalue) exe "let s:".a:varname."= ".string(a:newvalue) endfun -" --------------------------------------------------------------------- " netrw#RFC2396: converts %xx into characters {{{2 fun! netrw#RFC2396(fname) let fname = escape(substitute(a:fname,'%\(\x\x\)','\=printf("%c","0x".submatch(1))','ge')," \t") return fname endfun -" --------------------------------------------------------------------- " netrw#UserMaps: supports user-specified maps {{{2 " see :help function() " @@ -9369,7 +9218,6 @@ fun! netrw#UserMaps(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwBadd: adds marked files to buffer list or vice versa {{{2 " cb : bl2mf=0 add marked files to buffer list " cB : bl2mf=1 use bufferlist to mark files @@ -9395,7 +9243,6 @@ fun! s:NetrwBadd(islocal,bl2mf) endif endfun -" --------------------------------------------------------------------- " s:DeleteBookmark: deletes a file/directory from Netrw's bookmark system {{{2 " Related Functions: s:MakeBookmark() s:NetrwBookHistHandler() s:NetrwBookmark() fun! s:DeleteBookmark(fname) @@ -9420,7 +9267,6 @@ fun! s:DeleteBookmark(fname) endfun -" --------------------------------------------------------------------- " s:FileReadable: o/s independent filereadable {{{2 fun! s:FileReadable(fname) if g:netrw_cygwin @@ -9432,7 +9278,6 @@ fun! s:FileReadable(fname) return ret endfun -" --------------------------------------------------------------------- " s:GetTempfile: gets a tempname that'll work for various o/s's {{{2 " Places correct suffix on end of temporary filename, " using the suffix provided with fname @@ -9488,7 +9333,6 @@ fun! s:GetTempfile(fname) return tmpfile endfun -" --------------------------------------------------------------------- " s:MakeSshCmd: transforms input command using USEPORT HOSTNAME into {{{2 " a correct command for use with a system() call fun! s:MakeSshCmd(sshcmd) @@ -9507,7 +9351,6 @@ fun! s:MakeSshCmd(sshcmd) return sshcmd endfun -" --------------------------------------------------------------------- " s:MakeBookmark: enters a bookmark into Netrw's bookmark system {{{2 fun! s:MakeBookmark(fname) @@ -9529,7 +9372,6 @@ fun! s:MakeBookmark(fname) endfun -" --------------------------------------------------------------------- " s:MergeBookmarks: merge current bookmarks with saved bookmarks {{{2 fun! s:MergeBookmarks() " get bookmarks from .netrwbook file @@ -9540,7 +9382,6 @@ fun! s:MergeBookmarks() endif endfun -" --------------------------------------------------------------------- " s:NetrwBMShow: {{{2 fun! s:NetrwBMShow() redir => bmshowraw @@ -9558,7 +9399,6 @@ fun! s:NetrwBMShow() endif endfun -" --------------------------------------------------------------------- " s:NetrwCursor: responsible for setting cursorline/cursorcolumn based upon g:netrw_cursor {{{2 fun! s:NetrwCursor(editfile) if !exists("w:netrw_liststyle") @@ -9619,7 +9459,6 @@ fun! s:NetrwCursor(editfile) endfun -" --------------------------------------------------------------------- " s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2 fun! s:RestoreCursorline() if exists("s:netrw_usercul") @@ -9640,7 +9479,6 @@ fun! s:RestoreRegister(dict) endfor endfun -" --------------------------------------------------------------------- " s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2 fun! s:NetrwEnew(...) @@ -9719,7 +9557,6 @@ fun! s:NetrwEnew(...) endfun -" --------------------------------------------------------------------- " s:NetrwInsureWinVars: insure that a netrw buffer has its w: variables in spite of a wincmd v or s {{{2 fun! s:NetrwInsureWinVars() if !exists("w:netrw_liststyle") @@ -9744,7 +9581,6 @@ fun! s:NetrwInsureWinVars() endif endfun -" --------------------------------------------------------------------- " s:NetrwLcd: handles changing the (local) directory {{{2 " Returns: 0=success " -1=failed @@ -9784,14 +9620,12 @@ fun! s:NetrwLcd(newdir) return 0 endfun -" ------------------------------------------------------------------------ " s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2 " changed sorting, etc. Also see s:NetrwRestoreWordPosn(). fun! s:NetrwSaveWordPosn() let s:netrw_saveword= '^'.fnameescape(getline('.')).'$' endfun -" --------------------------------------------------------------------- " s:NetrwHumanReadable: takes a number and makes it "human readable" {{{2 " 1000 -> 1K, 1000000 -> 1M, 1000000000 -> 1G fun! s:NetrwHumanReadable(sz) @@ -9833,14 +9667,12 @@ fun! s:NetrwHumanReadable(sz) return sz endfun -" --------------------------------------------------------------------- " s:NetrwRestoreWordPosn: used to keep cursor on same word after refresh, {{{2 " changed sorting, etc. Also see s:NetrwSaveWordPosn(). fun! s:NetrwRestoreWordPosn() sil! call search(s:netrw_saveword,'w') endfun -" --------------------------------------------------------------------- " s:RestoreBufVars: {{{2 fun! s:RestoreBufVars() @@ -9853,7 +9685,6 @@ fun! s:RestoreBufVars() endfun -" --------------------------------------------------------------------- " s:RemotePathAnalysis: {{{2 fun! s:RemotePathAnalysis(dirname) @@ -9874,7 +9705,6 @@ fun! s:RemotePathAnalysis(dirname) endfun -" --------------------------------------------------------------------- " s:RemoteSystem: runs a command on a remote host using ssh {{{2 " Returns status " Runs system() on @@ -9899,7 +9729,6 @@ fun! s:RemoteSystem(cmd) return ret endfun -" --------------------------------------------------------------------- " s:RestoreWinVars: (used by Explore() and NetrwSplit()) {{{2 fun! s:RestoreWinVars() if exists("s:bannercnt") |let w:netrw_bannercnt = s:bannercnt |unlet s:bannercnt |endif @@ -9922,7 +9751,6 @@ fun! s:RestoreWinVars() if exists("s:winnr") |let w:netrw_winnr = s:winnr |unlet s:winnr |endif endfun -" --------------------------------------------------------------------- " s:Rexplore: implements returning from a buffer to a netrw directory {{{2 " " s:SetRexDir() sets up <2-leftmouse> maps (if g:netrw_retmap @@ -9978,7 +9806,6 @@ fun! s:NetrwRexplore(islocal,dirname) endfun -" --------------------------------------------------------------------- " s:SaveBufVars: save selected b: variables to s: variables {{{2 " use s:RestoreBufVars() to restore b: variables from s: variables fun! s:SaveBufVars() @@ -9992,7 +9819,6 @@ fun! s:SaveBufVars() endfun -" --------------------------------------------------------------------- " s:SavePosn: saves position associated with current buffer into a dictionary {{{2 fun! s:SavePosn(posndict) @@ -10004,7 +9830,6 @@ fun! s:SavePosn(posndict) return a:posndict endfun -" --------------------------------------------------------------------- " s:RestorePosn: restores position associated with current buffer using dictionary {{{2 fun! s:RestorePosn(posndict) if exists("a:posndict") @@ -10019,7 +9844,6 @@ fun! s:RestorePosn(posndict) endif endfun -" --------------------------------------------------------------------- " s:SaveWinVars: (used by Explore() and NetrwSplit()) {{{2 fun! s:SaveWinVars() if exists("w:netrw_bannercnt") |let s:bannercnt = w:netrw_bannercnt |endif @@ -10042,7 +9866,6 @@ fun! s:SaveWinVars() if exists("w:netrw_winnr") |let s:winnr = w:netrw_winnr |endif endfun -" --------------------------------------------------------------------- " s:SetBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck()) {{{2 " To allow separate windows to have their own activities, such as " Explore **/pattern, several variables have been made window-oriented. @@ -10062,7 +9885,6 @@ fun! s:SetBufWinVars() if exists("w:netrw_explore_list") |let b:netrw_explore_list = w:netrw_explore_list |endif endfun -" --------------------------------------------------------------------- " s:SetRexDir: set directory for :Rexplore {{{2 fun! s:SetRexDir(islocal,dirname) let w:netrw_rexdir = a:dirname @@ -10070,7 +9892,6 @@ fun! s:SetRexDir(islocal,dirname) let s:rexposn_{bufnr("%")} = winsaveview() endfun -" --------------------------------------------------------------------- " s:ShowLink: used to modify thin and tree listings to show links {{{2 fun! s:ShowLink() if exists("b:netrw_curdir") @@ -10094,7 +9915,6 @@ fun! s:ShowLink() endif endfun -" --------------------------------------------------------------------- " s:ShowStyle: {{{2 fun! s:ShowStyle() if !exists("w:netrw_liststyle") @@ -10115,7 +9935,6 @@ fun! s:ShowStyle() endif endfun -" --------------------------------------------------------------------- " s:TreeListMove: supports [[, ]], [], and ][ in tree mode {{{2 fun! s:TreeListMove(dir) let curline = getline('.') @@ -10144,7 +9963,6 @@ fun! s:TreeListMove(dir) endfun -" --------------------------------------------------------------------- " s:UpdateBuffersMenu: does emenu Buffers.Refresh (but due to locale, the menu item may not be called that) {{{2 " The Buffers.Refresh menu calls s:BMShow(); unfortunately, that means that that function " can't be called except via emenu. But due to locale, that menu line may not be called @@ -10160,7 +9978,6 @@ fun! s:UpdateBuffersMenu() endif endfun -" --------------------------------------------------------------------- " s:UseBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck() {{{2 " Matching function to s:SetBufWinVars() fun! s:UseBufWinVars() @@ -10176,7 +9993,6 @@ fun! s:UseBufWinVars() if exists("b:netrw_explore_list") && !exists("w:netrw_explore_list") |let w:netrw_explore_list = b:netrw_explore_list |endif endfun -" --------------------------------------------------------------------- " s:UserMaps: supports user-defined UserMaps {{{2 " * calls a user-supplied funcref(islocal,curdir) " * interprets result @@ -10212,7 +10028,7 @@ endfun " }}} " Settings Restoration: {{{1 -" ========================== + let &cpo= s:keepcpo unlet s:keepcpo