summaryrefslogtreecommitdiffstats
path: root/runtime/doc/pi_netrw.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-01-07 16:57:10 +0100
committerBram Moolenaar <Bram@vim.org>2015-01-07 16:57:10 +0100
commit8feef4ff6253afb9dcc61c40082ed4fbb96b685c (patch)
treeb4fcf5ee772cf6eb0ff932c0eb98a322a8c1c273 /runtime/doc/pi_netrw.txt
parenta162bc555e74c1a4f1b7b49871e292e05141b054 (diff)
Update runtime files.
Diffstat (limited to 'runtime/doc/pi_netrw.txt')
-rw-r--r--runtime/doc/pi_netrw.txt766
1 files changed, 500 insertions, 266 deletions
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 32f576af6a..5e629aaf42 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt* For Vim version 7.4. Last change: 2014 May 13
+*pi_netrw.txt* For Vim version 7.4. Last change: 2015 Jan 05
------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell
@@ -6,7 +6,7 @@
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
-Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright*
+Copyright: Copyright (C) 1999-2015 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
syntax/netrw.vim. Like anything else that's free, netrw.vim and its
@@ -18,9 +18,10 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright*
software. Use at your own risk!
+ *netrw*
*dav* *ftp* *netrw-file* *rcp* *scp*
*davs* *http* *netrw.vim* *rsync* *sftp*
- *fetch* *netrw* *network*
+ *fetch* *network*
==============================================================================
1. Contents *netrw-contents* {{{1
@@ -57,7 +58,7 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright*
Changing To A Bookmarked Directory..................|netrw-gb|
Changing To A Predecessor Directory.................|netrw-u|
Changing To A Successor Directory...................|netrw-U|
- Customizing Browsing With A User Function...........|netrw-x|
+ Customizing Browsing With A Special Handler.........|netrw-x|
Deleting Bookmarks..................................|netrw-mB|
Deleting Files Or Directories.......................|netrw-D|
Directory Exploring Commands........................|netrw-explore|
@@ -76,7 +77,9 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright*
Unmarking Files.....................................|netrw-mF|
Marking Files By QuickFix List......................|netrw-qF|
Marking Files By Regular Expression.................|netrw-mr|
- Marked Files: Arbitrary Command.....................|netrw-mx|
+ Marked Files: Arbitrary Shell Command...............|netrw-mx|
+ Marked Files: Arbitrary Shell Command, En Bloc......|netrw-mX|
+ Marked Files: Arbitrary Vim Command.................|netrw-mv|
Marked Files: Compression And Decompression.........|netrw-mz|
Marked Files: Copying...............................|netrw-mc|
Marked Files: Diff..................................|netrw-md|
@@ -209,6 +212,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
rsync: *g:netrw_rsync_cmd* = "rsync -a"
scp: *g:netrw_scp_cmd* = "scp -q"
sftp: *g:netrw_sftp_cmd* = "sftp"
+ file: *g:netrw_file_cmd* = "elinks" or "links"
*g:netrw_http_xcmd* : the option string for http://... protocols are
specified via this variable and may be independently overridden. By
@@ -346,7 +350,7 @@ settings are described below, in |netrw-browser-options|, and in
per-buffer basis (supports plain :Nw )
*g:netrw_bufsettings* the settings that netrw buffers have
- (default) noma nomod nonu nowrap ro nobl
+ (default) noma nomod nonu nowrap ro nobl
*g:netrw_chgwin* specifies a window number where subsequent file edits
will take place. (also see |netrw-C|)
@@ -399,18 +403,26 @@ settings are described below, in |netrw-browser-options|, and in
be available (see |netrw-gx|)
*g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis
- *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
+ *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
*g:netrw_preview* =0 (default) preview window shown in a horizontally
split window
=1 preview window shown in a vertically split window.
Also affects the "previous window" (see |netrw-P|)
in the same way.
+ The |g:netrw_alto| variable may be used to provide
+ additional splitting control:
+ g:netrw_preview g:netrw_alto result
+ 0 0 |:aboveleft|
+ 0 1 |:belowright|
+ 1 0 |:topleft|
+ 1 1 |:botright|
+ To control sizing, see |g:netrw_winsize|
*g:netrw_scpport* = "-P" : option to use to set port for scp
*g:netrw_sshport* = "-p" : option to use to set port for ssh
- *g:netrw_sepchr* =\0xff
+ *g:netrw_sepchr* =\0xff
=\0x01 for enc == euc-jp (and perhaps it should be for
others, too, please let me know)
Separates priority codes from filenames internally.
@@ -430,7 +442,7 @@ settings are described below, in |netrw-browser-options|, and in
lines that o/s's ftp "provides" on transfers
=0 force normal ftp behavior (no trailing line removal)
- *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
+ *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
permits network browsing to use ls with time and
size sorting (default if windows)
=0 assume Windows' scp accepts windows-style paths
@@ -681,6 +693,16 @@ your <.vimrc> customization file: >
filetype plugin indent on
endif
<
+By also including the following lines in your .vimrc, one may have netrw
+immediately activate when using [g]vim without any filenames, showing the
+current directory: >
+
+ " Augroup VimStartup:
+ augroup VimStartup
+ au!
+ au VimEnter * if expand("%") == "" | e . | endif
+ augroup END
+<
==============================================================================
6. Transparent Remote File Editing *netrw-transparent* {{{1
@@ -838,7 +860,7 @@ variables listed below, and may be modified by the user.
g:netrw_http_cmd var ="fetch -o" if fetch is available
g:netrw_http_cmd var ="wget -O" else if wget is available
g:netrw_http_put_cmd var ="curl -T"
- g:netrw_list_cmd var ="ssh USEPORT HOSTNAME ls -Fa"
+ |g:netrw_list_cmd| var ="ssh USEPORT HOSTNAME ls -Fa"
g:netrw_rcp_cmd var ="rcp"
g:netrw_rsync_cmd var ="rsync -a"
g:netrw_scp_cmd var ="scp -q"
@@ -1042,6 +1064,9 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
+ <c-h> Edit file hiding list |netrw-ctrl-h|
+ <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
+ <c-r> Browse using a gvim server |netrw-ctrl-r|
- Makes Netrw go up one directory |netrw--|
a Toggles between normal display, |netrw-a|
hiding (suppress display of files matching g:netrw_list_hide)
@@ -1051,23 +1076,27 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
d Make a directory |netrw-d|
D Attempt to remove the file(s)/directory(ies) |netrw-D|
gb Go to previous bookmarked directory |netrw-gb|
+ gd Force treatment as directory |netrw-gd|
+ gf Force treatment as file |netrw-gf|
gh Quick hide/unhide of dot-files |netrw-gh|
- <c-h> Edit file hiding list |netrw-ctrl-h|
i Cycle between thin, long, wide, and tree listings |netrw-i|
- <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
mb Bookmark current directory |netrw-mb|
mc Copy marked files to marked-file target directory |netrw-mc|
md Apply diff to marked files (up to 3) |netrw-md|
me Place marked files on arg list and edit them |netrw-me|
mf Mark a file |netrw-mf|
+ mF Unmark files |netrw-mF|
+ mg Apply vimgrep to marked files |netrw-mg|
mh Toggle marked file suffices' presence on hiding list |netrw-mh|
mm Move marked files to marked-file target directory |netrw-mm|
mp Print marked files |netrw-mp|
- mr Mark files satisfying a shell-style |regexp| |netrw-mr|
+ mr Mark files using a shell-style |regexp| |netrw-mr|
mt Current browsing directory becomes markfile target |netrw-mt|
mT Apply ctags to marked files |netrw-mT|
mu Unmark all marked files |netrw-mu|
+ mv Apply arbitrary vim command to marked files |netrw-mv|
mx Apply arbitrary shell command to marked files |netrw-mx|
+ mX Apply arbitrary shell command to marked files en bloc|netrw-mX|
mz Compress/decompress marked files |netrw-mz|
o Enter the file/directory under the cursor in a new |netrw-o|
browser window. A horizontal split is used.
@@ -1076,6 +1105,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
P Browse in the previously used window |netrw-P|
qb List bookmarked directories and history |netrw-qb|
qf Display information on file |netrw-qf|
+ qF Mark files using a quickfix list |netrw-qF|
r Reverse sorting order |netrw-r|
R Rename the designed file(s)/directory(ies) |netrw-R|
s Select sorting style: by name, time, or file size |netrw-s|
@@ -1099,7 +1129,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
mouse
<2-leftmouse> (gvim only) when:
* in a netrw-selected file, AND
- * |g:netrw_retmap| == 1 AND
+ * |g:netrw_retmap| == 1 AND
* the user doesn't already have a <2-leftmouse>
mapping defined before netrw is autoloaded,
then a double clicked leftmouse button will return
@@ -1117,7 +1147,7 @@ QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
:Ntree....................................................|netrw-ntree|
:Explore[!] [dir] Explore directory of current file......|netrw-explore|
:Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
- :Lexplore [dir] Left Explorer Toggle...................|netrw-explore|
+ :Lexplore[!] [dir] Left Explorer Toggle...................|netrw-explore|
:Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
:Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
:Rexplore Return to Explorer.....................|netrw-explore|
@@ -1125,19 +1155,45 @@ QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
:Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
:Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
-BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
+BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
-One may easily "bookmark" a directory by using >
+One may easily "bookmark" the currently browsed directory by using >
mb
<
+ *.netrwbook*
Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are
kept in sorted order.
+If there are marked files and/or directories, mb will add them to the bookmark
+list.
+
+*netrw-:NetrwMB*
+Addtionally, one may use :NetrwMB to bookmark files or directories. >
+
+ :NetrwMB[!] [files/directories]
+
+< No bang: enters files/directories into Netrw's bookmark system
+
+ No argument and in netrw buffer:
+ if there are marked files: bookmark marked files
+ otherwise : bookmark file/directory under cursor
+ No argument and not in netrw buffer: bookmarks current open file
+ Has arguments: globs them individually and bookmarks them
+
+ With bang: deletes files/directories from Netrw's bookmark system
+
+The :NetrwMB command is available outside of netrw buffers (once netrw has been
+invoked in the session).
+
+The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By
+default, its stored on the first directory on the user's |'runtimepath'|.
+
Related Topics:
|netrw-gb| how to return (go) to a bookmark
|netrw-mB| how to delete bookmarks
|netrw-qb| how to list bookmarks
+ |g:netrw_home| controls where .netrwbook is kept
BROWSING *netrw-cr* {{{2
@@ -1163,7 +1219,7 @@ horizontally or vertically, respectively. When the option is set to three, a
When using the gui (gvim), one may select a file by pressing the <leftmouse>
button. In addition, if
- *|g:netrw_retmap| == 1 AND (its default value is 0)
+ * |g:netrw_retmap| == 1 AND (its default value is 0)
* in a netrw-selected file, AND
* the user doesn't already have a <2-leftmouse> mapping defined before
netrw is loaded
@@ -1181,19 +1237,20 @@ The price for such re-use is that when changes are made (such as new files
are introduced into a directory), the listing may become out-of-date. One may
always refresh directory listing buffers by pressing ctrl-L (see
|netrw-ctrl-l|).
-
*:netrw-s-cr*
Squeezing the Current Tree-Listing Directory~
When the tree listing style is enabled (see |netrw-i|) and one is using
gvim, then the <s-cr> mapping may be used to squeeze (close) the
directory currently containing the cursor.
-
-Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
-Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse|
- |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
- |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd|
- |g:netrw_ssh_browse_reject| |g:netrw_use_noswf|
+Related topics:
+ |netrw-ctrl-r| |netrw-o| |netrw-p|
+ |netrw-P| |netrw-t| |netrw-v|
+Associated setting variables:
+ |g:netrw_browse_split| |g:netrw_fastbrowse|
+ |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
+ |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_browse_reject|
+ |g:netrw_ssh_cmd| |g:netrw_use_noswf|
BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2
@@ -1207,12 +1264,14 @@ cursor at the top.
Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
-Related Actions |netrw-cr| |netrw-p| |netrw-t| |netrw-v|
+Related topics:
+ |netrw-ctrl-r| |netrw-o| |netrw-p|
+ |netrw-P| |netrw-t| |netrw-v|
Associated setting variables:
|g:netrw_alto| control above/below splitting
|g:netrw_winsize| control initial sizing
-BROWSING WITH A NEW TAB *netrw-t*
+BROWSING WITH A NEW TAB *netrw-t* {{{2
Normally one enters a file or directory using the <cr>. The "t" map
allows one to open a new window holding the new directory listing or file in
@@ -1220,7 +1279,9 @@ a new tab.
If you'd like to have the new listing in a background tab, use |gT|.
-Related Actions |netrw-cr| |netrw-o| |netrw-p| |netrw-v|
+Related topics:
+ |netrw-ctrl-r| |netrw-o| |netrw-p|
+ |netrw-P| |netrw-t| |netrw-v|
Associated setting variables:
|g:netrw_winsize| control initial sizing
@@ -1236,13 +1297,30 @@ cursor at the left.
There is only one tree listing buffer; using "v" on a displayed subdirectory
will split the screen, but the same buffer will be shown twice.
-Related Actions: |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
+Related topics:
+ |netrw-ctrl-r| |netrw-o| |netrw-p|
+ |netrw-P| |netrw-t| |netrw-v|
Associated setting variables:
|g:netrw_altv| control right/left splitting
|g:netrw_winsize| control initial sizing
-CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2
+BROWSING USING A GVIM SERVER *netrw-ctrl-r* {{{2
+
+One may keep a browsing gvim separate from the gvim being used to edit.
+Use the <c-r> map on a file (not a directory) in the netrw browser, and it
+will use a gvim server (see |g:netrw_servername|). Subsequent use of <cr>
+(see |netrw-cr|) will re-use that server for editing files.
+
+Related topics:
+ |netrw-ctrl-r| |netrw-o| |netrw-p|
+ |netrw-P| |netrw-t| |netrw-v|
+Associated setting variables:
+ |g:netrw_servername| : sets name of server
+ |g:netrw_browse_split| : controls how <cr> will open files
+
+
+CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2
The "i" map cycles between the thin, long, wide, and tree listing formats.
@@ -1267,7 +1345,7 @@ name.
One may make a preferred listing style your default; see |g:netrw_liststyle|.
As an example, by putting the following line in your .vimrc, >
- let g:netrw_liststyle= 4
+ let g:netrw_liststyle= 3
the tree style will become your default listing style.
One typical way to use the netrw tree display is to: >
@@ -1321,8 +1399,15 @@ The "u" map also accepts counts to go back in the history several slots.
For your convenience, |netrw-qb| lists the history number which can be
re-used in that count.
+ *.netrwhist*
See |g:netrw_dirhistmax| for how to control the quantity of history stack
-slots.
+slots. The file ".netrwhist" holds history when netrw (and vim) is not
+active. By default, its stored on the first directory on the user's
+|'runtimepath'|.
+
+Related Topics:
+ |netrw-U| changing to a successor directory
+ |g:netrw_home| controls where .netrwhist is kept
CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2
@@ -1337,7 +1422,7 @@ See |g:netrw_dirhistmax| for how to control the quantity of history stack
slots.
-CHANGING TREE TOP *netrw-ntree* *:Ntree*
+CHANGING TREE TOP *netrw-ntree* *:Ntree* {{{2
One may specify a new tree top for tree listings using >
@@ -1348,7 +1433,7 @@ information is elided).
With a "dirname", the specified directory name is used.
-NETRW CLEAN *netrw-clean* *:NetrwClean*
+NETRW CLEAN *netrw-clean* *:NetrwClean* {{{2
With :NetrwClean one may easily remove netrw from one's home directory;
more precisely, from the first directory on your |'runtimepath'|.
@@ -1361,17 +1446,16 @@ that the removal is in fact what you want to do. If netrw doesn't have
permission to remove a file, it will issue an error message.
*netrw-gx*
-CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2
+CUSTOMIZING BROWSING WITH A SPECIAL HANDLER *netrw-x* *netrw-handler* {{{2
(also see |netrw_filehandler|)
Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
-best seen with a special handler (ie. a tool provided with your computer).
-Netrw allows one to invoke such special handlers by: >
+best seen with a special handler (ie. a tool provided with your computer's
+operating system). Netrw allows one to invoke such special handlers by: >
* when Exploring, hit the "x" key
* when editing, hit gx with the cursor atop the special filename
-< (not available if the |g:netrw_nogx| variable exists)
-
+< (latter not available if the |g:netrw_nogx| variable exists)
Netrw determines which special handler by the following method:
* if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
@@ -1379,14 +1463,14 @@ Netrw determines which special handler by the following method:
:let g:netrw_browsex_viewer= "kfmclient exec"
< or >
- :let g:netrw_browsex_viewer= "gnome-open"
+ :let g:netrw_browsex_viewer= "xdg-open"
<
- If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
- invoked first (see |netrw_filehandler|).
+ If g:netrw_browsex_viewer == '-', then netrwFileHandlers#Invoke() will be
+ used instead (see |netrw_filehandler|).
* for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
* for Gnome (with gnome-open): gnome-open is used.
- * for KDE (with kfmclient) : kfmclient is used.
+ * for KDE (with kfmclient) : kfmclient is used
* for Mac OS X : open is used.
* otherwise the netrwFileHandler plugin is used.
@@ -1395,17 +1479,31 @@ appropriate application to use to "handle" these files. Such things as
OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
*.eps) can be handled.
+The gx mapping extends to all buffers; apply "gx" while atop a word and netrw
+will apply a special handler to it (like "x" works when in a netrw buffer).
+One may also use visual mode (see |visual-start|) to select the text that the
+special handler will use. Normally gx uses expand("<cfile>") to pick up the
+text under the cursor; one may change what |expand()| uses via the
+|g:netrw_gx| variable. Alternatively, one may select the text to be used by
+gx via first making a visual selection (see |visual-block|).
+
+Associated setting variables:
+ |g:netrw_gx| control how gx picks up the text under the cursor
+ |g:netrw_nogx| prevent gx map while editing
+
*netrw_filehandler*
-The "x" map applies a function to a file, based on its extension. Of course,
-the handler function must exist for it to be called!
+When |g:netrw_browsex_viewer| exists and is "-", then netrw will attempt to
+handle the special file with a vim function. The "x" map applies a function
+to a file, based on its extension. Of course, the handler function must exist
+for it to be called!
>
- Ex. mypgm.html x ->
- NFH_html("scp://user@host/some/path/mypgm.html")
-<
-Users may write their own netrw File Handler functions to support more
-suffixes with special handling. See <autoload/netrwFileHandlers.vim> for
-examples on how to make file handler functions. As an example: >
+ Ex. mypgm.html x -> NFH_html("scp://user@host/some/path/mypgm.html")
+
+< Users may write their own netrw File Handler functions to
+ support more suffixes with special handling. See
+ <autoload/netrwFileHandlers.vim> for examples on how to make
+ file handler functions. As an example: >
" NFH_suffix(filename)
fun! NFH_suffix(filename)
@@ -1439,7 +1537,14 @@ DELETING BOOKMARKS *netrw-mB* {{{2
To delete a bookmark, use >
{cnt}mB
-<
+
+If there are marked files, then mB will remove them from the
+bookmark list.
+
+Alternatively, one may use :NetrwMB! (see |netrw-:NetrwMB|). >
+
+ :NetrwMB! [files/directories]
+
Related Topics:
|netrw-gb| how to return (go) to a bookmark
|netrw-mb| how to make a bookmark
@@ -1498,11 +1603,11 @@ DIRECTORY EXPLORATION COMMANDS {{{2
:[N]Explore[!] [dir]... Explore directory of current file *:Explore*
:[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
- :Rexplore ... Return to/from Explorer *:Rexplore*
+ :[N]Lexplore[!] [dir]... Left Explorer Toggle *:Lexplore*
:[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore*
- :Texplore [dir]... Tab & Explore *:Texplore*
:[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
- :Lexplore [dir]... Left Explorer Toggle *:Lexplore*
+ :Texplore [dir]... Tab & Explore *:Texplore*
+ :Rexplore ... Return to/from Explorer *:Rexplore*
Used with :Explore **/pattern : (also see |netrw-starstar|)
:Nexplore............. go to next matching file *:Nexplore*
@@ -1511,54 +1616,73 @@ DIRECTORY EXPLORATION COMMANDS {{{2
*netrw-:Explore*
:Explore will open the local-directory browser on the current file's
directory (or on directory [dir] if specified). The window will be
- split only if the file has been modified, otherwise the browsing
- window will take over that window. Normally the splitting is taken
- horizontally.
+ split only if the file has been modified and |'hidden'| is not set,
+ otherwise the browsing window will take over that window. Normally
+ the splitting is taken horizontally.
Also see: |netrw-:Rexplore|
:Explore! is like :Explore, but will use vertical splitting.
- *netrw-:Lexplore*
-:Lexplore [dir] toggles an Explorer window on the left hand side
- of the current tab It will open a netrw window on the current
- directory if [dir] is omitted; a :Lexplore [dir] will show
- the specified directory in the left-hand side browser display
- no matter from which window the command is issued. By default,
- :Lexplore will change an uninitialized |g:netrw_chgwin| to 2;
- edits will thus be preferentially made in window#2.
- Also see: |netrw-C|| |g:netrw_chgwin| |g:netrw_winsize|
- |netrw-p| |netrw-P|| |g:netrw_browse_split|
- *netrw-:Sexplore*
-:Sexplore will always split the window before invoking the local-directory
- browser. As with Explore, the splitting is normally done
- horizontally.
-:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
+
*netrw-:Hexplore*
:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
- *netrw-:Vexplore*
-:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
-:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
+
+ *netrw-:Lexplore*
+:[N]Lexplore [dir] toggles a full height Explorer window on the left hand side
+ of the current tab. It will open a netrw window on the current
+ directory if [dir] is omitted; a :Lexplore [dir] will show the
+ specified directory in the left-hand side browser display no matter
+ from which window the command is issued. By default, :Lexplore will
+ change an uninitialized |g:netrw_chgwin| to 2; edits will thus
+ preferentially be made in window#2.
+ The [N] specifies a |g:netrw_winsize| just for the new :Lexplore
+ window.
+ Those who like this method often also like tree style displays;
+ see |g:netrw_liststyle|.
+
+ Also see: |netrw-C| |g:netrw_chgwin| |g:netrw_winsize|
+ |netrw-p| |netrw-P| |g:netrw_browse_split|
+
+:[N]Lexplore! is like :Lexplore, except that the full-height Explorer window
+ will open on the right hand side, and an uninitialized |g:netrw_chgwin|
+ will be set to 1.
+
+ *netrw-:Sexplore*
+:[N]Sexplore will always split the window before invoking the local-directory
+ browser. As with Explore, the splitting is normally done
+ horizontally.
+:[N]Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
+
*netrw-:Texplore*
:Texplore [dir] does a |:tabnew| before generating the browser window
-By default, these commands use the current file's directory. However, one may
-explicitly provide a directory (path) to use.
+ *netrw-:Vexplore*
+:[N]Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
+:[N]Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
-The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or
-columns the new explorer window should have.
+The optional parameters are:
-Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
-user, is used to control the quantity of rows and/or columns new explorer
-windows should have.
+ [N]: This parameter will override |g:netrw_winsize| to specify the quantity of
+ rows and/or columns the new explorer window should have.
+ Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
+ user, is used to control the quantity of rows and/or columns new
+ explorer windows should have.
+ [dir]: By default, these explorer commands use the current file's directory.
+ However, one may explicitly provide a directory (path) to use instead;
+ ie. >
+
+ :Explore /some/path
+<
*netrw-:Rexplore*
-:Rexplore This command is a little different from the others as it doesn't
- necessarily open an Explorer window.
+:Rexplore This command is a little different from the other Explore commands
+ as it doesn't necessarily open an Explorer window.
Return to Explorer~
- When one edits a file, for example by pressing <cr> when the
- cursor is atop a file in a netrw browser window, :Rexplore will
- return the display to that of the last netrw browser display
- in that window.
+ When one edits a file using netrw which can occur, for example,
+ when pressing <cr> while the cursor is atop a filename in a netrw
+ browser window, a :Rexplore issued while editing that file will
+ return the display to that of the last netrw browser display in
+ that window.
Return from Explorer~
Conversely, when one is editing a directory, issuing a :Rexplore
@@ -1571,11 +1695,11 @@ windows should have.
Also see: |g:netrw_alto| |g:netrw_altv| |g:netrw_winsize|
-*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
-EXPLORING WITH STARS AND PATTERNS
+*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat* *netrw-grep*
+EXPLORING WITH STARS AND PATTERNS {{{2
When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
-following four styles, Explore generates a list of files which satisfy
+following four patterns Explore generates a list of files which satisfy
the request. >
*/filepat files in current directory which satisfy filepat
@@ -1597,7 +1721,7 @@ will clear the explore list.
If your console or gui produces recognizable shift-up or shift-down sequences,
then you'll likely find using shift-downarrow and shift-uparrow convenient.
-They're mapped by netrw:
+They're mapped by netrw as follows:
<s-down> == Nexplore, and
<s-up> == Pexplore.
@@ -1678,7 +1802,7 @@ Related topics: |netrw-s| |netrw-S|
Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
-EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X*
+EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X* {{{2
Pressing X while the cursor is atop an executable file will yield a prompt
using the filename asking for any arguments. Upon pressing a [return], netrw
@@ -1769,18 +1893,19 @@ Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
Netrw provides a helper function 'netrw_gitignore#Hide()' that, when used with
|g:netrw_list_hide| automatically hides all git-ignored files.
-'netrw_gitignore#Hide' searches for patterns in the following files:
+'netrw_gitignore#Hide' searches for patterns in the following files: >
+
'./.gitignore'
'./.git/info/exclude'
global gitignore file: `git config --global core.excludesfile`
system gitignore file: `git config --system core.excludesfile`
-
+<
Files that do not exist, are ignored.
Git-ignore patterns are taken from existing files, and converted to patterns for
hiding files. For example, if you had '*.log' in your '.gitignore' file, it
would be converted to '.*\.log'.
-To use this function, simply assign it's output to |g:netrw_list_hide| option.
+To use this function, simply assign its output to |g:netrw_list_hide| option. >
Example: let g:netrw_list_hide= netrw_gitignore#Hide()
Git-ignored files are hidden in Netrw.
@@ -1790,7 +1915,7 @@ To use this function, simply assign it's output to |g:netrw_list_hide| option.
Example: g:netrw_list_hide= netrw_gitignore#Hide() . '.*\.swp$'
Combining 'netrw_gitignore#Hide' with custom patterns.
-
+<
IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2
@@ -1926,7 +2051,7 @@ Associated setting variable: |g:netrw_keepdir|
MARKING FILES *netrw-:MF* *netrw-mf* {{{2
(also see |netrw-mr|)
-Netrw has several ways of marking files:
+Netrw provides several ways to mark files:
* One may mark files with the cursor atop a filename and
then pressing "mf".
@@ -1949,6 +2074,8 @@ The following netrw maps make use of marked files:
|netrw-a| Hide marked files/directories
|netrw-D| Delete marked files/directories
+ |netrw-mb| Append marked files to bookmarks
+ |netrw-mB| Delete marked files from bookmarks
|netrw-mc| Copy marked files to target
|netrw-md| Apply vimdiff to marked files
|netrw-me| Edit marked files
@@ -1958,7 +2085,9 @@ The following netrw maps make use of marked files:
|netrw-mp| Print marked files
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|netrw-mT| Generate tags using marked files
+ |netrw-mv| Apply vim command to marked files
|netrw-mx| Apply shell command to marked files
+ |netrw-mX| Apply shell command to marked files, en bloc
|netrw-mz| Compress/Decompress marked files
|netrw-O| Obtain marked files
|netrw-R| Rename marked files
@@ -1982,13 +2111,13 @@ If the mouse is enabled and works with your vim, you may use <s-leftmouse> to
mark one or more files. You may mark multiple files by dragging the shifted
leftmouse. (see |netrw-mouse|)
-*markfilelist* *global_markfilelist* *local_markfilelist*
+ *markfilelist* *global_markfilelist* *local_markfilelist*
All marked files are entered onto the global marked file list; there is only
-one such list. In addition, every netrw buffer also has its own local marked
-file list; since netrw buffers are associated with specific directories, this
-means that each directory has its own local marked file list. The various
-commands which operate on marked files use one or the other of the marked file
-lists.
+one such list. In addition, every netrw buffer also has its own buffer-local
+marked file list; since netrw buffers are associated with specific
+directories, this means that each directory has its own local marked file
+list. The various commands which operate on marked files use one or the other
+of the marked file lists.
Known Problem: if one is using tree mode (|g:netrw_liststyle|) and several
directories have files with the same name, then marking such a file will
@@ -2004,7 +2133,7 @@ This command will unmark all files in the current buffer. One may also use
mf (|netrw-mf|) on a specific file to unmark just that file.
-MARKING FILES BY QUICKFIX LIST *netrw-qF*
+MARKING FILES BY QUICKFIX LIST *netrw-qF* {{{2
(also see |netrw-mf|)
One may convert the |quickfix-error-lists| into a marked file list using
@@ -2024,7 +2153,20 @@ future I may make it possible to use |regexp|s instead of glob()-style
expressions (yet-another-option).
-MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2
+MARKED FILES, ARBITRARY VIM COMMAND *netrw-mv* {{{2
+ (See |netrw-mf| and |netrw-mr| for how to mark files)
+ (uses the local marked-file list)
+
+The "mv" map causes netrw execute an arbitrary vim command on each file
+on the local marked file list, individually:
+
+ * 1split
+ * sil! keepalt e file
+ * run vim command
+ * sil! keepalt wq!
+
+
+MARKED FILES, ARBITRARY SHELL COMMAND *netrw-mx* {{{2
(See |netrw-mf| and |netrw-mr| for how to mark files)
(uses the local marked-file list)
@@ -2033,6 +2175,37 @@ command to be applied to all marked files. All "%"s in the command will be
substituted with the name of each marked file in turn. If no "%"s are in the
command, then the command will be followed by a space and a marked filename.
+Example:
+ (mark files)
+ mx
+ Enter command: cat
+
+ The result is a series of shell commands:
+ cat 'file1'
+ cat 'file2'
+ ...
+
+
+MARKED FILES, ARBITRARY SHELL COMMAND, EN BLOC *netrw-mX* {{{2
+ (See |netrw-mf| and |netrw-mr| for how to mark files)
+ (uses the global marked-file list)
+
+Upon activation of the 'mX' map, netrw will query the user for some (external)
+command to be applied to all marked files on the global marked file list. The
+"en bloc" means that one command will be executed on all the files at once: >
+
+ command files
+
+It is useful, for example, to select files and make a tarball:
+
+ (mark files)
+ mX
+ Enter command: tar cf mynewtarball.tar
+
+The command that will be run in this example:
+
+ tar cf mynewtarball.tar 'file1' 'file2' ...
+
MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
(See |netrw-mf| and |netrw-mr| for how to mark files)
@@ -2046,6 +2219,10 @@ that's "gzip".
For decompression, netrw provides a |Dictionary| of suffices and their
associated decompressing utilities; see |g:netrw_decompress|.
+Remember that one can mark multiple files by regular expression
+(see |netrw-mr|); this is particularly useful to facilitate compressing and
+decompressing a large number of files.
+
Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
MARKED FILES: COPYING *netrw-mc* {{{2
@@ -2056,7 +2233,16 @@ Select a target directory with mt (|netrw-mt|). Then change directory,
select file(s) (see |netrw-mf|), and press "mc". The copy is done
from the current window (where one does the mf) to the target.
-Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
+If one does not have a target directory set with |netrw-mt|, then netrw
+will query you for a directory to copy to.
+
+One may also copy directories and their contents (local only) to a target
+directory.
+
+Associated setting variables:
+ |g:netrw_localcopycmd|
+ |g:netrw_localcopydircmd|
+ |g:netrw_ssh_cmd|
MARKED FILES: DIFF *netrw-md* {{{2
(See |netrw-mf| and |netrw-mr| for how to mark files)
@@ -2090,7 +2276,7 @@ Thus, one may use >
mr ...file-pattern
mg ..contents-pattern
to have a marked file list satisfying the file-pattern but containing the
-desried contents-pattern.
+desired contents-pattern.
MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2
(See |netrw-mf| and |netrw-mr| for how to mark files)
@@ -2148,7 +2334,7 @@ Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
* Also, if the cursor is in the banner, then the netrw window's currently
displayed directory is used for the copy/move-to target.
Unless the target already is the current directory. In which case,
- remove the target.
+ typing "mf" clears the target.
* However, if the cursor is atop a directory name, then that directory is
used for the copy/move-to target
@@ -2157,9 +2343,9 @@ Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
This command uses |<q-args>|, so spaces in the directory name are
permitted without escaping.
-There is only one copy/move-to target per vim session; ie. the target is a
-script variable (see |s:var|) and is shared between all netrw windows (in an
-instance of vim).
+There is only one copy/move-to target at a time in a vim session; ie. the
+target is a script variable (see |s:var|) and is shared between all netrw
+windows (in an instance of vim).
When using menus and gvim, netrw provides a "Targets" entry which allows one
to pick a target from the list of bookmarks and history.
@@ -2196,7 +2382,7 @@ edit the desired file and go to the tag.
Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
-MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2
+MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2