runtime(netrw): remove comment separators Commit: https://github.com/vim/vim/commit/600cd88cdfb1705d7aac9755839ba92282bc32ad Author: Luca Saccarola <github.e4...@aleeas.com> Date: Wed Jun 11 20:42:41 2025 +0200
runtime(netrw): remove comment separators closes: https://github.com/vim/vim/issues/17514 Signed-off-by: Luca Saccarola <github.e4...@aleeas.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim index 45034d234..5f33f8cf7 100644 --- 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 @@ -4486,7 +4431,6 @@ fun! netrw#CheckIfRemote(...) endif endfun -" --------------------------------------------------------------------- " s:NetrwChgPerm: (implements "gp") change file permission {{{2 fun! s:NetrwChgPerm(islocal,curdir) let ykeep = @@ @@ -4505,7 +4449,6 @@ fun! s:NetrwChgPerm(islocal,curdir) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwClearExplore: clear explore variables (if any) {{{2 fun! s:NetrwClearExplore() 2match none @@ -4521,7 +4464,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" @@ -4531,7 +4473,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) @@ -4545,7 +4486,6 @@ fun! s:NetrwEditFile(cmd,opt,fname) endif endfun -" --------------------------------------------------------------------- " s:NetrwExploreListUniq: {{{2 fun! s:NetrwExploreListUniq(explist) " this assumes that the list is already sorted @@ -4559,7 +4499,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= @@ @@ -4581,7 +4520,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 =~ '[/@*=|\]$' @@ -4596,7 +4534,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(). @@ -4645,7 +4582,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= @@ @@ -4666,7 +4602,6 @@ fun! s:NetrwHideEdit(islocal) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwHidden: invoked by "gh" {{{2 fun! s:NetrwHidden(islocal) let ykeep= @@ @@ -4691,7 +4626,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') @@ -4733,7 +4667,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") @@ -4779,7 +4712,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" @@ -4788,7 +4720,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 @@ -4891,7 +4822,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" @@ -4903,7 +4833,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) @@ -4922,7 +4851,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") @@ -4938,7 +4866,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() @@ -4988,7 +4915,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) @@ -5103,7 +5029,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") @@ -5128,7 +5053,6 @@ fun! s:TreeSqueezeDir(islocal) endif endfun -" --------------------------------------------------------------------- " s:NetrwMaps: {{{2 fun! s:NetrwMaps(islocal) @@ -5381,7 +5305,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 @@ -5400,7 +5323,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,...) @@ -5419,7 +5341,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 == "") @@ -5437,7 +5358,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 @@ -5547,7 +5467,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 @@ -5581,7 +5500,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, @@ -5645,7 +5563,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 @@ -5833,7 +5750,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. @@ -5868,7 +5784,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) @@ -5894,7 +5809,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() @@ -5919,7 +5833,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 @@ -6019,7 +5932,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. @@ -6071,7 +5983,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) @@ -6118,7 +6029,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. @@ -6170,7 +6080,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) @@ -6222,7 +6131,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 @@ -6331,7 +6239,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) @@ -6365,7 +6272,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). @@ -6435,7 +6341,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) @@ -6466,7 +6371,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) @@ -6508,7 +6412,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 @@ -6578,7 +6481,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) @@ -6598,7 +6500,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= @@ @@ -6643,7 +6544,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 @@ -6687,7 +6587,6 @@ fun! netrw#Shrink() endfun -" --------------------------------------------------------------------- " s:NetSortSequence: allows user to edit the sorting sequence {{{2 fun! s:NetSortSequence(islocal) let ykeep= @@ @@ -6703,7 +6602,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. @@ -6729,7 +6627,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") @@ -6739,7 +6636,6 @@ fun! s:NetrwUnmarkAll() 2match none endfun -" --------------------------------------------------------------------- " s:NetrwUnmarkAll2: unmark all files from all buffers {{{2 fun! s:NetrwUnmarkAll2() redir => netrwmarkfilelist_let @@ -6755,7 +6651,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: @@ -6788,7 +6683,6 @@ fun! s:NetrwUnMarkFile(islocal) call winrestview(svpos) endfun -" --------------------------------------------------------------------- " s:NetrwMenu: generates the menu for gvim and netrw {{{2 fun! s:NetrwMenu(domenu) @@ -6889,7 +6783,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) @@ -6906,7 +6799,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: @@ -7022,7 +6914,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) @@ -7183,7 +7074,6 @@ fun! s:NetrwUpload(fname,tgt,...) endfun -" --------------------------------------------------------------------- " s:NetrwPreview: supports netrw's "p" map {{{2 fun! s:NetrwPreview(path) range let ykeep= @@ @@ -7231,7 +7121,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. @@ -7274,7 +7163,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() @@ -7300,7 +7188,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 @@ -7320,7 +7207,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 @@ -7390,7 +7276,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>) @@ -7425,7 +7310,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() @@ -7437,7 +7321,6 @@ fun! s:NetrwSortStyle(islocal) NetrwKeepj call winrestview(svpos) endfun -" --------------------------------------------------------------------- " s:NetrwSplit: mode {{{2 " =0 : net and o " =1 : net and t @@ -7533,7 +7416,6 @@ fun! s:NetrwSplit(mode) let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwTgtMenu: {{{2 fun! s:NetrwTgtMenu() if !exists("s:netrw_menucnt") @@ -7589,7 +7471,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) @@ -7649,7 +7530,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 @@ -7724,7 +7604,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") @@ -7754,7 +7633,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) @@ -7809,7 +7687,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() ) @@ -7851,7 +7728,6 @@ fun! s:NetrwTreePath(treetop) return treedir endfun -" --------------------------------------------------------------------- " s:NetrwWideListing: {{{2 fun! s:NetrwWideListing() @@ -7932,7 +7808,6 @@ fun! s:NetrwWideListing() endif endfun -" --------------------------------------------------------------------- " s:PerformListing: {{{2 fun! s:PerformListing(islocal) sil! NetrwKeepj %d _ @@ -8157,7 +8032,6 @@ fun! s:PerformListing(islocal) endfun -" --------------------------------------------------------------------- " s:SetupNetrwStatusLine: {{{2 fun! s:SetupNetrwStatusLine(statline) @@ -8197,11 +8071,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 @@ -8329,7 +8200,6 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd) let &l:ff= ffkeep endfun -" --------------------------------------------------------------------- " s:NetrwRemoteListing: {{{2 fun! s:NetrwRemoteListing() @@ -8498,7 +8368,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() @@ -8543,7 +8412,6 @@ fun! s:NetrwRemoteRm(usrhost,path) range NetrwKeepj call winrestview(svpos) endfun -" --------------------------------------------------------------------- " s:NetrwRemoteRmFile: {{{2 fun! s:NetrwRemoteRmFile(path,rmfile,all) @@ -8642,7 +8510,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 @@ -8710,11 +8577,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 @@ -8751,7 +8615,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(), @@ -8800,7 +8663,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, @@ -8862,7 +8724,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 @@ -9022,7 +8883,6 @@ fun! s:NetrwLocalListingList(dirname,setmaxfilenamelen) return resultfilelist endfun -" --------------------------------------------------------------------- " s:LocalListing: does the job of "ls" for local directories {{{2 fun! s:LocalListing() @@ -9038,7 +8898,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= @@ @@ -9061,7 +8920,6 @@ fun! s:NetrwLocalExecute(cmd) endfun -" --------------------------------------------------------------------- " s:NetrwLocalRename: rename a local file or directory {{{2 fun! s:NetrwLocalRename(path) range @@ -9150,7 +9008,6 @@ fun! s:NetrwLocalRename(path) range let @@= ykeep endfun -" --------------------------------------------------------------------- " s:NetrwLocalRm: {{{2 function! s:NetrwLocalRm(path) range if !exists("w:netrw_bannercnt") @@ -9218,7 +9075,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) @@ -9271,16 +9127,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' @@ -9292,7 +9145,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") @@ -9319,20 +9171,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')," ") return fname endfun -" --------------------------------------------------------------------- " netrw#UserMaps: supports user-specified maps {{{2 " see :help function() " @@ -9365,7 +9214,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 @@ -9391,7 +9239,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) @@ -9416,7 +9263,6 @@ fun! s:DeleteBookmark(fname) endfun -" --------------------------------------------------------------------- " s:FileReadable: o/s independent filereadable {{{2 fun! s:FileReadable(fname) if g:netrw_cygwin @@ -9428,7 +9274,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 @@ -9484,7 +9329,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) @@ -9503,7 +9347,6 @@ fun! s:MakeSshCmd(sshcmd) return sshcmd endfun -" --------------------------------------------------------------------- " s:MakeBookmark: enters a bookmark into Netrw's bookmark system {{{2 fun! s:MakeBookmark(fname) @@ -9525,7 +9368,6 @@ fun! s:MakeBookmark(fname) endfun -" --------------------------------------------------------------------- " s:MergeBookmarks: merge current bookmarks with saved bookmarks {{{2 fun! s:MergeBookmarks() " get bookmarks from .netrwbook file @@ -9536,7 +9378,6 @@ fun! s:MergeBookmarks() endif endfun -" --------------------------------------------------------------------- " s:NetrwBMShow: {{{2 fun! s:NetrwBMShow() redir => bmshowraw @@ -9554,7 +9395,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") @@ -9615,7 +9455,6 @@ fun! s:NetrwCursor(editfile) endfun -" --------------------------------------------------------------------- " s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2 fun! s:RestoreCursorline() if exists("s:netrw_usercul") @@ -9636,7 +9475,6 @@ fun! s:RestoreRegister(dict) endfor endfun -" --------------------------------------------------------------------- " s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2 fun! s:NetrwEnew(...) @@ -9715,7 +9553,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") @@ -9740,7 +9577,6 @@ fun! s:NetrwInsureWinVars() endif endfun -" --------------------------------------------------------------------- " s:NetrwLcd: handles changing the (local) directory {{{2 " Returns: 0=success " -1=failed @@ -9780,14 +9616,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) @@ -9829,14 +9663,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() @@ -9849,7 +9681,6 @@ fun! s:RestoreBufVars() endfun -" --------------------------------------------------------------------- " s:RemotePathAnalysis: {{{2 fun! s:RemotePathAnalysis(dirname) @@ -9870,7 +9701,6 @@ fun! s:RemotePathAnalysis(dirname) endfun -" --------------------------------------------------------------------- " s:RemoteSystem: runs a command on a remote host using ssh {{{2 " Returns status " Runs system() on @@ -9895,7 +9725,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 @@ -9918,7 +9747,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 @@ -9974,7 +9802,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() @@ -9988,7 +9815,6 @@ fun! s:SaveBufVars() endfun -" --------------------------------------------------------------------- " s:SavePosn: saves position associated with current buffer into a dictionary {{{2 fun! s:SavePosn(posndict) @@ -10000,7 +9826,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") @@ -10015,7 +9840,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 @@ -10038,7 +9862,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. @@ -10058,7 +9881,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 @@ -10066,7 +9888,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") @@ -10090,7 +9911,6 @@ fun! s:ShowLink() endif endfun -" --------------------------------------------------------------------- " s:ShowStyle: {{{2 fun! s:ShowStyle() if !exists("w:netrw_liststyle") @@ -10111,7 +9931,6 @@ fun! s:ShowStyle() endif endfun -" --------------------------------------------------------------------- " s:TreeListMove: supports [[, ]], [], and ][ in tree mode {{{2 fun! s:TreeListMove(dir) let curline = getline('.') @@ -10140,7 +9959,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 @@ -10156,7 +9974,6 @@ fun! s:UpdateBuffersMenu() endif endfun -" --------------------------------------------------------------------- " s:UseBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck() {{{2 " Matching function to s:SetBufWinVars() fun! s:UseBufWinVars() @@ -10172,7 +9989,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 @@ -10208,7 +10024,7 @@ endfun " }}} " Settings Restoration: {{{1 -" ========================== + let &cpo= s:keepcpo unlet s:keepcpo -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1uPQRd-00Do4N-EU%40256bit.org.