160
162
Protocol Variable Default Value
161
163
-------- ---------------- -------------
162
dav: *g:netrw_dav_cmd* = "cadaver"
163
fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
164
ftp: *g:netrw_ftp_cmd* = "ftp"
165
http: *g:netrw_http_cmd* = "curl -o" if curl is available
166
http: g:netrw_http_cmd = "wget -q -O" elseif wget is available
167
http: g:netrw_http_cmd = "fetch -o" elseif fetch is available
168
rcp: *g:netrw_rcp_cmd* = "rcp"
169
rsync: *g:netrw_rsync_cmd* = "rsync -a"
170
scp: *g:netrw_scp_cmd* = "scp -q"
171
sftp: *g:netrw_sftp_cmd* = "sftp"
164
dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable
165
dav: g:netrw_dav_cmd = "curl -o" elseif curl is available
166
fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
167
ftp: *g:netrw_ftp_cmd* = "ftp"
168
http: *g:netrw_http_cmd* = "elinks" if elinks is available
169
http: g:netrw_http_cmd = "links" elseif links is available
170
http: g:netrw_http_cmd = "curl" elseif curl is available
171
http: g:netrw_http_cmd = "wget" elseif wget is available
172
http: g:netrw_http_cmd = "fetch" elseif fetch is available
173
rcp: *g:netrw_rcp_cmd* = "rcp"
174
rsync: *g:netrw_rsync_cmd* = "rsync -a"
175
scp: *g:netrw_scp_cmd* = "scp -q"
176
sftp: *g:netrw_sftp_cmd* = "sftp"
178
*g:netrw_http_xcmd* : the option string for http://... protocols are
179
specified via this variable and may be independently oveerridden.
187
For example, if your system has elinks but you want to see the html
188
source in detail rather than a text rendering thereof, you may wish
189
to have let g:netrw_http_xcmd= "-source >" in your .vimrc.
173
192
READING *netrw-read* *netrw-nread* {{{2
1232
1302
*netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
1233
1303
DIRECTORY EXPLORATION COMMANDS {{{2
1235
:Explore[!] [dir]... Explore directory of current file *:Explore*
1236
:Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
1237
:Rexplore ... Return to Explorer *:Rexplore*
1238
:Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore*
1239
:Texplore [dir]... Tab & Explore *:Texplore*
1240
:Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
1305
:[N]Explore[!] [dir]... Explore directory of current file *:Explore*
1306
:[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
1307
:Rexplore ... Return to Explorer *:Rexplore*
1308
:[N]Sexplore[!] [dir]... Split&Explore current file's directory*:Sexplore*
1309
:Texplore [dir]... Tab & Explore *:Texplore*
1310
:[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
1242
1312
Used with :Explore **/pattern : (also see |netrw-starstar|)
1243
1313
:Nexplore............. go to next matching file *:Nexplore*
1259
1329
:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
1260
1330
:Texplore [dir] does a tabnew before generating the browser window
1262
By default, these commands use the current file's directory. However, one
1263
may explicitly provide a directory (path) to use.
1265
The |g:netrw_winsize| variable also is used, if specified by the user, to
1266
size Hexplore and Vexplore windows.
1332
By default, these commands use the current file's directory. However, one may
1333
explicitly provide a directory (path) to use.
1335
The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or
1336
columns the new explorer window should have.
1338
Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
1339
user, is used to control the quantity of rows and/or columns new explorer
1340
windows should have.
1268
1342
:Rexplore This command is a little different from the others. When one
1269
1343
edits a file, for example by pressing <cr> when atop a file in
1349
1423
(g:netrw_sort_sequence). The sorting sequence typically prioritizes the
1350
1424
name-listing by suffix, although any pattern will do. Patterns are delimited
1351
1425
by commas. The default sorting sequence is (all one line):
1428
'[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,
1429
\.info$,\.swp$,\.bak$,\~$'
1353
1432
'[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
1354
1433
\.swp$,\.bak$,\~$'
1509
1588
LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2
1511
Pressing "qb" (query bookmarks) will list the bookmarked directories and
1512
directory traversal history (query).
1514
(see |netrw-mb|, |netrw-gb|, |netrw-u|, and |netrw-U|)
1590
Pressing "qb" (query bookmarks) will list both the bookmarked directories and
1591
directory traversal history.
1594
|netrw-gb| how to return (go) to a bookmark
1595
|netrw-mb| how to make a bookmark
1596
|netrw-mB| how to delete bookmarks
1597
|netrw-u| change to a predecessor directory via the history stack
1598
|netrw-U| change to a successor directory via the history stack
1517
1600
MAKING A NEW DIRECTORY *netrw-d* {{{2
1903
2002
*g:netrw_mkdir_cmd* command for making a remote directory
1904
2003
default: "ssh USEPORT HOSTNAME mkdir"
1906
*g:netrw_retmap* if it exists and is set to one, then
1907
<2-leftmouse> will be mapped for easy
2005
*g:netrw_retmap* if it exists and is set to one, then:
2006
* if in a netrw-selected file, AND
2007
* no normal-mode <2-leftmouse> mapping exists,
2008
then the <2-leftmouse> will be mapped for easy
1908
2009
return to the netrw browser window.
1909
(example: click once to select and open
1910
a file, double-click to return)
2010
example: click once to select and open a file,
2011
double-click to return.
2013
Note that one may instead choose to:
2014
* let g:netrw_retmap= 1, AND
2015
* nmap <silent> YourChoice <Plug>NetrwReturn
2016
and have another mapping instead of
2017
<2-leftmouse> to invoke the return.
2019
You may also use the |:Rexplore| command to do
1913
2024
*g:netrw_rm_cmd* command for removing files
1936
2047
*g:netrw_sort_sequence* when sorting by name, first sort by the
1937
comma-separated pattern sequence
2048
comma-separated pattern sequence. Note that
2049
the filigree added to indicate filetypes
2050
should be accounted for in your pattern.
1938
2051
default: '[\/]$,*,\.bak$,\.o$,\.h$,
1939
2052
\.info$,\.swp$,\.obj$'
1941
2054
*g:netrw_special_syntax* If true, then certain files will be shown
1942
in special syntax in the browser:
2055
in special syntax in the browser:
1944
2057
netrwBak : *.bak
1945
2058
netrwCompress: *.gz *.bz2 *.Z *.zip
2000
2113
|:Hexplore| or |:Vexplore|.
2003
*g:netrw_xstrlen* Controls how netrw computes a string
2004
including multi-byte characters' string
2116
*g:netrw_xstrlen* Controls how netrw computes string lengths,
2117
including multi-byte characters' string
2005
2118
length. (thanks to N Weibull, T Mechelynck)
2006
2119
=0: uses Vim's built-in strlen()
2007
2120
=1: number of codepoints (Latin + a combining
2008
2121
circumflex is two codepoints) (DEFAULT)
2009
2122
=2: number of spacing codepoints (Latin a +
2010
combining circumflex is one spacing
2123
combining circumflex is one spacing
2011
2124
codepoint; a hard tab is one; wide and
2012
2125
narrow CJK are one each; etc.)
2013
2126
=3: virtual length (counting tabs as anything
2375
2498
<leftmouse> in the browser window and then press the
2376
2499
<middlemouse> to select the file.
2502
P12. My directory isn't sorting correctly, or unwanted letters are
2503
appearing in the listed filenames, or things aren't lining
2504
up properly in the wide listing, ...
2506
This may be due to an encoding problem. I myself usually use
2507
utf-8, but really only use ascii (ie. bytes from 32-126).
2508
Multibyte encodings use two (or more) bytes per character.
2509
You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
2378
2511
==============================================================================
2379
2512
11. Debugging Netrw Itself *netrw-debug* {{{1
2429
2562
==============================================================================
2430
2563
12. History *netrw-history* {{{1
2565
v136: Jan 14, 2009 * extended |g:Netrw_funcref| to also handle lists
2566
of function references
2567
Jan 14, 2009 * (reported by Marvin Renich) with spell check
2568
enabled, some filenamess will still being
2569
displayed as spelling errors.
2570
v135: Oct 29, 2008 * using |simplify()| on directory names
2571
(supporting handling ".."s in directory names)
2572
Oct 31, 2008 * added special file highlighting for core dumps
2573
under Unix/Linux. The default sorting sequence
2574
now also gives core dumps priority.
2575
Nov 10, 2008 * uses a call to netrw#Nread() instead of Nread
2576
to avoid having to use fnameescape()
2577
* fixed a tree redrawing problem (open directory,
2578
open subdir, close subdir, close dir)
2579
Nov 19, 2008 * sprinked some histdel("/",-1)s through the code
2580
in an attempt to prevent netrw from changing
2582
Jan 02, 2009 * |g:Netrw_funcref| included
2583
Jan 05, 2009 * Explore */ **/ *// **// all clear explorer
2585
Jan 05, 2009 * (Panagiotis Louridas) extended s:WinPath()
2586
to remove cygdrive from non-cygwin Windows
2587
paths. Improved the determination as to
2588
whether or not to do so.
2589
Jan 13, 2009 * included contains=@NoSpell in every syntax
2590
group for syntax/netrw.vim .
2591
v134: Sep 30, 2008 * (Sander Marechal) provided a bugfix involving
2592
the use of the |netrw-t| command with a remote
2594
Sep 30, 2008 * using "x" on a remote jpg was failing; fixed.
2595
Oct 03, 2008 * bookmarks now go on a list and are stored to
2596
the first directory on the |'runtimepath'| in
2597
the hopes of making their retention reliable.
2598
History now also goes to that directory.
2599
Oct 07, 2008 * Included check that vim 7.0 or later is in use.
2600
Oct 07, 2008 * Improved |g:netrw_retmap| handling.
2601
Oct 12, 2008 * Based upon Sébastien Migniot's suggestion, if
2602
cadaver isn't available then netrw will try to
2603
use curl for the dav://... protocol.
2604
Oct 13, 2008 * added @*/ to netrw buffers' |'iskeyword'|setting
2605
This lets mf (|netrw-mf|) mark directories, links
2607
Oct 13, 2008 * avoids a second NetrwBrowse() refresh when
2608
g:netrw_fastbrowse is <= 1 (slow, medium speed)
2609
Oct 22, 2008 * |g:netrw_http_xcmd| may now be overridden
2610
independently of |g:netrw_http_cmd|.
2611
Oct 23, 2008 * [N] added to the various Explore commands to
2612
let users specify the width/height of new
2613
explorer windows, overriding |g:netrw_winsize|.
2614
v133: Aug 10, 2008 * NetReadFixup() for win95 was missing some "a:"s
2615
Aug 12, 2008 * (Jan Minář) an error condition in NetrwMethod()
2616
wasn't being used, resulting in "b:netrw_fname
2618
Aug 12, 2008 * (François Ingeirest) asked that "hi link" be
2619
changed to hi default link in the netrw syntax
2621
Aug 12, 2008 * using s:NetrwUnmarkList() more often. Filenames
2622
were being left on the global list when removed
2623
from the buffer-local lists.
2624
Aug 14, 2008 * (Joshua Clayton) an errant extra ")" was left in
2625
the rcp-handling portion of NetRead().
2626
Sep 03, 2008 * added |'cursorline'| highlighting to thin, long,
2432
2628
v132: Aug 06, 2008 * Fixed marked file-based obtain
2433
2629
Aug 08, 2008 * sourcing a file via ftp from a netrw-generated
2434
2630
buffer (or any buffer with |'nobl'|) left an