aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2025-01-17 13:48:47 +0100
committerChristian Clason <ch.clason+github@icloud.com>2025-01-18 09:49:35 +0100
commite962167245755e900a7bd154075106026dbb4eff (patch)
tree7130aa87d24196a24c5dcc73b0fe200ac94a8df6
parent136cb642a0022fd005481e729dcc917552103322 (diff)
downloadrneovim-e962167245755e900a7bd154075106026dbb4eff.tar.gz
rneovim-e962167245755e900a7bd154075106026dbb4eff.tar.bz2
rneovim-e962167245755e900a7bd154075106026dbb4eff.zip
vim-patch:9cfdabb: runtime(netrw): change netrw maintainer
Dr. Chip retired some time ago and is no longer maintaining the netrw plugin. However as a runtime plugin distributed by Vim, it important to maintain the netrw plugin in the future and fix bugs as they are reported. So, split out the netrw plugin as an additional package, however include some stubs to make sure the plugin is still loaded by default and the documentation is accessible as well. closes: vim/vim#16368 https://github.com/vim/vim/commit/9cfdabb074feefc9848e9f7a4538f201e28c7f06 Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
-rw-r--r--runtime/autoload/netrwFileHandlers.vim0
-rw-r--r--runtime/pack/dist/opt/netrw/LICENSE.txt16
-rw-r--r--runtime/pack/dist/opt/netrw/README.md544
-rw-r--r--runtime/pack/dist/opt/netrw/autoload/netrw.vim (renamed from runtime/autoload/netrw.vim)60
-rw-r--r--runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim (renamed from runtime/autoload/netrwSettings.vim)15
-rw-r--r--runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim (renamed from runtime/autoload/netrw_gitignore.vim)4
-rw-r--r--runtime/pack/dist/opt/netrw/doc/netrw.txt (renamed from runtime/doc/pi_netrw.txt)621
-rw-r--r--runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim222
-rw-r--r--runtime/pack/dist/opt/netrw/syntax/netrw.vim (renamed from runtime/syntax/netrw.vim)13
-rw-r--r--runtime/plugin/netrwPlugin.vim235
10 files changed, 810 insertions, 920 deletions
diff --git a/runtime/autoload/netrwFileHandlers.vim b/runtime/autoload/netrwFileHandlers.vim
deleted file mode 100644
index e69de29bb2..0000000000
--- a/runtime/autoload/netrwFileHandlers.vim
+++ /dev/null
diff --git a/runtime/pack/dist/opt/netrw/LICENSE.txt b/runtime/pack/dist/opt/netrw/LICENSE.txt
new file mode 100644
index 0000000000..702c2386ac
--- /dev/null
+++ b/runtime/pack/dist/opt/netrw/LICENSE.txt
@@ -0,0 +1,16 @@
+Unless otherwise stated, all files in this directory are distributed under the
+Zero-Clause BSD license.
+
+Zero-Clause BSD
+===============
+
+Permission to use, copy, modify, and/or distribute this software for
+any purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
+FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/runtime/pack/dist/opt/netrw/README.md b/runtime/pack/dist/opt/netrw/README.md
new file mode 100644
index 0000000000..ecd97f1e9a
--- /dev/null
+++ b/runtime/pack/dist/opt/netrw/README.md
@@ -0,0 +1,544 @@
+# Netrw.vim
+
+netrw.vim plugin from vim (upstream repository)
+
+The upstream maintained netrw plugin. The original has been created and
+maintained by Charles E Campbell and maintained by the vim project until
+v9.1.0988.
+
+Every major version a snapshot from here will be sent to the main [Vim][1]
+upstream for distribution with Vim.
+
+# License
+
+To see License informations see the LICENSE.txt file included in this
+repository.
+
+# Credits
+
+Below are stated the contribution made in the past to netrw.
+
+Changes made to `autoload/netrw.vim`:
+- 2023 Nov 21 by Vim Project: ignore wildignore when expanding $COMSPEC (v173a)
+- 2023 Nov 22 by Vim Project: fix handling of very long filename on longlist style (v173a)
+- 2024 Feb 19 by Vim Project: (announce adoption)
+- 2024 Feb 29 by Vim Project: handle symlinks in tree mode correctly
+- 2024 Apr 03 by Vim Project: detect filetypes for remote edited files
+- 2024 May 08 by Vim Project: cleanup legacy Win9X checks
+- 2024 May 09 by Vim Project: remove hard-coded private.ppk
+- 2024 May 10 by Vim Project: recursively delete directories by default
+- 2024 May 13 by Vim Project: prefer scp over pscp
+- 2024 Jun 04 by Vim Project: set bufhidden if buffer changed, nohidden is set and buffer shall be switched (#14915)
+- 2024 Jun 13 by Vim Project: glob() on Windows fails when a directory name contains [] (#14952)
+- 2024 Jun 23 by Vim Project: save ad restore registers when liststyle = WIDELIST (#15077, #15114)
+- 2024 Jul 22 by Vim Project: avoid endless recursion (#15318)
+- 2024 Jul 23 by Vim Project: escape filename before trying to delete it (#15330)
+- 2024 Jul 30 by Vim Project: handle mark-copy to same target directory (#12112)
+- 2024 Aug 02 by Vim Project: honor g:netrw_alt{o,v} for :{S,H,V}explore (#15417)
+- 2024 Aug 15 by Vim Project: style changes, prevent E121 (#15501)
+- 2024 Aug 22 by Vim Project: fix mf-selection highlight (#15551)
+- 2024 Aug 22 by Vim Project: adjust echo output of mx command (#15550)
+- 2024 Sep 15 by Vim Project: more strict confirmation dialog (#15680)
+- 2024 Sep 19 by Vim Project: mf-selection highlight uses wrong pattern (#15700)
+- 2024 Sep 21 by Vim Project: remove extraneous closing bracket (#15718)
+- 2024 Oct 21 by Vim Project: remove netrwFileHandlers (#15895)
+- 2024 Oct 27 by Vim Project: clean up gx mapping (#15721)
+- 2024 Oct 30 by Vim Project: fix filetype detection for remote files (#15961)
+- 2024 Oct 30 by Vim Project: fix x mapping on cygwin (#13687)
+- 2024 Oct 31 by Vim Project: add netrw#Launch() and netrw#Open() (#15962)
+- 2024 Oct 31 by Vim Project: fix E874 when browsing remote dir (#15964)
+- 2024 Nov 07 by Vim Project: use keeppatterns to prevent polluting the search history
+- 2024 Nov 07 by Vim Project: fix a few issues with netrw tree listing (#15996)
+- 2024 Nov 10 by Vim Project: directory symlink not resolved in tree view (#16020)
+- 2024 Nov 14 by Vim Project: small fixes to netrw#BrowseX (#16056)
+- 2024 Nov 23 by Vim Project: update decompress defaults (#16104)
+- 2024 Nov 23 by Vim Project: fix powershell escaping issues (#16094)
+- 2024 Dec 04 by Vim Project: do not detach for gvim (#16168)
+- 2024 Dec 08 by Vim Project: check the first arg of netrw_browsex_viewer for being executable (#16185)
+- 2024 Dec 12 by Vim Project: do not pollute the search history (#16206)
+- 2024 Dec 19 by Vim Project: change style (#16248)
+- 2024 Dec 20 by Vim Project: change style continued (#16266), fix escaping of # in :Open command (#16265)
+
+General changes made to netrw:
+
+```
+ v172: Sep 02, 2021 * (Bram Moolenaar) Changed "l:go" to "go"
+ * (Bram Moolenaar) no need for "b" in
+ netrw-safe guioptions
+ Nov 15, 2021 * removed netrw_localrm and netrw_localrmdir
+ references
+ Aug 18, 2022 * (Miguel Barro) improving compatibility with
+ powershell
+ v171: Oct 09, 2020 * included code in s:NetrwOptionsSafe()
+ to allow |'bh'| to be set to delete when
+ rather than hide when g:netrw_fastbrowse
+ was zero.
+ * Installed |g:netrw_clipboard| setting
+ * Installed option bypass for |'guioptions'|
+ a/A settings
+ * Changed popup_beval() to |popup_atcursor()|
+ in netrw#ErrorMsg (lacygoill). Apparently
+ popup_beval doesn't reliably close the
+ popup when the mouse is moved.
+ * VimEnter() now using win_execute to examine
+ buffers for an attempt to open a directory.
+ Avoids issues with popups/terminal from
+ command line. (lacygoill)
+ Jun 28, 2021 * (zeertzjq) provided a patch for use of
+ xmap,xno instead of vmap,vno in
+ netrwPlugin.vim. Avoids entanglement with
+ select mode.
+ Jul 14, 2021 * Fixed problem addressed by tst976; opening
+ a file using tree mode, going up a
+ directory, and opening a file there was
+ opening the file in the wrong directory.
+ Jul 28, 2021 * (Ingo Karkat) provided a patch fixing an
+ E488 error with netrwPlugin.vim
+ (occurred for vim versions < 8.02)
+ v170: Mar 11, 2020 * (reported by Reiner Herrmann) netrw+tree
+ would not hide with the ^\..* pattern
+ correctly.
+ * (Marcin Szamotulski) NetrwOptionRestore
+ did not restore options correctly that
+ had a single quote in the option string.
+ Apr 13, 2020 * implemented error handling via popup
+ windows (see |popup_beval()|)
+ Apr 30, 2020 * (reported by Manatsu Takahashi) while
+ using Lexplore, a modified file could
+ be overwritten. Sol'n: will not overwrite,
+ but will emit an |E37| (although one cannot
+ add an ! to override)
+ Jun 07, 2020 * (reported by Jo Totland) repeatedly invoking
+ :Lexplore and quitting it left unused
+ hidden buffers. Netrw will now set netrw
+ buffers created by :Lexplore to |'bh'|=wipe.
+ v169: Dec 20, 2019 * (reported by amkarthik) that netrw's x
+ (|netrw-x|) would throw an error when
+ attempting to open a local directory.
+ v168: Dec 12, 2019 * scp timeout error message not reported,
+ hopefully now fixed (Shane Xb Qian)
+ v167: Nov 29, 2019 * netrw does a save&restore on @* and @+.
+ That causes problems with the clipboard.
+ Now restores occurs only if @* or @+ have
+ been changed.
+ * netrw will change @* or @+ less often.
+ Never if I happen to have caught all the
+ operations that modify the unnamed
+ register (which also writes @*).
+ * Modified hiding behavior so that "s"
+ will not ignore hiding.
+ v166: Nov 06, 2019 * Removed a space from a nmap for "-"
+ * Numerous debugging statement changes
+ v163: Dec 05, 2017 * (Cristi Balan) reported that a setting ('sel')
+ was left changed
+ * (Holger Mitschke) reported a problem with
+ saving and restoring history. Fixed.
+ * Hopefully I fixed a nasty bug that caused a
+ file rename to wipe out a buffer that it
+ should not have wiped out.
+ * (Holger Mitschke) amended this help file
+ with additional |g:netrw_special_syntax|
+ items
+ * Prioritized wget over curl for
+ g:netrw_http_cmd
+ v162: Sep 19, 2016 * (haya14busa) pointed out two syntax errors
+ with a patch; these are now fixed.
+ Oct 26, 2016 * I started using mate-terminal and found that
+ x and gx (|netrw-x| and |netrw-gx|) were no
+ longer working. Fixed (using atril when
+ $DESKTOP_SESSION is "mate").
+ Nov 04, 2016 * (Martin Vuille) pointed out that @+ was
+ being restored with keepregstar rather than
+ keepregplus.
+ Nov 09, 2016 * Broke apart the command from the options,
+ mostly for Windows. Introduced new netrw
+ settings: |g:netrw_localcopycmdopt|
+ |g:netrw_localcopydircmdopt|
+ |g:netrw_localmkdiropt|
+ |g:netrw_localmovecmdopt|
+ Nov 21, 2016 * (mattn) provided a patch for preview; swapped
+ winwidth() with winheight()
+ Nov 22, 2016 * (glacambre) reported that files containing
+ spaces weren't being obtained properly via
+ scp. Fix: apparently using single quotes
+ such as with 'file name' wasn't enough; the
+ spaces inside the quotes also had to be
+ escaped (ie. 'file\ name').
+ * Also fixed obtain (|netrw-O|) to be able to
+ obtain files with spaces in their names
+ Dec 20, 2016 * (xc1427) Reported that using "I" (|netrw-I|)
+ when atop "Hiding" in the banner also caused
+ the active-banner hiding control to occur
+ Jan 03, 2017 * (Enno Nagel) reported that attempting to
+ apply netrw to a directory that was without
+ read permission caused a syntax error.
+ Jan 13, 2017 * (Ingo Karkat) provided a patch which makes
+ using netrw#Call() better. Now returns
+ value of internal routines return, for example.
+ Jan 13, 2017 * (Ingo Karkat) changed netrw#FileUrlRead to
+ use |:edit| instead of |:read|. I also
+ changed the routine name to netrw#FileUrlEdit.
+ Jan 16, 2017 * (Sayem) reported a problem where :Lexplore
+ could generate a new listing buffer and
+ window instead of toggling the netrw display.
+ Unfortunately, the directions for eliciting
+ the problem weren't complete, so I may or
+ may not have fixed that issue.
+ Feb 06, 2017 * Implemented cb and cB. Changed "c" to "cd".
+ (see |netrw-cb|, |netrw-cB|, and |netrw-cd|)
+ Mar 21, 2017 * previously, netrw would specify (safe) settings
+ even when the setting was already safe for
+ netrw. Netrw now attempts to leave such
+ already-netrw-safe settings alone.
+ (affects s:NetrwOptionRestore() and
+ s:NetrwSafeOptions(); also introduced
+ s:NetrwRestoreSetting())
+ Jun 26, 2017 * (Christian Brabandt) provided a patch to
+ allow curl to follow redirects (ie. -L
+ option)
+ Jun 26, 2017 * (Callum Howard) reported a problem with
+ :Lexpore not removing the Lexplore window
+ after a change-directory
+ Aug 30, 2017 * (Ingo Karkat) one cannot switch to the
+ previously edited file (e.g. with CTRL-^)
+ after editing a file:// URL. Patch to
+ have a "keepalt" included.
+ Oct 17, 2017 * (Adam Faryna) reported that gn (|netrw-gn|)
+ did not work on directories in the current
+ tree
+ v157: Apr 20, 2016 * (Nicola) had set up a "nmap <expr> ..." with
+ a function that returned a 0 while silently
+ invoking a shell command. The shell command
+ activated a ShellCmdPost event which in turn
+ called s:LocalBrowseRefresh(). That looks
+ over all netrw buffers for changes needing
+ refreshes. However, inside a |:map-<expr>|,
+ tab and window changes are disallowed. Fixed.
+ (affects netrw's s:LocalBrowseRefresh())
+ * g:netrw_localrmdir not used any more, but
+ the relevant patch that causes |delete()| to
+ take over was #1107 (not #1109).
+ * |expand()| is now used on |g:netrw_home|;
+ consequently, g:netrw_home may now use
+ environment variables
+ * s:NetrwLeftmouse and s:NetrwCLeftmouse will
+ return without doing anything if invoked
+ when inside a non-netrw window
+ Jun 15, 2016 * gx now calls netrw#GX() which returns
+ the word under the cursor. The new
+ wrinkle: if one is in a netrw buffer,
+ then netrw's s:NetrwGetWord().
+ Jun 22, 2016 * Netrw was executing all its associated
+ Filetype commands silently; I'm going
+ to try doing that "noisily" and see if
+ folks have a problem with that.
+ Aug 12, 2016 * Changed order of tool selection for
+ handling http://... viewing.
+ (Nikolay Aleksandrovich Pavlov)
+ Aug 21, 2016 * Included hiding/showing/all for tree
+ listings
+ * Fixed refresh (^L) for tree listings
+ v156: Feb 18, 2016 * Changed =~ to =~# where appropriate
+ Feb 23, 2016 * s:ComposePath(base,subdir) now uses
+ fnameescape() on the base portion
+ Mar 01, 2016 * (gt_macki) reported where :Explore would
+ make file unlisted. Fixed (tst943)
+ Apr 04, 2016 * (reported by John Little) netrw normally
+ suppresses browser messages, but sometimes
+ those "messages" are what is wanted.
+ See |g:netrw_suppress_gx_mesg|
+ Apr 06, 2016 * (reported by Carlos Pita) deleting a remote
+ file was giving an error message. Fixed.
+ Apr 08, 2016 * (Charles Cooper) had a problem with an
+ undefined b:netrw_curdir. He also provided
+ a fix.
+ Apr 20, 2016 * Changed s:NetrwGetBuffer(); now uses
+ dictionaries. Also fixed the "No Name"
+ buffer problem.
+ v155: Oct 29, 2015 * (Timur Fayzrakhmanov) reported that netrw's
+ mapping of ctrl-l was not allowing refresh of
+ other windows when it was done in a netrw
+ window.
+ Nov 05, 2015 * Improved s:TreeSqueezeDir() to use search()
+ instead of a loop
+ * NetrwBrowse() will return line to
+ w:netrw_bannercnt if cursor ended up in
+ banner
+ Nov 16, 2015 * Added a <Plug>NetrwTreeSqueeze (|netrw-s-cr|)
+ Nov 17, 2015 * Commented out imaps -- perhaps someone can
+ tell me how they're useful and should be
+ retained?
+ Nov 20, 2015 * Added |netrw-ma| and |netrw-mA| support
+ Nov 20, 2015 * gx (|netrw-gx|) on a URL downloaded the
+ file in addition to simply bringing up the
+ URL in a browser. Fixed.
+ Nov 23, 2015 * Added |g:netrw_sizestyle| support
+ Nov 27, 2015 * Inserted a lot of <c-u>s into various netrw
+ maps.
+ Jan 05, 2016 * |netrw-qL| implemented to mark files based
+ upon |location-list|s; similar to |netrw-qF|.
+ Jan 19, 2016 * using - call delete(directoryname,"d") -
+ instead of using g:netrw_localrmdir if
+ v7.4 + patch#1107 is available
+ Jan 28, 2016 * changed to using |winsaveview()| and
+ |winrestview()|
+ Jan 28, 2016 * s:NetrwTreePath() now does a save and
+ restore of view
+ Feb 08, 2016 * Fixed a tree-listing problem with remote
+ directories
+ v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where
+ a file was not treated properly as a file
+ due to g:netrw_keepdir == 1
+ Mar 25, 2015 * (requested by Ben Friz) one may now sort by
+ extension
+ Mar 28, 2015 * (requested by Matt Brooks) netrw has a lot
+ of buffer-local mappings; however, some
+ plugins (such as vim-surround) set up
+ conflicting mappings that cause vim to wait.
+ The "<nowait>" modifier has been included
+ with most of netrw's mappings to avoid that
+ delay.
+ Jun 26, 2015 * |netrw-gn| mapping implemented
+ * :Ntree NotADir resulted in having
+ the tree listing expand in the error messages
+ window. Fixed.
+ Jun 29, 2015 * Attempting to delete a file remotely caused
+ an error with "keepsol" mentioned; fixed.
+ Jul 08, 2015 * Several changes to keep the |:jumps| table
+ correct when working with
+ |g:netrw_fastbrowse| set to 2
+ * wide listing with accented characters fixed
+ (using %-S instead of %-s with a |printf()|
+ Jul 13, 2015 * (Daniel Hahler) CheckIfKde() could be true
+ but kfmclient not installed. Changed order
+ in netrw#BrowseX(): checks if kde and
+ kfmclient, then will use xdg-open on a unix
+ system (if xdg-open is executable)
+ Aug 11, 2015 * (McDonnell) tree listing mode wouldn't
+ select a file in a open subdirectory.
+ * (McDonnell) when multiple subdirectories
+ were concurrently open in tree listing
+ mode, a ctrl-L wouldn't refresh properly.
+ * The netrw:target menu showed duplicate
+ entries
+ Oct 13, 2015 * (mattn) provided an exception to handle
+ windows with shellslash set but no shell
+ Oct 23, 2015 * if g:netrw_usetab and <c-tab> now used
+ to control whether NetrwShrink is used
+ (see |netrw-c-tab|)
+ v153: May 13, 2014 * added another |g:netrw_ffkeep| usage {{{2
+ May 14, 2014 * changed s:PerformListing() so that it
+ always sets ft=netrw for netrw buffers
+ (ie. even when syntax highlighting is
+ off, not available, etc)
+ May 16, 2014 * introduced the |netrw-ctrl-r| functionality
+ May 17, 2014 * introduced the |netrw-:NetrwMB| functionality
+ * mb and mB (|netrw-mb|, |netrw-mB|) will
+ add/remove marked files from bookmark list
+ May 20, 2014 * (Enno Nagel) reported that :Lex <dirname>
+ wasn't working. Fixed.
+ May 26, 2014 * restored test to prevent leftmouse window
+ resizing from causing refresh.
+ (see s:NetrwLeftmouse())
+ * fixed problem where a refresh caused cursor
+ to go just under the banner instead of
+ staying put
+ May 28, 2014 * (László Bimba) provided a patch for opening
+ the |:Lexplore| window 100% high, optionally
+ on the right, and will work with remote
+ files.
+ May 29, 2014 * implemented :NetrwC (see |netrw-:NetrwC|)
+ Jun 01, 2014 * Removed some "silent"s from commands used
+ to implemented scp://... and pscp://...
+ directory listing. Permits request for
+ password to appear.
+ Jun 05, 2014 * (Enno Nagel) reported that user maps "/"
+ caused problems with "b" and "w", which
+ are mapped (for wide listings only) to
+ skip over files rather than just words.
+ Jun 10, 2014 * |g:netrw_gx| introduced to allow users to
+ override default "<cfile>" with the gx
+ (|netrw-gx|) map
+ Jun 11, 2014 * gx (|netrw-gx|), with |'autowrite'| set,
+ will write modified files. s:NetrwBrowseX()
+ will now save, turn off, and restore the
+ |'autowrite'| setting.
+ Jun 13, 2014 * added visual map for gx use
+ Jun 15, 2014 * (Enno Nagel) reported that with having hls
+ set and wide listing style in use, that the
+ b and w maps caused unwanted highlighting.
+ Jul 05, 2014 * |netrw-mv| and |netrw-mX| commands included
+ Jul 09, 2014 * |g:netrw_keepj| included, allowing optional
+ keepj
+ Jul 09, 2014 * fixing bugs due to previous update
+ Jul 21, 2014 * (Bruno Sutic) provided an updated
+ netrw_gitignore.vim
+ Jul 30, 2014 * (Yavuz Yetim) reported that editing two
+ remote files of the same name caused the
+ second instance to have a "temporary"
+ name. Fixed: now they use the same buffer.
+ Sep 18, 2014 * (Yasuhiro Matsumoto) provided a patch which
+ allows scp and windows local paths to work.
+ Oct 07, 2014 * gx (see |netrw-gx|) when atop a directory,
+ will now do |gf| instead
+ Nov 06, 2014 * For cygwin: cygstart will be available for
+ netrw#BrowseX() to use if its executable.
+ Nov 07, 2014 * Began support for file://... urls. Will use
+ |g:netrw_file_cmd| (typically elinks or links)
+ Dec 02, 2014 * began work on having mc (|netrw-mc|) copy
+ directories. Works for linux machines,
+ cygwin+vim, but not for windows+gvim.
+ Dec 02, 2014 * in tree mode, netrw was not opening
+ directories via symbolic links.
+ Dec 02, 2014 * added resolved link information to
+ thin and tree modes
+ Dec 30, 2014 * (issue#231) |:ls| was not showing
+ remote-file buffers reliably. Fixed.
+ v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires {{{2
+ vim 7.4 with patch 213)
+ * (Enno Nagel) turn |'rnu'| off in netrw
+ buffers.
+ * (Quinn Strahl) suggested that netrw
+ allow regular window splitting to occur,
+ thereby allowing |'equalalways'| to take
+ effect.
+ * (qingtian zhao) normally, netrw will
+ save and restore the |'fileformat'|;
+ however, sometimes that isn't wanted
+ Apr 14, 2014 * whenever netrw marks a buffer as ro,
+ it will also mark it as nomod.
+ Apr 16, 2014 * sftp protocol now supported by
+ netrw#Obtain(); this means that one
+ may use "mc" to copy a remote file
+ to a local file using sftp, and that
+ the |netrw-O| command can obtain remote
+ files via sftp.
+ * added [count]C support (see |netrw-C|)
+ Apr 18, 2014 * when |g:netrw_chgwin| is one more than
+ the last window, then vertically split
+ the last window and use it as the
+ chgwin window.
+ May 09, 2014 * SavePosn was "saving filename under cursor"
+ from a non-netrw window when using :Rex.
+ v151: Jan 22, 2014 * extended :Rexplore to return to buffer {{{2
+ prior to Explore or editing a directory
+ * (Ken Takata) netrw gave error when
+ clipboard was disabled. Sol'n: Placed
+ several if has("clipboard") tests in.
+ * Fixed ftp://X@Y@Z// problem; X@Y now
+ part of user id, and only Z is part of
+ hostname.
+ * (A Loumiotis) reported that completion
+ using a directory name containing spaces
+ did not work. Fixed with a retry in
+ netrw#Explore() which removes the
+ backslashes vim inserted.
+ Feb 26, 2014 * :Rexplore now records the current file
+ using w:netrw_rexfile when returning via
+ |:Rexplore|
+ Mar 08, 2014 * (David Kotchan) provided some patches
+ allowing netrw to work properly with
+ windows shares.
+ * Multiple one-liner help messages available
+ by pressing <cr> while atop the "Quick
+ Help" line
+ * worked on ShellCmdPost, FocusGained event
+ handling.
+ * |:Lexplore| path: will be used to update
+ a left-side netrw browsing directory.
+ Mar 12, 2014 * |netrw-s-cr|: use <s-cr> to close
+ tree directory implemented
+ Mar 13, 2014 * (Tony Mechylynck) reported that using
+ the browser with ftp on a directory,
+ and selecting a gzipped txt file, that
+ an E19 occurred (which was issued by
+ gzip.vim). Fixed.
+ Mar 14, 2014 * Implemented :MF and :MT (see |netrw-:MF|
+ and |netrw-:MT|, respectively)
+ Mar 17, 2014 * |:Ntree| [dir] wasn't working properly; fixed
+ Mar 18, 2014 * Changed all uses of set to setl
+ Mar 18, 2014 * Commented the netrw_btkeep line in
+ s:NetrwOptionSave(); the effect is that
+ netrw buffers will remain as |'bt'|=nofile.
+ This should prevent swapfiles being created
+ for netrw buffers.
+ Mar 20, 2014 * Changed all uses of lcd to use s:NetrwLcd()
+ instead. Consistent error handling results
+ and it also handles Window's shares
+ * Fixed |netrw-d| command when applied with ftp
+ * https: support included for netrw#NetRead()
+ v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to {{{2
+ return to the netrw directory listing
+ Jul 13, 2013 * (Jonas Diemer) suggested changing
+ a <cWORD> to <cfile>.
+ Jul 21, 2013 * (Yuri Kanivetsky) reported that netrw's
+ use of mkdir did not produce directories
+ following the user's umask.
+ Aug 27, 2013 * introduced |g:netrw_altfile| option
+ Sep 05, 2013 * s:Strlen() now uses |strdisplaywidth()|
+ when available, by default
+ Sep 12, 2013 * (Selyano Baldo) reported that netrw wasn't
+ opening some directories properly from the
+ command line.
+ Nov 09, 2013 * |:Lexplore| introduced
+ * (Ondrej Platek) reported an issue with
+ netrw's trees (P15). Fixed.
+ * (Jorge Solis) reported that "t" in
+ tree mode caused netrw to forget its
+ line position.
+ Dec 05, 2013 * Added <s-leftmouse> file marking
+ (see |netrw-mf|)
+ Dec 05, 2013 * (Yasuhiro Matsumoto) Explore should use
+ strlen() instead s:Strlen() when handling
+ multibyte chars with strpart()
+ (ie. strpart() is byte oriented, not
+ display-width oriented).
+ Dec 09, 2013 * (Ken Takata) Provided a patch; File sizes
+ and a portion of timestamps were wrongly
+ highlighted with the directory color when
+ setting `:let g:netrw_liststyle=1` on Windows.
+ * (Paul Domaskis) noted that sometimes
+ cursorline was activating in non-netrw
+ windows. All but one setting of cursorline
+ was done via setl; there was one that was
+ overlooked. Fixed.
+ Dec 24, 2013 * (esquifit) asked that netrw allow the
+ /cygdrive prefix be a user-alterable
+ parameter.
+ Jan 02, 2014 * Fixed a problem with netrw-based ballon
+ evaluation (ie. netrw#NetrwBaloonHelp()
+ not having been loaded error messages)
+ Jan 03, 2014 * Fixed a problem with tree listings
+ * New command installed: |:Ntree|
+ Jan 06, 2014 * (Ivan Brennan) reported a problem with
+ |netrw-P|. Fixed.
+ Jan 06, 2014 * Fixed a problem with |netrw-P| when the
+ modified file was to be abandoned.
+ Jan 15, 2014 * (Matteo Cavalleri) reported that when the
+ banner is suppressed and tree listing is
+ used, a blank line was left at the top of
+ the display. Fixed.
+ Jan 20, 2014 * (Gideon Go) reported that, in tree listing
+ style, with a previous window open, that
+ the wrong directory was being used to open
+ a file. Fixed. (P21)
+ v149: Apr 18, 2013 * in wide listing format, now have maps for {{{2
+ w and b to move to next/previous file
+ Apr 26, 2013 * one may now copy files in the same
+ directory; netrw will issue requests for
+ what names the files should be copied under
+ Apr 29, 2013 * Trying Benzinger's problem again. Seems
+ that commenting out the BufEnter and
+ installing VimEnter (only) works. Weird
+ problem! (tree listing, vim -O Dir1 Dir2)
+ May 01, 2013 * :Explore ftp://... wasn't working. Fixed.
+ May 02, 2013 * introduced |g:netrw_bannerbackslash| as
+ requested by Paul Domaskis.
+ Jul 03, 2013 * Explore now avoids splitting when a buffer
+ will be hidden.
+ v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct {{{2
+ choice of listing style, hiding style, and
+ sorting style
+```
+
+[1]: https://github.com/vim/vim
diff --git a/runtime/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
index 8e991e88f1..d3f60bb8dc 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
@@ -1,51 +1,6 @@
-" netrw.vim: Handles file transfer and remote directory listing across
-" AUTOLOAD SECTION
-" Maintainer: This runtime file is looking for a new maintainer.
-" Date: May 03, 2023
-" Version: 173a
-" Last Change: {{{1
-" 2023 Nov 21 by Vim Project: ignore wildignore when expanding $COMSPEC (v173a)
-" 2023 Nov 22 by Vim Project: fix handling of very long filename on longlist style (v173a)
-" 2024 Feb 19 by Vim Project: (announce adoption)
-" 2024 Feb 29 by Vim Project: handle symlinks in tree mode correctly
-" 2024 Apr 03 by Vim Project: detect filetypes for remote edited files
-" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
-" 2024 May 09 by Vim Project: remove hard-coded private.ppk
-" 2024 May 10 by Vim Project: recursively delete directories by default
-" 2024 May 13 by Vim Project: prefer scp over pscp
-" 2024 Jun 04 by Vim Project: set bufhidden if buffer changed, nohidden is set and buffer shall be switched (#14915)
-" 2024 Jun 13 by Vim Project: glob() on Windows fails when a directory name contains [] (#14952)
-" 2024 Jun 23 by Vim Project: save ad restore registers when liststyle = WIDELIST (#15077, #15114)
-" 2024 Jul 22 by Vim Project: avoid endless recursion (#15318)
-" 2024 Jul 23 by Vim Project: escape filename before trying to delete it (#15330)
-" 2024 Jul 30 by Vim Project: handle mark-copy to same target directory (#12112)
-" 2024 Aug 02 by Vim Project: honor g:netrw_alt{o,v} for :{S,H,V}explore (#15417)
-" 2024 Aug 15 by Vim Project: style changes, prevent E121 (#15501)
-" 2024 Aug 22 by Vim Project: fix mf-selection highlight (#15551)
-" 2024 Aug 22 by Vim Project: adjust echo output of mx command (#15550)
-" 2024 Sep 15 by Vim Project: more strict confirmation dialog (#15680)
-" 2024 Sep 19 by Vim Project: mf-selection highlight uses wrong pattern (#15700)
-" 2024 Sep 21 by Vim Project: remove extraneous closing bracket (#15718)
-" 2024 Oct 21 by Vim Project: remove netrwFileHandlers (#15895)
-" 2024 Oct 27 by Vim Project: clean up gx mapping (#15721)
-" 2024 Oct 30 by Vim Project: fix filetype detection for remote files (#15961)
-" 2024 Oct 30 by Vim Project: fix x mapping on cygwin (#13687)
-" 2024 Oct 31 by Vim Project: add netrw#Launch() and netrw#Open() (#15962)
-" 2024 Oct 31 by Vim Project: fix E874 when browsing remote dir (#15964)
-" 2024 Nov 07 by Vim Project: use keeppatterns to prevent polluting the search history
-" 2024 Nov 07 by Vim Project: fix a few issues with netrw tree listing (#15996)
-" 2024 Nov 10 by Vim Project: directory symlink not resolved in tree view (#16020)
-" 2024 Nov 14 by Vim Project: small fixes to netrw#BrowseX (#16056)
-" 2024 Nov 23 by Vim Project: update decompress defaults (#16104)
-" 2024 Nov 23 by Vim Project: fix powershell escaping issues (#16094)
-" 2024 Dec 04 by Vim Project: do not detach for gvim (#16168)
-" 2024 Dec 08 by Vim Project: check the first arg of netrw_browsex_viewer for being executable (#16185)
-" 2024 Dec 12 by Vim Project: do not pollute the search history (#16206)
-" 2024 Dec 19 by Vim Project: change style (#16248)
-" 2024 Dec 20 by Vim Project: change style continued (#16266)
-" }}}
-" Former Maintainer: Charles E Campbell
-" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
+" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
+" Former Maintainer: Charles E Campbell
+" Upstream: <https://github.com/saccarosium/netrw.vim>
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -58,12 +13,7 @@
"
" Note: the code here was started in 1999 under a much earlier version of vim. The directory browsing
" code was written using vim v6, which did not have Lists (Lists were first offered with vim-v7).
-"
-"redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
-"
-" But be doers of the Word, and not only hearers, deluding your own selves {{{1
-" (James 1:22 RSV)
-" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
" Load Once: {{{1
if &cp || exists("g:loaded_netrw")
finish
@@ -85,7 +35,7 @@ if exists("s:needspatches")
endfor
endif
-let g:loaded_netrw = "v173"
+let g:loaded_netrw = "v174"
let s:keepcpo= &cpo
setl cpo&vim
diff --git a/runtime/autoload/netrwSettings.vim b/runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim
index 3452602272..fd43c16c4e 100644
--- a/runtime/autoload/netrwSettings.vim
+++ b/runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim
@@ -1,10 +1,6 @@
-" netrwSettings.vim: makes netrw settings simpler
-" Date: Nov 15, 2021
-" Maintainer: This runtime file is looking for a new maintainer.
+" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
" Former Maintainer: Charles E Campbell
-" Version: 18
-" Last Change:
-" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
+" Upstream: <https://github.com/saccarosium/netrw.vim>
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -14,15 +10,12 @@
" this plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software.
-"
-" Mat 4:23 (WEB) Jesus went about in all Galilee, teaching in their {{{1
-" synagogues, preaching the gospel of the kingdom, and healing
-" every disease and every sickness among the people.
+
" Load Once: {{{1
if exists("g:loaded_netrwSettings") || &cp
finish
endif
-let g:loaded_netrwSettings = "v18"
+let g:loaded_netrwSettings = "v174"
if v:version < 700
echohl WarningMsg
echo "***warning*** this version of netrwSettings needs vim 7.0"
diff --git a/runtime/autoload/netrw_gitignore.vim b/runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim
index 1b55e2488a..6c1d8582b8 100644
--- a/runtime/autoload/netrw_gitignore.vim
+++ b/runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim
@@ -1,3 +1,7 @@
+" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
+" Former Maintainer: Bruno Sutic
+" Upstream: <https://github.com/saccarosium/netrw.vim>
+
" netrw_gitignore#Hide: gitignore-based hiding
" Function returns a string of comma separated patterns convenient for
" assignment to `g:netrw_list_hide` option.
diff --git a/runtime/doc/pi_netrw.txt b/runtime/pack/dist/opt/netrw/doc/netrw.txt
index 01e6b5fa6a..9fc7b42bb7 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/pack/dist/opt/netrw/doc/netrw.txt
@@ -1,14 +1,12 @@
-*pi_netrw.txt* Nvim
+*netrw.txt* Nvim
------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell
------------------------------------------------
-Author: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
- (remove NOSPAM from Campbell's email first)
-
+Original Author: Charles E. Campbell
Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
The VIM LICENSE applies to the files in this package, including
- netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and
+ netrw.vim, netrw.txt, netrwSettings.vim, and
syntax/netrw.vim. Like anything else that's free, netrw.vim and its
associated files are provided *as is* and comes with no warranty of
any kind, either expressed or implied. No guarantees of
@@ -110,10 +108,7 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
Selecting Sorting Style.............................|netrw-s|
Setting Editing Window..............................|netrw-C|
10. Problems and Fixes....................................|netrw-problems|
-11. Debugging Netrw Itself................................|netrw-debug|
-12. History...............................................|netrw-history|
-13. Todo..................................................|netrw-todo|
-14. Credits...............................................|netrw-credits|
+11. Credits...............................................|netrw-credits|
==============================================================================
2. Starting With Netrw *netrw-start* {{{1
@@ -3400,7 +3395,6 @@ Example: Clear netrw's marked file list via a mapping on gu >
10. Problems and Fixes *netrw-problems* {{{1
(This section is likely to grow as I get feedback)
- (also see |netrw-debug|)
*netrw-p1*
P1. I use Windows, and my network browsing with ftp doesn't sort by {{{2
time or size! -or- The remote system is a Windows server; why
@@ -3763,613 +3757,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
directory, which may not be the same as the browsing directory
shown by netrw (see |g:netrw_keepdir|).
-
-==============================================================================
-11. Debugging Netrw Itself *netrw-debug* {{{1
-
-Step 1: check that the problem you've encountered hasn't already been resolved
-by obtaining a copy of the latest (often developmental) netrw at:
-
- http://www.drchip.org/astronaut/vim/index.html#NETRW
-
-The <netrw.vim> script is typically installed on systems as something like:
->
- /usr/local/share/vim/vim8x/plugin/netrwPlugin.vim
- /usr/local/share/vim/vim8x/autoload/netrw.vim
- (see output of :echo &rtp)
-<
-which is loaded automatically at startup (assuming :set nocp). If you
-installed a new netrw, then it will be located at >
-
- $HOME/.vim/plugin/netrwPlugin.vim
- $HOME/.vim/autoload/netrw.vim
-<
-Step 2: assuming that you've installed the latest version of netrw,
-check that your problem is really due to netrw. Create a file
-called netrw.vimrc with the following contents: >
-
- set nocp
- so $HOME/.vim/plugin/netrwPlugin.vim
-<
-Then run netrw as follows: >
-
- vim -u netrw.vimrc --noplugins -i NONE [some path here]
-<
-Perform whatever netrw commands you need to, and check that the problem is
-still present. This procedure sidesteps any issues due to personal .vimrc
-settings, .viminfo file, and other plugins. If the problem does not appear,
-then you need to determine which setting in your .vimrc is causing the
-conflict with netrw or which plugin(s) is/are involved.
-
-Step 3: If the problem still is present, then get a debugging trace from
-netrw:
-
- 1. Get the <Decho.vim> script, available as:
-
- http://www.drchip.org/astronaut/vim/index.html#DECHO
- or
- http://vim.sourceforge.net/scripts/script.php?script_id=120
-
- Decho.vim is provided as a "vimball". You
- should edit the Decho.vba.gz file and source it in: >
-
- vim Decho.vba.gz
- :so %
- :q
-<
- 2. To turn on debug tracing in netrw, then edit the <netrw.vim>
- file by typing: >
-
- vim netrw.vim
- :DechoOn
- :wq
-<
- To restore to normal non-debugging behavior, re-edit <netrw.vim>
- and type >
-
- vim netrw.vim
- :DechoOff
- :wq
-<
- This command, provided by <Decho.vim>, will comment out all
- Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
-
- 3. Then bring up vim and attempt to evoke the problem by doing a
- transfer or doing some browsing. A set of messages should appear
- concerning the steps that <netrw.vim> took in attempting to
- read/write your file over the network in a separate tab or
- server vim window.
-
- Change the netrw.vimrc file to include the Decho plugin: >
-
- set nocp
- so $HOME/.vim/plugin/Decho.vim
- so $HOME/.vim/plugin/netrwPlugin.vim
-<
- You should continue to run vim with >
-
- vim -u netrw.vimrc --noplugins -i NONE [some path here]
-<
- to avoid entanglements with options and other plugins.
-
- To save the file: under linux, the output will be in a separate
- remote server window; in it, just save the file with >
-
- :w! DBG
-
-< Under a vim that doesn't support clientserver, your debugging
- output will appear in another tab: >
-
- :tabnext
- :set bt=
- :w! DBG
-<
- Furthermore, it'd be helpful if you would type >
-
- :Dsep <command>
-
-< where <command> is the command you're about to type next,
- thereby making it easier to associate which part of the
- debugging trace is due to which command.
-
- Please send that information to <netrw.vim>'s maintainer along
- with the o/s you're using and the vim version that you're using
- (see |:version|) (remove the embedded NOSPAM first) >
-
- NcampObell@SdrPchip.AorgM-NOSPAM
-<
-==============================================================================
-12. History *netrw-history* {{{1
-
- v172: Sep 02, 2021 * (Bram Moolenaar) Changed "l:go" to "go"
- * (Bram Moolenaar) no need for "b" in
- netrw-safe guioptions
- Nov 15, 2021 * removed netrw_localrm and netrw_localrmdir
- references
- Aug 18, 2022 * (Miguel Barro) improving compatibility with
- powershell
- v171: Oct 09, 2020 * included code in s:NetrwOptionsSafe()
- to allow |'bh'| to be set to delete when
- rather than hide when g:netrw_fastbrowse
- was zero.
- * Installed |g:netrw_clipboard| setting
- * Installed option bypass for |'guioptions'|
- a/A settings
- * Changed popup_beval() to popup_atcursor()
- in netrw#ErrorMsg (lacygoill). Apparently
- popup_beval doesn't reliably close the
- popup when the mouse is moved.
- * VimEnter() now using win_execute to examine
- buffers for an attempt to open a directory.
- Avoids issues with popups/terminal from
- command line. (lacygoill)
- Jun 28, 2021 * (zeertzjq) provided a patch for use of
- xmap,xno instead of vmap,vno in
- netrwPlugin.vim. Avoids entanglement with
- select mode.
- Jul 14, 2021 * Fixed problem addressed by tst976; opening
- a file using tree mode, going up a
- directory, and opening a file there was
- opening the file in the wrong directory.
- Jul 28, 2021 * (Ingo Karkat) provided a patch fixing an
- E488 error with netrwPlugin.vim
- (occurred for vim versions < 8.02)
- v170: Mar 11, 2020 * (reported by Reiner Herrmann) netrw+tree
- would not hide with the ^\..* pattern
- correctly.
- * (Marcin Szamotulski) NetrwOptionRestore
- did not restore options correctly that
- had a single quote in the option string.
- Apr 13, 2020 * implemented error handling via popup
- windows (see popup_beval())
- Apr 30, 2020 * (reported by Manatsu Takahashi) while
- using Lexplore, a modified file could
- be overwritten. Sol'n: will not overwrite,
- but will emit an |E37| (although one cannot
- add an ! to override)
- Jun 07, 2020 * (reported by Jo Totland) repeatedly invoking
- :Lexplore and quitting it left unused
- hidden buffers. Netrw will now set netrw
- buffers created by :Lexplore to |'bh'|=wipe.
- v169: Dec 20, 2019 * (reported by amkarthik) that netrw's x
- (|netrw-x|) would throw an error when
- attempting to open a local directory.
- v168: Dec 12, 2019 * scp timeout error message not reported,
- hopefully now fixed (Shane Xb Qian)
- v167: Nov 29, 2019 * netrw does a save&restore on @* and @+.
- That causes problems with the clipboard.
- Now restores occurs only if @* or @+ have
- been changed.
- * netrw will change @* or @+ less often.
- Never if I happen to have caught all the
- operations that modify the unnamed
- register (which also writes @*).
- * Modified hiding behavior so that "s"
- will not ignore hiding.
- v166: Nov 06, 2019 * Removed a space from a nmap for "-"
- * Numerous debugging statement changes
- v163: Dec 05, 2017 * (Cristi Balan) reported that a setting ('sel')
- was left changed
- * (Holger Mitschke) reported a problem with
- saving and restoring history. Fixed.
- * Hopefully I fixed a nasty bug that caused a
- file rename to wipe out a buffer that it
- should not have wiped out.
- * (Holger Mitschke) amended this help file
- with additional |g:netrw_special_syntax|
- items
- * Prioritized wget over curl for
- g:netrw_http_cmd
- v162: Sep 19, 2016 * (haya14busa) pointed out two syntax errors
- with a patch; these are now fixed.
- Oct 26, 2016 * I started using mate-terminal and found that
- x and gx (|netrw-x| and |netrw-gx|) were no
- longer working. Fixed (using atril when
- $DESKTOP_SESSION is "mate").
- Nov 04, 2016 * (Martin Vuille) pointed out that @+ was
- being restored with keepregstar rather than
- keepregplus.
- Nov 09, 2016 * Broke apart the command from the options,
- mostly for Windows. Introduced new netrw
- settings: |g:netrw_localcopycmdopt|
- |g:netrw_localcopydircmdopt|
- |g:netrw_localmkdiropt|
- |g:netrw_localmovecmdopt|
- Nov 21, 2016 * (mattn) provided a patch for preview; swapped
- winwidth() with winheight()
- Nov 22, 2016 * (glacambre) reported that files containing
- spaces weren't being obtained properly via
- scp. Fix: apparently using single quotes
- such as with "file name" wasn't enough; the
- spaces inside the quotes also had to be
- escaped (ie. "file\ name").
- * Also fixed obtain (|netrw-O|) to be able to
- obtain files with spaces in their names
- Dec 20, 2016 * (xc1427) Reported that using "I" (|netrw-I|)
- when atop "Hiding" in the banner also caused
- the active-banner hiding control to occur
- Jan 03, 2017 * (Enno Nagel) reported that attempting to
- apply netrw to a directory that was without
- read permission caused a syntax error.
- Jan 13, 2017 * (Ingo Karkat) provided a patch which makes
- using netrw#Call() better. Now returns
- value of internal routines return, for example.
- Jan 13, 2017 * (Ingo Karkat) changed netrw#FileUrlRead to
- use |:edit| instead of |:read|. I also
- changed the routine name to netrw#FileUrlEdit.
- Jan 16, 2017 * (Sayem) reported a problem where :Lexplore
- could generate a new listing buffer and
- window instead of toggling the netrw display.
- Unfortunately, the directions for eliciting
- the problem weren't complete, so I may or
- may not have fixed that issue.
- Feb 06, 2017 * Implemented cb and cB. Changed "c" to "cd".
- (see |netrw-cb|, |netrw-cB|, and |netrw-cd|)
- Mar 21, 2017 * previously, netrw would specify (safe) settings
- even when the setting was already safe for
- netrw. Netrw now attempts to leave such
- already-netrw-safe settings alone.
- (affects s:NetrwOptionRestore() and
- s:NetrwSafeOptions(); also introduced
- s:NetrwRestoreSetting())
- Jun 26, 2017 * (Christian Brabandt) provided a patch to
- allow curl to follow redirects (ie. -L
- option)
- Jun 26, 2017 * (Callum Howard) reported a problem with
- :Lexpore not removing the Lexplore window
- after a change-directory
- Aug 30, 2017 * (Ingo Karkat) one cannot switch to the
- previously edited file (e.g. with CTRL-^)
- after editing a file:// URL. Patch to
- have a "keepalt" included.
- Oct 17, 2017 * (Adam Faryna) reported that gn (|netrw-gn|)
- did not work on directories in the current
- tree
- v157: Apr 20, 2016 * (Nicola) had set up a "nmap <expr> ..." with
- a function that returned a 0 while silently
- invoking a shell command. The shell command
- activated a ShellCmdPost event which in turn
- called s:LocalBrowseRefresh(). That looks
- over all netrw buffers for changes needing
- refreshes. However, inside a |:map-<expr>|,
- tab and window changes are disallowed. Fixed.
- (affects netrw's s:LocalBrowseRefresh())
- * g:netrw_localrmdir not used any more, but
- the relevant patch that causes |delete()| to
- take over was #1107 (not #1109).
- * |expand()| is now used on |g:netrw_home|;
- consequently, g:netrw_home may now use
- environment variables
- * s:NetrwLeftmouse and s:NetrwCLeftmouse will
- return without doing anything if invoked
- when inside a non-netrw window
- Jun 15, 2016 * gx now calls netrw#GX() which returns
- the word under the cursor. The new
- wrinkle: if one is in a netrw buffer,
- then netrw's s:NetrwGetWord().
- Jun 22, 2016 * Netrw was executing all its associated
- Filetype commands silently; I'm going
- to try doing that "noisily" and see if
- folks have a problem with that.
- Aug 12, 2016 * Changed order of tool selection for
- handling http://... viewing.
- (Nikolay Aleksandrovich Pavlov)
- Aug 21, 2016 * Included hiding/showing/all for tree
- listings
- * Fixed refresh (^L) for tree listings
- v156: Feb 18, 2016 * Changed =~ to =~# where appropriate
- Feb 23, 2016 * s:ComposePath(base,subdir) now uses
- fnameescape() on the base portion
- Mar 01, 2016 * (gt_macki) reported where :Explore would
- make file unlisted. Fixed (tst943)
- Apr 04, 2016 * (reported by John Little) netrw normally
- suppresses browser messages, but sometimes
- those "messages" are what is wanted.
- See |g:netrw_suppress_gx_mesg|
- Apr 06, 2016 * (reported by Carlos Pita) deleting a remote
- file was giving an error message. Fixed.
- Apr 08, 2016 * (Charles Cooper) had a problem with an
- undefined b:netrw_curdir. He also provided
- a fix.
- Apr 20, 2016 * Changed s:NetrwGetBuffer(); now uses
- dictionaries. Also fixed the "No Name"
- buffer problem.
- v155: Oct 29, 2015 * (Timur Fayzrakhmanov) reported that netrw's
- mapping of ctrl-l was not allowing refresh of
- other windows when it was done in a netrw
- window.
- Nov 05, 2015 * Improved s:TreeSqueezeDir() to use search()
- instead of a loop
- * NetrwBrowse() will return line to
- w:netrw_bannercnt if cursor ended up in
- banner
- Nov 16, 2015 * Added a <Plug>NetrwTreeSqueeze (|netrw-s-cr|)
- Nov 17, 2015 * Commented out imaps -- perhaps someone can
- tell me how they're useful and should be
- retained?
- Nov 20, 2015 * Added |netrw-ma| and |netrw-mA| support
- Nov 20, 2015 * gx (|netrw-gx|) on a URL downloaded the
- file in addition to simply bringing up the
- URL in a browser. Fixed.
- Nov 23, 2015 * Added |g:netrw_sizestyle| support
- Nov 27, 2015 * Inserted a lot of <c-u>s into various netrw
- maps.
- Jan 05, 2016 * |netrw-qL| implemented to mark files based
- upon |location-list|s; similar to |netrw-qF|.
- Jan 19, 2016 * using - call delete(directoryname,"d") -
- instead of using g:netrw_localrmdir if
- v7.4 + patch#1107 is available
- Jan 28, 2016 * changed to using |winsaveview()| and
- |winrestview()|
- Jan 28, 2016 * s:NetrwTreePath() now does a save and
- restore of view
- Feb 08, 2016 * Fixed a tree-listing problem with remote
- directories
- v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where
- a file was not treated properly as a file
- due to g:netrw_keepdir == 1
- Mar 25, 2015 * (requested by Ben Friz) one may now sort by
- extension
- Mar 28, 2015 * (requested by Matt Brooks) netrw has a lot
- of buffer-local mappings; however, some
- plugins (such as vim-surround) set up
- conflicting mappings that cause vim to wait.
- The "<nowait>" modifier has been included
- with most of netrw's mappings to avoid that
- delay.
- Jun 26, 2015 * |netrw-gn| mapping implemented
- * :Ntree NotADir resulted in having
- the tree listing expand in the error messages
- window. Fixed.
- Jun 29, 2015 * Attempting to delete a file remotely caused
- an error with "keepsol" mentioned; fixed.
- Jul 08, 2015 * Several changes to keep the |:jumps| table
- correct when working with
- |g:netrw_fastbrowse| set to 2
- * wide listing with accented characters fixed
- (using %-S instead of %-s with a |printf()|
- Jul 13, 2015 * (Daniel Hahler) CheckIfKde() could be true
- but kfmclient not installed. Changed order
- in netrw#BrowseX(): checks if kde and
- kfmclient, then will use xdg-open on a unix
- system (if xdg-open is executable)
- Aug 11, 2015 * (McDonnell) tree listing mode wouldn't
- select a file in a open subdirectory.
- * (McDonnell) when multiple subdirectories
- were concurrently open in tree listing
- mode, a ctrl-L wouldn't refresh properly.
- * The netrw:target menu showed duplicate
- entries
- Oct 13, 2015 * (mattn) provided an exception to handle
- windows with shellslash set but no shell
- Oct 23, 2015 * if g:netrw_usetab and <c-tab> now used
- to control whether NetrwShrink is used
- (see |netrw-c-tab|)
- v153: May 13, 2014 * added another |g:netrw_ffkeep| usage {{{2
- May 14, 2014 * changed s:PerformListing() so that it
- always sets ft=netrw for netrw buffers
- (ie. even when syntax highlighting is
- off, not available, etc)
- May 16, 2014 * introduced the |netrw-ctrl-r| functionality
- May 17, 2014 * introduced the |netrw-:NetrwMB| functionality
- * mb and mB (|netrw-mb|, |netrw-mB|) will
- add/remove marked files from bookmark list
- May 20, 2014 * (Enno Nagel) reported that :Lex <dirname>
- wasn't working. Fixed.
- May 26, 2014 * restored test to prevent leftmouse window
- resizing from causing refresh.
- (see s:NetrwLeftmouse())
- * fixed problem where a refresh caused cursor
- to go just under the banner instead of
- staying put
- May 28, 2014 * (László Bimba) provided a patch for opening
- the |:Lexplore| window 100% high, optionally
- on the right, and will work with remote
- files.
- May 29, 2014 * implemented :NetrwC (see |netrw-:NetrwC|)
- Jun 01, 2014 * Removed some "silent"s from commands used
- to implemented scp://... and pscp://...
- directory listing. Permits request for
- password to appear.
- Jun 05, 2014 * (Enno Nagel) reported that user maps "/"
- caused problems with "b" and "w", which
- are mapped (for wide listings only) to
- skip over files rather than just words.
- Jun 10, 2014 * |g:netrw_gx| introduced to allow users to
- override default "<cfile>" with the gx
- (|netrw-gx|) map
- Jun 11, 2014 * gx (|netrw-gx|), with |'autowrite'| set,
- will write modified files. s:NetrwBrowseX()
- will now save, turn off, and restore the
- |'autowrite'| setting.
- Jun 13, 2014 * added visual map for gx use
- Jun 15, 2014 * (Enno Nagel) reported that with having hls
- set and wide listing style in use, that the
- b and w maps caused unwanted highlighting.
- Jul 05, 2014 * |netrw-mv| and |netrw-mX| commands included
- Jul 09, 2014 * |g:netrw_keepj| included, allowing optional
- keepj
- Jul 09, 2014 * fixing bugs due to previous update
- Jul 21, 2014 * (Bruno Sutic) provided an updated
- netrw_gitignore.vim
- Jul 30, 2014 * (Yavuz Yetim) reported that editing two
- remote files of the same name caused the
- second instance to have a "temporary"
- name. Fixed: now they use the same buffer.
- Sep 18, 2014 * (Yasuhiro Matsumoto) provided a patch which
- allows scp and windows local paths to work.
- Oct 07, 2014 * gx (see |netrw-gx|) when atop a directory,
- will now do |gf| instead
- Nov 06, 2014 * For cygwin: cygstart will be available for
- netrw#BrowseX() to use if its executable.
- Nov 07, 2014 * Began support for file://... urls. Will use
- |g:netrw_file_cmd| (typically elinks or links)
- Dec 02, 2014 * began work on having mc (|netrw-mc|) copy
- directories. Works for linux machines,
- cygwin+vim, but not for windows+gvim.
- Dec 02, 2014 * in tree mode, netrw was not opening
- directories via symbolic links.
- Dec 02, 2014 * added resolved link information to
- thin and tree modes
- Dec 30, 2014 * (issue#231) |:ls| was not showing
- remote-file buffers reliably. Fixed.
- v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires {{{2
- vim 7.4 with patch 213)
- * (Enno Nagel) turn |'rnu'| off in netrw
- buffers.
- * (Quinn Strahl) suggested that netrw
- allow regular window splitting to occur,
- thereby allowing |'equalalways'| to take
- effect.
- * (qingtian zhao) normally, netrw will
- save and restore the |'fileformat'|;
- however, sometimes that isn't wanted
- Apr 14, 2014 * whenever netrw marks a buffer as ro,
- it will also mark it as nomod.
- Apr 16, 2014 * sftp protocol now supported by
- netrw#Obtain(); this means that one
- may use "mc" to copy a remote file
- to a local file using sftp, and that
- the |netrw-O| command can obtain remote
- files via sftp.
- * added [count]C support (see |netrw-C|)
- Apr 18, 2014 * when |g:netrw_chgwin| is one more than
- the last window, then vertically split
- the last window and use it as the
- chgwin window.
- May 09, 2014 * SavePosn was "saving filename under cursor"
- from a non-netrw window when using :Rex.
- v151: Jan 22, 2014 * extended :Rexplore to return to buffer {{{2
- prior to Explore or editing a directory
- * (Ken Takata) netrw gave error when
- clipboard was disabled. Sol'n: Placed
- several if has("clipboard") tests in.
- * Fixed ftp://X@Y@Z// problem; X@Y now
- part of user id, and only Z is part of
- hostname.
- * (A Loumiotis) reported that completion
- using a directory name containing spaces
- did not work. Fixed with a retry in
- netrw#Explore() which removes the
- backslashes vim inserted.
- Feb 26, 2014 * :Rexplore now records the current file
- using w:netrw_rexfile when returning via
- |:Rexplore|
- Mar 08, 2014 * (David Kotchan) provided some patches
- allowing netrw to work properly with
- windows shares.
- * Multiple one-liner help messages available
- by pressing <cr> while atop the "Quick
- Help" line
- * worked on ShellCmdPost, FocusGained event
- handling.
- * |:Lexplore| path: will be used to update
- a left-side netrw browsing directory.
- Mar 12, 2014 * |netrw-s-cr|: use <s-cr> to close
- tree directory implemented
- Mar 13, 2014 * (Tony Mechylynck) reported that using
- the browser with ftp on a directory,
- and selecting a gzipped txt file, that
- an E19 occurred (which was issued by
- gzip.vim). Fixed.
- Mar 14, 2014 * Implemented :MF and :MT (see |netrw-:MF|
- and |netrw-:MT|, respectively)
- Mar 17, 2014 * |:Ntree| [dir] wasn't working properly; fixed
- Mar 18, 2014 * Changed all uses of set to setl
- Mar 18, 2014 * Commented the netrw_btkeep line in
- s:NetrwOptionSave(); the effect is that
- netrw buffers will remain as |'bt'|=nofile.
- This should prevent swapfiles being created
- for netrw buffers.
- Mar 20, 2014 * Changed all uses of lcd to use s:NetrwLcd()
- instead. Consistent error handling results
- and it also handles Window's shares
- * Fixed |netrw-d| command when applied with ftp
- * https: support included for netrw#NetRead()
- v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to {{{2
- return to the netrw directory listing
- Jul 13, 2013 * (Jonas Diemer) suggested changing
- a <cWORD> to <cfile>.
- Jul 21, 2013 * (Yuri Kanivetsky) reported that netrw's
- use of mkdir did not produce directories
- following the user's umask.
- Aug 27, 2013 * introduced |g:netrw_altfile| option
- Sep 05, 2013 * s:Strlen() now uses |strdisplaywidth()|
- when available, by default
- Sep 12, 2013 * (Selyano Baldo) reported that netrw wasn't
- opening some directories properly from the
- command line.
- Nov 09, 2013 * |:Lexplore| introduced
- * (Ondrej Platek) reported an issue with
- netrw's trees (P15). Fixed.
- * (Jorge Solis) reported that "t" in
- tree mode caused netrw to forget its
- line position.
- Dec 05, 2013 * Added <s-leftmouse> file marking
- (see |netrw-mf|)
- Dec 05, 2013 * (Yasuhiro Matsumoto) Explore should use
- strlen() instead s:Strlen() when handling
- multibyte chars with strpart()
- (ie. strpart() is byte oriented, not
- display-width oriented).
- Dec 09, 2013 * (Ken Takata) Provided a patch; File sizes
- and a portion of timestamps were wrongly
- highlighted with the directory color when
- setting `:let g:netrw_liststyle=1` on Windows.
- * (Paul Domaskis) noted that sometimes
- cursorline was activating in non-netrw
- windows. All but one setting of cursorline
- was done via setl; there was one that was
- overlooked. Fixed.
- Dec 24, 2013 * (esquifit) asked that netrw allow the
- /cygdrive prefix be a user-alterable
- parameter.
- Jan 02, 2014 * Fixed a problem with netrw-based balloon
- evaluation (ie. netrw#NetrwBalloonHelp()
- not having been loaded error messages)
- Jan 03, 2014 * Fixed a problem with tree listings
- * New command installed: |:Ntree|
- Jan 06, 2014 * (Ivan Brennan) reported a problem with
- |netrw-P|. Fixed.
- Jan 06, 2014 * Fixed a problem with |netrw-P| when the
- modified file was to be abandoned.
- Jan 15, 2014 * (Matteo Cavalleri) reported that when the
- banner is suppressed and tree listing is
- used, a blank line was left at the top of
- the display. Fixed.
- Jan 20, 2014 * (Gideon Go) reported that, in tree listing
- style, with a previous window open, that
- the wrong directory was being used to open
- a file. Fixed. (P21)
- v149: Apr 18, 2013 * in wide listing format, now have maps for {{{2
- w and b to move to next/previous file
- Apr 26, 2013 * one may now copy files in the same
- directory; netrw will issue requests for
- what names the files should be copied under
- Apr 29, 2013 * Trying Benzinger's problem again. Seems
- that commenting out the BufEnter and
- installing VimEnter (only) works. Weird
- problem! (tree listing, vim -O Dir1 Dir2)
- May 01, 2013 * :Explore ftp://... wasn't working. Fixed.
- May 02, 2013 * introduced |g:netrw_bannerbackslash| as
- requested by Paul Domaskis.
- Jul 03, 2013 * Explore now avoids splitting when a buffer
- will be hidden.
- v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct {{{2
- choice of listing style, hiding style, and
- sorting style
-
-==============================================================================
-13. Todo *netrw-todo* {{{1
-
-07/29/09 : banner :|g:netrw_banner| can be used to suppress the
- suppression banner. This feature is new and experimental,
- so its in the process of being debugged.
-09/04/09 : "gp" : See if it can be made to work for remote systems.
- : See if it can be made to work with marked files.
-
==============================================================================
-14. Credits *netrw-credits* {{{1
+11. Credits *netrw-credits* {{{1
Vim editor by Bram Moolenaar (Thanks, Bram!)
dav support by C Campbell
diff --git a/runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim b/runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim
new file mode 100644
index 0000000000..ddf4234aa2
--- /dev/null
+++ b/runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim
@@ -0,0 +1,222 @@
+" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
+" Former Maintainer: Charles E Campbell
+" Upstream: <https://github.com/saccarosium/netrw.vim>
+" Copyright: Copyright (C) 1999-2021 Charles E. Campbell {{{1
+" Permission is hereby granted to use and distribute this code,
+" with or without modifications, provided that this copyright
+" notice is copied with it. Like anything else that's free,
+" netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided
+" *as is* and comes with no warranty of any kind, either
+" expressed or implied. By using this plugin, you agree that
+" in no event will the copyright holder be liable for any damages
+" resulting from the use of this software.
+
+" Load Once: {{{1
+if &cp || exists("g:loaded_netrwPlugin")
+ finish
+endif
+let g:loaded_netrwPlugin = "v174"
+let s:keepcpo = &cpo
+set cpo&vim
+"DechoRemOn
+
+" ---------------------------------------------------------------------
+" Public Interface: {{{1
+
+" Commands Launch/URL {{{2
+command -complete=shellcmd -nargs=1 Launch call netrw#Launch(trim(<q-args>))
+command -complete=file -nargs=1 Open call netrw#Open(trim(<q-args>))
+" " }}}
+" Local Browsing Autocmds: {{{2
+augroup FileExplorer
+ au!
+ au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif
+ au BufEnter * sil call s:LocalBrowse(expand("<amatch>"))
+ au VimEnter * sil call s:VimEnter(expand("<amatch>"))
+ if has("win32")
+ au BufEnter .* sil call s:LocalBrowse(expand("<amatch>"))
+ endif
+augroup END
+
+" Network Browsing Reading Writing: {{{2
+augroup Network
+ au!
+ au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>"))
+ au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
+ au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
+ au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
+ au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
+ try
+ au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
+ catch /^Vim\%((\a\+)\)\=:E216/
+ au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
+ endtry
+augroup END
+
+" Commands: :Nread, :Nwrite, :NetUserPass {{{2
+com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos)
+com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
+com! -nargs=* NetUserPass call NetUserPass(<f-args>)
+com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
+com! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
+
+" Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
+com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
+com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>)
+com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>)
+com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(<count>,1,4+<bang>0,<q-args>)
+com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(<count>,0,6 ,<q-args>)
+com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
+com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
+com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(<count>,<bang>0,<q-args>)
+
+" Commands: NetrwSettings {{{2
+com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
+com! -bang NetrwClean call netrw#Clean(<bang>0)
+
+" Maps:
+if !exists("g:netrw_nogx")
+ if maparg('gx','n') == ""
+ if !hasmapto('<Plug>NetrwBrowseX')
+ nmap <unique> gx <Plug>NetrwBrowseX
+ endif
+ nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr>
+ endif
+ if maparg('gx','x') == ""
+ if !hasmapto('<Plug>NetrwBrowseXVis')
+ xmap <unique> gx <Plug>NetrwBrowseXVis
+ endif
+ xno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr>
+ endif
+endif
+if exists("g:netrw_usetab") && g:netrw_usetab
+ if maparg('<c-tab>','n') == ""
+ nmap <unique> <c-tab> <Plug>NetrwShrink
+ endif
+ nno <silent> <Plug>NetrwShrink :call netrw#Shrink()<cr>
+endif
+
+" ---------------------------------------------------------------------
+" LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2
+fun! s:LocalBrowse(dirname)
+ " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here.
+ " Otherwise, the BufEnter event gets triggered when attempts to write to
+ " the DBG buffer are made.
+
+ if !exists("s:vimentered")
+ " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will,
+ " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined.
+ " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)")
+ " call Dret("s:LocalBrowse")
+ return
+ endif
+
+ " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")")
+
+ if has("amiga")
+ " The check against '' is made for the Amiga, where the empty
+ " string is the current directory and not checking would break
+ " things such as the help command.
+ " call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)")
+ if a:dirname != '' && isdirectory(a:dirname)
+ sil! call netrw#LocalBrowseCheck(a:dirname)
+ if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
+ exe w:netrw_bannercnt
+ endif
+ endif
+
+ elseif isdirectory(a:dirname)
+ " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
+ " call Dredir("LocalBrowse ft last set: ","verbose set ft")
+ " Jul 13, 2021: for whatever reason, preceding the following call with
+ " a sil! causes an unbalanced if-endif vim error
+ call netrw#LocalBrowseCheck(a:dirname)
+ if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
+ exe w:netrw_bannercnt
+ endif
+
+ else
+ " not a directory, ignore it
+ " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
+ endif
+
+ " call Dret("s:LocalBrowse")
+endfun
+
+" ---------------------------------------------------------------------
+" s:VimEnter: after all vim startup stuff is done, this function is called. {{{2
+" Its purpose: to look over all windows and run s:LocalBrowse() on
+" them, which checks if they're directories and will create a directory
+" listing when appropriate.
+" It also sets s:vimentered, letting s:LocalBrowse() know that s:VimEnter()
+" has already been called.
+fun! s:VimEnter(dirname)
+ " call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">")
+ if has('nvim') || v:version < 802
+ " Johann Höchtl: reported that the call range... line causes an E488: Trailing characters
+ " error with neovim. I suspect its because neovim hasn't updated with recent
+ " vim patches. As is, this code will have problems with popup terminals
+ " instantiated before the VimEnter event runs.
+ " Ingo Karkat : E488 also in Vim 8.1.1602
+ let curwin = winnr()
+ let s:vimentered = 1
+ windo call s:LocalBrowse(expand("%:p"))
+ exe curwin."wincmd w"
+ else
+ " the following complicated expression comes courtesy of lacygoill; largely does the same thing as the windo and
+ " wincmd which are commented out, but avoids some side effects. Allows popup terminal before VimEnter.
+ let s:vimentered = 1
+ call range(1, winnr('$'))->map({_, v -> win_execute(win_getid(v), 'call expand("%:p")->s:LocalBrowse()')})
+ endif
+ " call Dret("s:VimEnter")
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwStatusLine: {{{1
+fun! NetrwStatusLine()
+ " let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".")
+ if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
+ let &stl= s:netrw_explore_stl
+ if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
+ if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif
+ return ""
+ else
+ return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
+ endif
+endfun
+
+" ------------------------------------------------------------------------
+" NetUserPass: set username and password for subsequent ftp transfer {{{1
+" Usage: :call NetUserPass() -- will prompt for userid and password
+" :call NetUserPass("uid") -- will prompt for password
+" :call NetUserPass("uid","password") -- sets global userid and password
+fun! NetUserPass(...)
+
+ " get/set userid
+ if a:0 == 0
+ " call Dfunc("NetUserPass(a:0<".a:0.">)")
+ if !exists("g:netrw_uid") || g:netrw_uid == ""
+ " via prompt
+ let g:netrw_uid= input('Enter username: ')
+ endif
+ else " from command line
+ " call Dfunc("NetUserPass(a:1<".a:1.">) {")
+ let g:netrw_uid= a:1
+ endif
+
+ " get password
+ if a:0 <= 1 " via prompt
+ " call Decho("a:0=".a:0." case <=1:")
+ let g:netrw_passwd= inputsecret("Enter Password: ")
+ else " from command line
+ " call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
+ let g:netrw_passwd=a:2
+ endif
+ " call Dret("NetUserPass")
+endfun
+
+" ------------------------------------------------------------------------
+" Modelines And Restoration: {{{1
+let &cpo= s:keepcpo
+unlet s:keepcpo
+" vim:ts=8 sts=2 sw=2 et fdm=marker
diff --git a/runtime/syntax/netrw.vim b/runtime/pack/dist/opt/netrw/syntax/netrw.vim
index f5b7fdc2c6..f9b2faba5d 100644
--- a/runtime/syntax/netrw.vim
+++ b/runtime/pack/dist/opt/netrw/syntax/netrw.vim
@@ -1,15 +1,12 @@
-" Language : Netrw Listing Syntax
-" Maintainer: This runtime file is looking for a new maintainer.
-" Former Maintainer: Charles E. Campbell
-" Last Change: Nov 07, 2019
-" 2024 Feb 19 by Vim Project (announce adoption)
-" Version : 20
-" ---------------------------------------------------------------------
+Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
+" Former Maintainer: Charles E Campbell
+" Upstream: <https://github.com/saccarosium/netrw.vim>
+" Language: Netrw Listing Syntax
+
if exists("b:current_syntax")
finish
endif
-" ---------------------------------------------------------------------
" Directory List Syntax Highlighting: {{{1
syn cluster NetrwGroup contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion,netrwCopyTgt
syn cluster NetrwTreeGroup contains=netrwDir,netrwSymLink,netrwExe
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index d534b36966..6d7a8660ff 100644
--- a/runtime/plugin/netrwPlugin.vim
+++ b/runtime/plugin/netrwPlugin.vim
@@ -1,234 +1,9 @@
-" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
-" PLUGIN SECTION
-" Maintainer: This runtime file is looking for a new maintainer.
-" Date: Sep 09, 2021
-" Last Change:
-" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
-" 2024 Oct 27 by Vim Project: cleanup gx mapping
-" 2024 Oct 28 by Vim Project: further improvements
-" 2024 Oct 31 by Vim Project: use autoloaded functions
-" 2024 Dec 19 by Vim Project: change style (#16248)
-" Former Maintainer: Charles E Campbell
-" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
-" Copyright: Copyright (C) 1999-2021 Charles E. Campbell {{{1
-" Permission is hereby granted to use and distribute this code,
-" with or without modifications, provided that this copyright
-" notice is copied with it. Like anything else that's free,
-" netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided
-" *as is* and comes with no warranty of any kind, either
-" expressed or implied. By using this plugin, you agree that
-" in no event will the copyright holder be liable for any damages
-" resulting from the use of this software.
-"
-" But be doers of the Word, and not only hearers, deluding your own selves {{{1
-" (James 1:22 RSV)
-" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-" Load Once: {{{1
-if &cp || exists("g:loaded_netrwPlugin")
- finish
-endif
-let g:loaded_netrwPlugin = "v173"
-let s:keepcpo = &cpo
-set cpo&vim
-"DechoRemOn
-
-" ---------------------------------------------------------------------
-" Public Interface: {{{1
-
-" Commands Launch/URL {{{2
-command -complete=shellcmd -nargs=1 Launch call netrw#Launch(trim(<q-args>))
-command -complete=file -nargs=1 Open call netrw#Open(trim(<q-args>))
-" " }}}
-" Local Browsing Autocmds: {{{2
-augroup FileExplorer
- au!
- au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif
- au BufEnter * sil call s:LocalBrowse(expand("<amatch>"))
- au VimEnter * sil call s:VimEnter(expand("<amatch>"))
- if has("win32")
- au BufEnter .* sil call s:LocalBrowse(expand("<amatch>"))
- endif
-augroup END
-
-" Network Browsing Reading Writing: {{{2
-augroup Network
- au!
- au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>"))
- au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
- au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
- au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
- au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
- try
- au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
- catch /^Vim\%((\a\+)\)\=:E216/
- au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
- endtry
-augroup END
-
-" Commands: :Nread, :Nwrite, :NetUserPass {{{2
-com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos)
-com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
-com! -nargs=* NetUserPass call NetUserPass(<f-args>)
-com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
-com! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
+" Load the netrw package.
-" Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
-com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
-com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>)
-com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>)
-com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(<count>,1,4+<bang>0,<q-args>)
-com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(<count>,0,6 ,<q-args>)
-com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
-com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
-com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(<count>,<bang>0,<q-args>)
-
-" Commands: NetrwSettings {{{2
-com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
-com! -bang NetrwClean call netrw#Clean(<bang>0)
-
-" Maps:
-if !exists("g:netrw_nogx")
- if maparg('gx','n') == ""
- if !hasmapto('<Plug>NetrwBrowseX')
- nmap <unique> gx <Plug>NetrwBrowseX
- endif
- nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr>
- endif
- if maparg('gx','x') == ""
- if !hasmapto('<Plug>NetrwBrowseXVis')
- xmap <unique> gx <Plug>NetrwBrowseXVis
- endif
- xno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr>
- endif
-endif
-if exists("g:netrw_usetab") && g:netrw_usetab
- if maparg('<c-tab>','n') == ""
- nmap <unique> <c-tab> <Plug>NetrwShrink
- endif
- nno <silent> <Plug>NetrwShrink :call netrw#Shrink()<cr>
+if &cp || exists("g:loaded_netrw") || exists("g:loaded_netrwPlugin")
+ finish
endif
-" ---------------------------------------------------------------------
-" LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2
-fun! s:LocalBrowse(dirname)
- " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here.
- " Otherwise, the BufEnter event gets triggered when attempts to write to
- " the DBG buffer are made.
-
- if !exists("s:vimentered")
- " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will,
- " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined.
- " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)")
- " call Dret("s:LocalBrowse")
- return
- endif
-
- " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")")
-
- if has("amiga")
- " The check against '' is made for the Amiga, where the empty
- " string is the current directory and not checking would break
- " things such as the help command.
- " call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)")
- if a:dirname != '' && isdirectory(a:dirname)
- sil! call netrw#LocalBrowseCheck(a:dirname)
- if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
- exe w:netrw_bannercnt
- endif
- endif
-
- elseif isdirectory(a:dirname)
- " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
- " call Dredir("LocalBrowse ft last set: ","verbose set ft")
- " Jul 13, 2021: for whatever reason, preceding the following call with
- " a sil! causes an unbalanced if-endif vim error
- call netrw#LocalBrowseCheck(a:dirname)
- if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
- exe w:netrw_bannercnt
- endif
-
- else
- " not a directory, ignore it
- " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
- endif
-
- " call Dret("s:LocalBrowse")
-endfun
-
-" ---------------------------------------------------------------------
-" s:VimEnter: after all vim startup stuff is done, this function is called. {{{2
-" Its purpose: to look over all windows and run s:LocalBrowse() on
-" them, which checks if they're directories and will create a directory
-" listing when appropriate.
-" It also sets s:vimentered, letting s:LocalBrowse() know that s:VimEnter()
-" has already been called.
-fun! s:VimEnter(dirname)
- " call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">")
- if has('nvim') || v:version < 802
- " Johann Höchtl: reported that the call range... line causes an E488: Trailing characters
- " error with neovim. I suspect its because neovim hasn't updated with recent
- " vim patches. As is, this code will have problems with popup terminals
- " instantiated before the VimEnter event runs.
- " Ingo Karkat : E488 also in Vim 8.1.1602
- let curwin = winnr()
- let s:vimentered = 1
- windo call s:LocalBrowse(expand("%:p"))
- exe curwin."wincmd w"
- else
- " the following complicated expression comes courtesy of lacygoill; largely does the same thing as the windo and
- " wincmd which are commented out, but avoids some side effects. Allows popup terminal before VimEnter.
- let s:vimentered = 1
- call range(1, winnr('$'))->map({_, v -> win_execute(win_getid(v), 'call expand("%:p")->s:LocalBrowse()')})
- endif
- " call Dret("s:VimEnter")
-endfun
-
-" ---------------------------------------------------------------------
-" NetrwStatusLine: {{{1
-fun! NetrwStatusLine()
- " let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".")
- if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
- let &stl= s:netrw_explore_stl
- if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
- if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif
- return ""
- else
- return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
- endif
-endfun
-
-" ------------------------------------------------------------------------
-" NetUserPass: set username and password for subsequent ftp transfer {{{1
-" Usage: :call NetUserPass() -- will prompt for userid and password
-" :call NetUserPass("uid") -- will prompt for password
-" :call NetUserPass("uid","password") -- sets global userid and password
-fun! NetUserPass(...)
-
- " get/set userid
- if a:0 == 0
- " call Dfunc("NetUserPass(a:0<".a:0.">)")
- if !exists("g:netrw_uid") || g:netrw_uid == ""
- " via prompt
- let g:netrw_uid= input('Enter username: ')
- endif
- else " from command line
- " call Dfunc("NetUserPass(a:1<".a:1.">) {")
- let g:netrw_uid= a:1
- endif
-
- " get password
- if a:0 <= 1 " via prompt
- " call Decho("a:0=".a:0." case <=1:")
- let g:netrw_passwd= inputsecret("Enter Password: ")
- else " from command line
- " call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
- let g:netrw_passwd=a:2
- endif
- " call Dret("NetUserPass")
-endfun
+packadd netrw
-" ------------------------------------------------------------------------
-" Modelines And Restoration: {{{1
-let &cpo= s:keepcpo
-unlet s:keepcpo
-" vim:ts=8 sts=2 sw=2 et fdm=marker
+" vim:ts=8 sts=2 sw=2 et