blob: 98515647a8654ef4a6f303195fbac3cc59a14346 [file] [log] [blame]
Bram Moolenaarff034192013-04-24 18:51:19 +02001*pi_netrw.txt* For Vim version 7.3. Last change: 2013 Apr 19
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
Bram Moolenaarff034192013-04-24 18:51:19 +02003 ------------------------------------------------
4 NETRW REFERENCE MANUAL by Charles E. Campbell
5 ------------------------------------------------
6Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01007 (remove NOSPAM from Campbell's email first)
8
Bram Moolenaarff034192013-04-24 18:51:19 +02009Copyright: Copyright (C) 1999-2013 Charles E Campbell *netrw-copyright*
Bram Moolenaar5b435d62012-04-05 17:33:26 +020010 The VIM LICENSE applies to the files in this package, including
11 netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and
12 syntax/netrw.vim. Like anything else that's free, netrw.vim and its
13 associated files are provided *as is* and comes with no warranty of
14 any kind, either expressed or implied. No guarantees of
15 merchantability. No guarantees of suitability for any purpose. By
16 using this plugin, you agree that in no event will the copyright
17 holder be liable for any damages resulting from the use of this
18 software. Use at your own risk!
Bram Moolenaar071d4272004-06-13 20:20:40 +000019
Bram Moolenaar1afcace2005-11-25 19:54:28 +000020
Bram Moolenaar00a927d2010-05-14 23:24:24 +020021 *dav* *ftp* *netrw-file* *rcp* *scp*
22 *davs* *http* *netrw.vim* *rsync* *sftp*
23 *fetch* *netrw* *network*
Bram Moolenaar071d4272004-06-13 20:20:40 +000024
25==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000261. Contents *netrw-contents* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +000027
Bram Moolenaarff034192013-04-24 18:51:19 +0200281. Contents..............................................|netrw-contents|
292. Starting With Netrw...................................|netrw-start|
303. Netrw Reference.......................................|netrw-ref|
31 EXTERNAL APPLICATIONS AND PROTOCOLS.................|netrw-externapp|
32 READING.............................................|netrw-read|
33 WRITING.............................................|netrw-write|
34 SOURCING............................................|netrw-source|
35 DIRECTORY LISTING...................................|netrw-dirlist|
36 CHANGING THE USERID AND PASSWORD....................|netrw-chgup|
37 VARIABLES AND SETTINGS..............................|netrw-variables|
38 PATHS...............................................|netrw-path|
394. Network-Oriented File Transfer........................|netrw-xfer|
40 NETRC...............................................|netrw-netrc|
41 PASSWORD............................................|netrw-passwd|
425. Activation............................................|netrw-activate|
436. Transparent Remote File Editing.......................|netrw-transparent|
447. Ex Commands...........................................|netrw-ex|
458. Variables and Options.................................|netrw-variables|
469. Browsing..............................................|netrw-browse|
47 Introduction To Browsing............................|netrw-intro-browse|
48 Quick Reference: Maps...............................|netrw-browse-maps|
49 Quick Reference: Commands...........................|netrw-browse-cmds|
50 Bookmarking A Directory.............................|netrw-mb|
51 Browsing............................................|netrw-cr|
52 Browsing With A Horizontally Split Window...........|netrw-o|
53 Browsing With A New Tab.............................|netrw-t|
54 Browsing With A Vertically Split Window.............|netrw-v|
55 Change Listing Style.(thin wide long tree)..........|netrw-i|
56 Changing To A Bookmarked Directory..................|netrw-gb|
57 Changing To A Predecessor Directory.................|netrw-u|
58 Changing To A Successor Directory...................|netrw-U|
59 Customizing Browsing With A User Function...........|netrw-x|
60 Deleting Bookmarks..................................|netrw-mB|
61 Deleting Files Or Directories.......................|netrw-D|
62 Directory Exploring Commands........................|netrw-explore|
63 Exploring With Stars and Patterns...................|netrw-star|
64 Displaying Information About File...................|netrw-qf|
65 Edit File Or Directory Hiding List..................|netrw-ctrl-h|
66 Editing The Sorting Sequence........................|netrw-S|
67 Forcing treatment as a file or directory............|netrw-gd| |netrw-gf|
68 Going Up............................................|netrw--|
69 Hiding Files Or Directories.........................|netrw-a|
70 Improving Browsing..................................|netrw-ssh-hack|
71 Listing Bookmarks And History.......................|netrw-qb|
72 Making A New Directory..............................|netrw-d|
73 Making The Browsing Directory The Current Directory.|netrw-c|
74 Marking Files.......................................|netrw-mf|
75 Unmarking Files.....................................|netrw-mF|
76 Marking Files By QuickFix List......................|netrw-qF|
77 Marking Files By Regular Expression.................|netrw-mr|
78 Marked Files: Arbitrary Command.....................|netrw-mx|
79 Marked Files: Compression And Decompression.........|netrw-mz|
80 Marked Files: Copying...............................|netrw-mc|
81 Marked Files: Diff..................................|netrw-md|
82 Marked Files: Editing...............................|netrw-me|
83 Marked Files: Grep..................................|netrw-mg|
84 Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh|
85 Marked Files: Moving................................|netrw-mm|
86 Marked Files: Printing..............................|netrw-mp|
87 Marked Files: Sourcing..............................|netrw-ms|
88 Marked Files: Setting the Target Directory..........|netrw-mt|
89 Marked Files: Tagging...............................|netrw-mT|
90 Marked Files: Target Directory Using Bookmarks......|netrw-Tb|
91 Marked Files: Target Directory Using History........|netrw-Th|
92 Marked Files: Unmarking.............................|netrw-mu|
93 Netrw Browser Variables.............................|netrw-browser-var|
94 Netrw Browsing And Option Incompatibilities.........|netrw-incompatible|
95 Netrw Settings Window...............................|netrw-settings-window|
96 Obtaining A File....................................|netrw-O|
97 Preview Window......................................|netrw-p|
98 Previous Window.....................................|netrw-P|
99 Refreshing The Listing..............................|netrw-ctrl-l|
100 Reversing Sorting Order.............................|netrw-r|
101 Renaming Files Or Directories.......................|netrw-R|
102 Selecting Sorting Style.............................|netrw-s|
103 Setting Editing Window..............................|netrw-C|
10410. Problems and Fixes....................................|netrw-problems|
10511. Debugging Netrw Itself................................|netrw-debug|
10612. History...............................................|netrw-history|
10713. Todo..................................................|netrw-todo|
10814. Credits...............................................|netrw-credits|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000109
Bram Moolenaar071d4272004-06-13 20:20:40 +0000110{Vi does not have any of this}
111
112==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00001132. Starting With Netrw *netrw-start* {{{1
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000114
Bram Moolenaar446cb832008-06-24 21:56:24 +0000115Netrw makes reading files, writing files, browsing over a network, and
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100116local browsing easy! First, make sure that you have plugins enabled, so
Bram Moolenaar446cb832008-06-24 21:56:24 +0000117you'll need to have at least the following in your <.vimrc>:
118(or see |netrw-activate|) >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000119
Bram Moolenaar9964e462007-05-05 17:54:07 +0000120 set nocp " 'compatible' is not set
121 filetype plugin on " plugins are enabled
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000122<
123(see |'cp'| and |:filetype-plugin-on|)
124
125Netrw supports "transparent" editing of files on other machines using urls
126(see |netrw-transparent|). As an example of this, let's assume you have an
Bram Moolenaar446cb832008-06-24 21:56:24 +0000127account on some other machine; if you can use scp, try: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000128
129 vim scp://hostname/path/to/file
130<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000131Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000132
Bram Moolenaar446cb832008-06-24 21:56:24 +0000133So, what if you have ftp, not ssh/scp? That's easy, too; try >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000134
135 vim ftp://hostname/path/to/file
136<
137Want to make ftp simpler to use? See if your ftp supports a file called
138<.netrc> -- typically it goes in your home directory, has read/write
139permissions for only the user to read (ie. not group, world, other, etc),
140and has lines resembling >
141
142 machine HOSTNAME login USERID password "PASSWORD"
143 machine HOSTNAME login USERID password "PASSWORD"
144 ...
Bram Moolenaar9964e462007-05-05 17:54:07 +0000145 default login USERID password "PASSWORD"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000146<
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200147Windows' ftp doesn't support .netrc; however, one may have in one's .vimrc: >
148
Bram Moolenaarff034192013-04-24 18:51:19 +0200149 let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
Bram Moolenaar97d62492012-11-15 21:28:22 +0100150<
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200151Netrw will substitute the host's machine name for MACHINE from the url it is
152attempting to open, and so one may specify >
153 userid
154 password
155for each site in a separate file in c:\Users\Myself\.
156
Bram Moolenaar446cb832008-06-24 21:56:24 +0000157Now about browsing -- when you just want to look around before editing a
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000158file. For browsing on your current host, just "edit" a directory: >
159
160 vim .
161 vim /home/userid/path
162<
163For browsing on a remote host, "edit" a directory (but make sure that
164the directory name is followed by a "/"): >
165
166 vim scp://hostname/
167 vim ftp://hostname/path/to/dir/
168<
169See |netrw-browse| for more!
170
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100171There are more protocols supported by netrw than just scp and ftp, too: see the
172next section, |netrw-externapp|, on how to use these external applications with
173netrw and vim.
174
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200175PREVENTING LOADING *netrw-noload*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000176
177If you want to use plugins, but for some reason don't wish to use netrw, then
178you need to avoid loading both the plugin and the autoload portions of netrw.
179You may do so by placing the following two lines in your <.vimrc>: >
180
181 :let g:loaded_netrw = 1
182 :let g:loaded_netrwPlugin = 1
183<
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000184
185==============================================================================
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001863. Netrw Reference *netrw-ref* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000187
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100188 Netrw supports several protocols in addition to scp and ftp as mentioned
Bram Moolenaar446cb832008-06-24 21:56:24 +0000189 in |netrw-start|. These include dav, fetch, http,... well, just look
190 at the list in |netrw-externapp|. Each protocol is associated with a
191 variable which holds the default command supporting that protocol.
192
193EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000194
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000195 Protocol Variable Default Value
196 -------- ---------------- -------------
Bram Moolenaaradc21822011-04-01 18:03:16 +0200197 dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable
198 dav: g:netrw_dav_cmd = "curl -o" elseif curl is available
199 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
200 ftp: *g:netrw_ftp_cmd* = "ftp"
201 http: *g:netrw_http_cmd* = "elinks" if elinks is available
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100202 http: g:netrw_http_cmd = "links" elseif links is available
203 http: g:netrw_http_cmd = "curl" elseif curl is available
204 http: g:netrw_http_cmd = "wget" elseif wget is available
205 http: g:netrw_http_cmd = "fetch" elseif fetch is available
Bram Moolenaaradc21822011-04-01 18:03:16 +0200206 rcp: *g:netrw_rcp_cmd* = "rcp"
207 rsync: *g:netrw_rsync_cmd* = "rsync -a"
208 scp: *g:netrw_scp_cmd* = "scp -q"
209 sftp: *g:netrw_sftp_cmd* = "sftp"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100210
211 *g:netrw_http_xcmd* : the option string for http://... protocols are
212 specified via this variable and may be independently overridden. By
213 default, the option arguments for the http-handling commands are: >
214
215 elinks : "-source >"
Bram Moolenaar97d62492012-11-15 21:28:22 +0100216 links : "-dump >"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100217 curl : "-o"
218 wget : "-q -O"
219 fetch : "-o"
220<
221 For example, if your system has elinks, and you'd rather see the
222 page using an attempt at rendering the text, you may wish to have >
223 let g:netrw_http_xcmd= "-dump >"
224< in your .vimrc.
225
Bram Moolenaar071d4272004-06-13 20:20:40 +0000226
Bram Moolenaar446cb832008-06-24 21:56:24 +0000227READING *netrw-read* *netrw-nread* {{{2
228
229 Generally, one may just use the url notation with a normal editing
230 command, such as >
231
232 :e ftp://[user@]machine/path
233<
234 Netrw also provides the Nread command:
235
Bram Moolenaar071d4272004-06-13 20:20:40 +0000236 :Nread ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000237 :Nread "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000238 :Nread "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000239 :Nread "machine id password path" uses ftp
240 :Nread "dav://machine[:port]/path" uses cadaver
241 :Nread "fetch://[user@]machine/path" uses fetch
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000242 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000243 :Nread "http://[user@]machine/path" uses http uses wget
244 :Nread "rcp://[user@]machine/path" uses rcp
245 :Nread "rsync://[user@]machine[:port]/path" uses rsync
246 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
247 :Nread "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000248
Bram Moolenaar446cb832008-06-24 21:56:24 +0000249WRITING *netrw-write* *netrw-nwrite* {{{2
250
251 One may just use the url notation with a normal file writing
252 command, such as >
253
254 :w ftp://[user@]machine/path
255<
256 Netrw also provides the Nwrite command:
257
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000258 :Nwrite ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000259 :Nwrite "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000260 :Nwrite "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000261 :Nwrite "machine id password path" uses ftp
262 :Nwrite "dav://machine[:port]/path" uses cadaver
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000263 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000264 :Nwrite "rcp://[user@]machine/path" uses rcp
265 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
266 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
267 :Nwrite "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000268 http: not supported!
269
Bram Moolenaar446cb832008-06-24 21:56:24 +0000270SOURCING *netrw-source* {{{2
271
272 One may just use the url notation with the normal file sourcing
273 command, such as >
274
275 :so ftp://[user@]machine/path
276<
277 Netrw also provides the Nsource command:
278
Bram Moolenaar9964e462007-05-05 17:54:07 +0000279 :Nsource ? give help
280 :Nsource "dav://machine[:port]/path" uses cadaver
281 :Nsource "fetch://[user@]machine/path" uses fetch
282 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
283 :Nsource "http://[user@]machine/path" uses http uses wget
284 :Nsource "rcp://[user@]machine/path" uses rcp
285 :Nsource "rsync://[user@]machine[:port]/path" uses rsync
286 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp
287 :Nsource "sftp://[user@]machine/path" uses sftp
288
Bram Moolenaarff034192013-04-24 18:51:19 +0200289DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +0000290
291 One may browse a directory to get a listing by simply attempting to
292 edit the directory: >
293
294 :e scp://[user]@hostname/path/
295 :e ftp://[user]@hostname/path/
296<
Bram Moolenaar251e1912011-06-19 05:09:16 +0200297 For remote directory listings (ie. those using scp or ftp), that
298 trailing "/" is necessary (the slash tells netrw to treat the argument
299 as a directory to browse instead of as a file to download).
Bram Moolenaar446cb832008-06-24 21:56:24 +0000300
Bram Moolenaar251e1912011-06-19 05:09:16 +0200301 The Nread command may also be used to accomplish this (again, that
302 trailing slash is necessary): >
Bram Moolenaar446cb832008-06-24 21:56:24 +0000303
Bram Moolenaar251e1912011-06-19 05:09:16 +0200304 :Nread [protocol]://[user]@hostname/path/
305<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000306 *netrw-login* *netrw-password*
307CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000308
Bram Moolenaar071d4272004-06-13 20:20:40 +0000309 Attempts to use ftp will prompt you for a user-id and a password.
Bram Moolenaar15146672011-10-20 22:22:38 +0200310 These will be saved in global variables |g:netrw_uid| and
311 |s:netrw_passwd|; subsequent use of ftp will re-use those two strings,
312 thereby simplifying use of ftp. However, if you need to use a
313 different user id and/or password, you'll want to call |NetUserPass()|
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000314 first. To work around the need to enter passwords, check if your ftp
315 supports a <.netrc> file in your home directory. Also see
316 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how
Bram Moolenaar15146672011-10-20 22:22:38 +0200317 to not need to use passwords for scp, look at |netrw-ssh-hack|).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000318
319 :NetUserPass [uid [password]] -- prompts as needed
320 :call NetUserPass() -- prompts for uid and password
321 :call NetUserPass("uid") -- prompts for password
322 :call NetUserPass("uid","password") -- sets global uid and password
323
Bram Moolenaar446cb832008-06-24 21:56:24 +0000324NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200325 (Also see:
326 |netrw-browser-var| : netrw browser option variables
327 |netrw-protocol| : file transfer protocol option variables
328 |netrw-settings| : additional file transfer options
329 |netrw-browser-options| : these options affect browsing directories
330 )
Bram Moolenaar9964e462007-05-05 17:54:07 +0000331
Bram Moolenaar446cb832008-06-24 21:56:24 +0000332Netrw provides a lot of variables which allow you to customize netrw to your
333preferences. One way to look at them is via the command :NetrwSettings (see
334|netrw-settings|) which will display your current netrw settings. Most such
335settings are described below, in |netrw-browser-options|, and in
336|netrw-externapp|:
Bram Moolenaar9964e462007-05-05 17:54:07 +0000337
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100338 *b:netrw_lastfile* last file Network-read/written retained on a
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200339 per-buffer basis (supports plain :Nw )
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100340
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200341 *g:netrw_bufsettings* the settings that netrw buffers have
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200342 (default) noma nomod nonu nowrap ro nobl
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200343
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100344 *g:netrw_chgwin* specifies a window number where file edits will take
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200345 place. (also see |netrw-C|)
346 (default) not defined
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100347
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200348 *g:Netrw_funcref* specifies a function (or functions) to be called when
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200349 netrw edits a file. The file is first edited, and
350 then the function reference (|Funcref|) is called.
351 This variable may also hold a |List| of Funcrefs.
352 (default) not defined. (the capital in g:Netrw...
353 is required by its holding a function reference)
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200354>
355 Example: place in .vimrc; affects all file opening
356 fun! MyFuncRef()
357 endfun
358 let g:Netrw_funcref= function("MyFuncRef")
359<
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200360 *g:netrw_ftp* if it doesn't exist, use default ftp
361 =0 use default ftp (uid password)
362 =1 use alternate ftp method (user uid password)
363 If you're having trouble with ftp, try changing the
364 value of this variable to see if the alternate ftp
365 method works for your setup.
366
367 *g:netrw_ftp_options* Chosen by default, these options are supposed to turn
368 interactive prompting off and to restrain ftp from
369 attempting auto-login upon initial connection.
370 However, it appears that not all ftp implementations
371 support this (ex. ncftp).
372 ="-i -n"
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000373
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100374 *g:netrw_ftpextracmd* default: doesn't exist
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200375 If this variable exists, then any string it contains
376 will be placed into the commands set to your ftp
377 client. As an example:
378 ="passive"
Bram Moolenaar9964e462007-05-05 17:54:07 +0000379
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000380 *g:netrw_ftpmode* ="binary" (default)
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200381 ="ascii"
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000382
Bram Moolenaar9964e462007-05-05 17:54:07 +0000383 *g:netrw_ignorenetrc* =0 (default for linux, cygwin)
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200384 =1 If you have a <.netrc> file but it doesn't work and
385 you want it ignored, then set this variable as
386 shown. (default for Windows + cmd.exe)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000387
388 *g:netrw_menu* =0 disable netrw's menu
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200389 =1 (default) netrw's menu enabled
Bram Moolenaar9964e462007-05-05 17:54:07 +0000390
391 *g:netrw_nogx* if this variable exists, then the "gx" map will not
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200392 be available (see |netrw-gx|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000393
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100394 *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200395 *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
Bram Moolenaar446cb832008-06-24 21:56:24 +0000396
397 *g:netrw_preview* =0 (default) preview window shown in a horizontally
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200398 split window
399 =1 preview window shown in a vertically split window.
400 Also affects the "previous window" (see |netrw-P|) in
401 the same way.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000402
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200403 *g:netrw_scpport* = "-P" : option to use to set port for scp
404 *g:netrw_sshport* = "-p" : option to use to set port for ssh
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000405
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200406 *g:netrw_sepchr* =\0xff
407 =\0x01 for enc == euc-jp (and perhaps it should be for
408 others, too, please let me know)
409 Separates priority codes from filenames internally.
410 See |netrw-p12|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100411
Bram Moolenaar446cb832008-06-24 21:56:24 +0000412 *g:netrw_silent* =0 : transfers done normally
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200413 =1 : transfers done silently
Bram Moolenaar446cb832008-06-24 21:56:24 +0000414
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000415 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200416 line window. This window provides reliable
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200417 delivery of messages. (default)
418 =0 : messages from netrw will use echoerr ;
419 messages don't always seem to show up this
420 way, but one doesn't have to quit the window.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000421
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000422 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200423 lines that o/s's ftp "provides" on transfers
424 =0 force normal ftp behavior (no trailing line removal)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000425
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200426 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
427 permits network browsing to use ls with time and
428 size sorting (default if windows)
429 =0 assume Windows' scp accepts windows-style paths
430 Network browsing uses dir instead of ls
431 This option is ignored if you're using unix
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000432
433 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200434 =1 use WinNT's rcp in binary mode (default)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000435
Bram Moolenaar446cb832008-06-24 21:56:24 +0000436PATHS *netrw-path* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000437
438Paths to files are generally user-directory relative for most protocols.
439It is possible that some protocol will make paths relative to some
440associated directory, however.
441>
442 example: vim scp://user@host/somefile
443 example: vim scp://user@host/subdir1/subdir2/somefile
444<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000445where "somefile" is in the "user"'s home directory. If you wish to get a
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000446file using root-relative paths, use the full path:
447>
448 example: vim scp://user@host//somefile
449 example: vim scp://user@host//subdir1/subdir2/somefile
450<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000451
452==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00004534. Network-Oriented File Transfer *netrw-xfer* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000454
455Network-oriented file transfer under Vim is implemented by a VimL-based script
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000456(<netrw.vim>) using plugin techniques. It currently supports both reading and
457writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000458dav/cadaver, rsync, or sftp.
459
460http is currently supported read-only via use of wget or fetch.
461
462<netrw.vim> is a standard plugin which acts as glue between Vim and the
463various file transfer programs. It uses autocommand events (BufReadCmd,
464FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
465
466 ex. vim ftp://hostname/path/to/file
467<
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000468The characters preceding the colon specify the protocol to use; in the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000469example, it's ftp. The <netrw.vim> script then formulates a command or a
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000470series of commands (typically ftp) which it issues to an external program
471(ftp, scp, etc) which does the actual file transfer/protocol. Files are read
472from/written to a temporary file (under Unix/Linux, /tmp/...) which the
473<netrw.vim> script will clean up.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000474
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100475Now, a word about Jan Minář's "FTP User Name and Password Disclosure"; first,
476ftp is not a secure protocol. User names and passwords are transmitted "in
477the clear" over the internet; any snooper tool can pick these up; this is not
478a netrw thing, this is a ftp thing. If you're concerned about this, please
479try to use scp or sftp instead.
480
481Netrw re-uses the user id and password during the same vim session and so long
482as the remote hostname remains the same.
483
484Jan seems to be a bit confused about how netrw handles ftp; normally multiple
485commands are performed in a "ftp session", and he seems to feel that the
486uid/password should only be retained over one ftp session. However, netrw
487does every ftp operation in a separate "ftp session"; so remembering the
488uid/password for just one "ftp session" would be the same as not remembering
489the uid/password at all. IMHO this would rapidly grow tiresome as one
490browsed remote directories, for example.
491
492On the other hand, thanks go to Jan M. for pointing out the many
493vulnerabilities that netrw (and vim itself) had had in handling "crafted"
494filenames. The |shellescape()| and |fnameescape()| functions were written in
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200495response by Bram Moolenaar to handle these sort of problems, and netrw has
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100496been modified to use them. Still, my advice is, if the "filename" looks like
497a vim command that you aren't comfortable with having executed, don't open it.
498
Bram Moolenaar9964e462007-05-05 17:54:07 +0000499 *netrw-putty* *netrw-pscp* *netrw-psftp*
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000500One may modify any protocol's implementing external application by setting a
501variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000502"scp -q"). As an example, consider using PuTTY: >
Bram Moolenaar9964e462007-05-05 17:54:07 +0000503
504 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch'
505 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000506<
Bram Moolenaar15146672011-10-20 22:22:38 +0200507(note: it has been reported that windows 7 with putty v0.6's "-batch" option
508 doesn't work, so its best to leave it off for that system)
509
Bram Moolenaar9964e462007-05-05 17:54:07 +0000510See |netrw-p8| for more about putty, pscp, psftp, etc.
511
Bram Moolenaar071d4272004-06-13 20:20:40 +0000512Ftp, an old protocol, seems to be blessed by numerous implementations.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000513Unfortunately, some implementations are noisy (ie., add junk to the end of the
514file). Thus, concerned users may decide to write a NetReadFixup() function
515that will clean up after reading with their ftp. Some Unix systems (ie.,
516FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
517not noisy and more convenient, actually, for <netrw.vim> to use.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100518Consequently, if "fetch" is available (ie. executable), it may be preferable
519to use it for ftp://... based transfers.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000520
521For rcp, scp, sftp, and http, one may use network-oriented file transfers
Bram Moolenaar83bab712005-08-01 21:58:57 +0000522transparently; ie.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000523>
524 vim rcp://[user@]machine/path
525 vim scp://[user@]machine/path
526<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100527If your ftp supports <.netrc>, then it too can be transparently used
Bram Moolenaar071d4272004-06-13 20:20:40 +0000528if the needed triad of machine name, user id, and password are present in
529that file. Your ftp must be able to use the <.netrc> file on its own, however.
530>
531 vim ftp://[user@]machine[[:#]portnumber]/path
532<
Bram Moolenaaradc21822011-04-01 18:03:16 +0200533Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses
534an option, -s:filename (filename can and probably should be a full path)
535which contains ftp commands which will be automatically run whenever ftp
536starts. You may use this feature to enter a user and password for one site: >
537 userid
538 password
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200539< *netrw-windows-netrc* *netrw-windows-s*
Bram Moolenaaradc21822011-04-01 18:03:16 +0200540If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200541netrw will substitute the current machine name requested for ftp connections
Bram Moolenaaradc21822011-04-01 18:03:16 +0200542for MACHINE. Hence one can have multiple machine.ftp files containing login
543and password for ftp. Example: >
544
Bram Moolenaarff034192013-04-24 18:51:19 +0200545 let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
546 vim ftp://myhost.somewhere.net/
Bram Moolenaaradc21822011-04-01 18:03:16 +0200547will use a file >
548 C:\Users\Myself\myhost.ftp
549<
550Often, ftp will need to query the user for the userid and password.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000551The latter will be done "silently"; ie. asterisks will show up instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000552the actually-typed-in password. Netrw will retain the userid and password
553for subsequent read/writes from the most recent transfer so subsequent
554transfers (read/write) to or from that machine will take place without
555additional prompting.
556
557 *netrw-urls*
558 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000559 | Reading | Writing | Uses |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000560 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000561 | DAV: | | |
562 | dav://host/path | | cadaver |
563 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000564 +---------------------------------+----------------------------+------------+
Bram Moolenaar446cb832008-06-24 21:56:24 +0000565 | DAV + SSL: | | |
566 | davs://host/path | | cadaver |
567 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver |
568 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000569 | FETCH: | | |
570 | fetch://[user@]host/path | | |
571 | fetch://[user@]host:http/path | Not Available | fetch |
572 | :Nread fetch://[user@]host/path| | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000573 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000574 | FILE: | | |
575 | file:///* | file:///* | |
576 | file://localhost/* | file://localhost/* | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000577 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000578 | FTP: (*3) | (*3) | |
579 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
580 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
581 | :Nread host path | :Nwrite host path | ftp+.netrc |
582 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000583 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000584 | HTTP: wget is executable: (*4) | | |
585 | http://[user@]host/path | Not Available | wget |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000586 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000587 | HTTP: fetch is executable (*4) | | |
588 | http://[user@]host/path | Not Available | fetch |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000589 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000590 | RCP: | | |
591 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000592 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000593 | RSYNC: | | |
594 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
595 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
596 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000597 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000598 | SCP: | | |
599 | scp://[user@]host/path | scp://[user@]host/path | scp |
600 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000601 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000602 | SFTP: | | |
603 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
604 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000605 +=================================+============================+============+
606
607 (*1) For an absolute path use scp://machine//path.
608
609 (*2) if <.netrc> is present, it is assumed that it will
610 work with your ftp client. Otherwise the script will
Bram Moolenaar9964e462007-05-05 17:54:07 +0000611 prompt for user-id and password.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000612
Bram Moolenaar9964e462007-05-05 17:54:07 +0000613 (*3) for ftp, "machine" may be machine#port or machine:port
Bram Moolenaar071d4272004-06-13 20:20:40 +0000614 if a different port is needed than the standard ftp port
615
616 (*4) for http:..., if wget is available it will be used. Otherwise,
617 if fetch is available it will be used.
618
619Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
620
621
622NETRC *netrw-netrc*
623
Bram Moolenaar446cb832008-06-24 21:56:24 +0000624The <.netrc> file, typically located in your home directory, contains lines
625therein which map a hostname (machine name) to the user id and password you
626prefer to use with it.
627
Bram Moolenaar071d4272004-06-13 20:20:40 +0000628The typical syntax for lines in a <.netrc> file is given as shown below.
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000629Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000630>
631 machine {full machine name} login {user-id} password "{password}"
632 default login {user-id} password "{password}"
633
634Your ftp client must handle the use of <.netrc> on its own, but if the
635<.netrc> file exists, an ftp transfer will not ask for the user-id or
636password.
637
638 Note:
639 Since this file contains passwords, make very sure nobody else can
640 read this file! Most programs will refuse to use a .netrc that is
641 readable for others. Don't forget that the system administrator can
Bram Moolenaar446cb832008-06-24 21:56:24 +0000642 still read the file! Ie. for Linux/Unix: chmod 600 .netrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000643
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200644Even though Windows' ftp clients typically do not support .netrc, netrw has
645a work-around: see |netrw-windows-s|.
646
Bram Moolenaar071d4272004-06-13 20:20:40 +0000647
648PASSWORD *netrw-passwd*
649
650The script attempts to get passwords for ftp invisibly using |inputsecret()|,
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200651a built-in Vim function. See |netrw-userpass| for how to change the password
Bram Moolenaar071d4272004-06-13 20:20:40 +0000652after one has set it.
653
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000654Unfortunately there doesn't appear to be a way for netrw to feed a password to
655scp. Thus every transfer via scp will require re-entry of the password.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000656However, |netrw-ssh-hack| can help with this problem.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000657
658
659==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00006605. Activation *netrw-activate* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000661
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000662Network-oriented file transfers are available by default whenever Vim's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000663|'nocompatible'| mode is enabled. Netrw's script files reside in your
664system's plugin, autoload, and syntax directories; just the
665plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
666vim. The main script in autoload/netrw.vim is only loaded when you actually
667use netrw. I suggest that, at a minimum, you have at least the following in
668your <.vimrc> customization file: >
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000669
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000670 set nocp
671 if version >= 600
672 filetype plugin indent on
673 endif
674<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000675
676==============================================================================
Bram Moolenaaradc21822011-04-01 18:03:16 +02006776. Transparent Remote File Editing *netrw-transparent* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000678
679Transparent file transfers occur whenever a regular file read or write
Bram Moolenaar446cb832008-06-24 21:56:24 +0000680(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
681events) is made. Thus one may read, write, or source files across networks
682just as easily as if they were local files! >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000683
684 vim ftp://[user@]machine/path
685 ...
686 :wq
687
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000688See |netrw-activate| for more on how to encourage your vim to use plugins
689such as netrw.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000690
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000691
Bram Moolenaar071d4272004-06-13 20:20:40 +0000692==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00006937. Ex Commands *netrw-ex* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000694
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000695The usual read/write commands are supported. There are also a few
Bram Moolenaar446cb832008-06-24 21:56:24 +0000696additional commands available. Often you won't need to use Nwrite or
Bram Moolenaar9964e462007-05-05 17:54:07 +0000697Nread as shown in |netrw-transparent| (ie. simply use >
698 :e url
699 :r url
700 :w url
701instead, as appropriate) -- see |netrw-urls|. In the explanations
702below, a {netfile} is an url to a remote file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000703
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200704 *:Nwrite* *:Nw*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000705:[range]Nw[rite] Write the specified lines to the current
Bram Moolenaar071d4272004-06-13 20:20:40 +0000706 file as specified in b:netrw_lastfile.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200707 (related: |netrw-nwrite|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000708
Bram Moolenaar446cb832008-06-24 21:56:24 +0000709:[range]Nw[rite] {netfile} [{netfile}]...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000710 Write the specified lines to the {netfile}.
711
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200712 *:Nread* *:Nr*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100713:Nr[ead] Read the lines from the file specified in b:netrw_lastfile
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200714 into the current buffer. (related: |netrw-nread|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000715
Bram Moolenaar446cb832008-06-24 21:56:24 +0000716:Nr[ead] {netfile} {netfile}...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000717 Read the {netfile} after the current line.
718
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200719 *:Nsource* *:Ns*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000720:Ns[ource] {netfile}
Bram Moolenaar9964e462007-05-05 17:54:07 +0000721 Source the {netfile}.
722 To start up vim using a remote .vimrc, one may use
723 the following (all on one line) (tnx to Antoine Mechelynck) >
724 vim -u NORC -N
725 --cmd "runtime plugin/netrwPlugin.vim"
726 --cmd "source scp://HOSTNAME/.vimrc"
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200727< (related: |netrw-source|)
728
729:call NetUserPass() *NetUserPass()*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000730 If g:netrw_uid and s:netrw_passwd don't exist,
731 this function will query the user for them.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200732 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000733
734:call NetUserPass("userid")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000735 This call will set the g:netrw_uid and, if
Bram Moolenaar071d4272004-06-13 20:20:40 +0000736 the password doesn't exist, will query the user for it.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200737 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000738
739:call NetUserPass("userid","passwd")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000740 This call will set both the g:netrw_uid and s:netrw_passwd.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000741 The user-id and password are used by ftp transfers. One may
Bram Moolenaar446cb832008-06-24 21:56:24 +0000742 effectively remove the user-id and password by using empty
743 strings (ie. "").
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200744 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000745
Bram Moolenaar9964e462007-05-05 17:54:07 +0000746:NetrwSettings This command is described in |netrw-settings| -- used to
747 display netrw settings and change netrw behavior.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000748
Bram Moolenaar071d4272004-06-13 20:20:40 +0000749
750==============================================================================
Bram Moolenaar5b435d62012-04-05 17:33:26 +02007518. Variables and Options *netrw-var* *netrw-settings* {{{1
Bram Moolenaar446cb832008-06-24 21:56:24 +0000752
Bram Moolenaar15146672011-10-20 22:22:38 +0200753(also see: |netrw-options| |netrw-variables| |netrw-protocol|
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200754 |netrw-browser-settings| |netrw-browser-options| )
Bram Moolenaar071d4272004-06-13 20:20:40 +0000755
Bram Moolenaar9964e462007-05-05 17:54:07 +0000756The <netrw.vim> script provides several variables which act as options to
Bram Moolenaar446cb832008-06-24 21:56:24 +0000757affect <netrw.vim>'s file transfer behavior. These variables typically may be
758set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
Bram Moolenaar15146672011-10-20 22:22:38 +0200759 *netrw-options*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000760>
Bram Moolenaar9964e462007-05-05 17:54:07 +0000761 -------------
762 Netrw Options
763 -------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000764 Option Meaning
765 -------------- -----------------------------------------------
766<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000767 b:netrw_col Holds current cursor position (during NetWrite)
768 g:netrw_cygwin =1 assume scp under windows is from cygwin
769 (default/windows)
770 =0 assume scp under windows accepts windows
771 style paths (default/else)
772 g:netrw_ftp =0 use default ftp (uid password)
773 g:netrw_ftpmode ="binary" (default)
774 ="ascii" (your choice)
775 g:netrw_ignorenetrc =1 (default)
776 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000777 want it used, then set this variable. Its
778 mere existence is enough to cause <.netrc>
779 to be ignored.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000780 b:netrw_lastfile Holds latest method/machine/path.
781 b:netrw_line Holds current line number (during NetWrite)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000782 g:netrw_silent =0 transfers done normally
783 =1 transfers done silently
784 g:netrw_uid Holds current user-id for ftp.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000785 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
786 =1 use WinNT/2K/XP's rcp, binary mode
787 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
788 =1 use default method to do ftp >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000789 -----------------------------------------------------------------------
790<
Bram Moolenaar15146672011-10-20 22:22:38 +0200791 *netrw-internal-variables*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000792The script will also make use of the following variables internally, albeit
793temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000794>
795 -------------------
796 Temporary Variables
797 -------------------
798 Variable Meaning
799 -------- ------------------------------------
800<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100801 b:netrw_method Index indicating rcp/ftp+.netrc/ftp
802 w:netrw_method (same as b:netrw_method)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000803 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100804 b:netrw_fname Holds filename being accessed >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000805 ------------------------------------------------------------
806<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000807 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000808
809Netrw supports a number of protocols. These protocols are invoked using the
810variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000811>
812 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000813 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000814 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000815 Option Type Setting Meaning
816 --------- -------- -------------- ---------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000817<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000818 netrw_ftp variable =doesn't exist userid set by "user userid"
819 =0 userid set by "user userid"
820 =1 userid set by "userid"
821 NetReadFixup function =doesn't exist no change
822 =exists Allows user to have files
823 read via ftp automatically
824 transformed however they wish
825 by NetReadFixup()
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100826 g:netrw_dav_cmd variable ="cadaver" if cadaver is executable
827 g:netrw_dav_cmd variable ="curl -o" elseif curl is executable
Bram Moolenaar9964e462007-05-05 17:54:07 +0000828 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
Bram Moolenaar071d4272004-06-13 20:20:40 +0000829 g:netrw_ftp_cmd variable ="ftp"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000830 g:netrw_http_cmd variable ="fetch -o" if fetch is available
831 g:netrw_http_cmd variable ="wget -O" else if wget is available
Bram Moolenaar9964e462007-05-05 17:54:07 +0000832 g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000833 g:netrw_rcp_cmd variable ="rcp"
834 g:netrw_rsync_cmd variable ="rsync -a"
835 g:netrw_scp_cmd variable ="scp -q"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000836 g:netrw_sftp_cmd variable ="sftp" >
837 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000838<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000839 *netrw-ftp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000840
Bram Moolenaar9964e462007-05-05 17:54:07 +0000841The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|)
842specify the external program to use handle the ftp protocol. They may
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200843include command line options (such as -p for passive mode). Example: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000844
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200845 let g:netrw_ftp_cmd= "ftp -p"
846<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000847Browsing is supported by using the |g:netrw_list_cmd|; the substring
848"HOSTNAME" will be changed via substitution with whatever the current request
849is for a hostname.
850
851Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's
852that give trouble . In order to best understand how to use these options if
853ftp is giving you troubles, a bit of discussion is provided on how netrw does
854ftp reads.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000855
856For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000857temporary file:
858>
859 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
860 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000861<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000862 open machine [port] open machine [port]
863 user userid password userid password
864 [g:netrw_ftpmode] password
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200865 [g:netrw_ftpextracmd] [g:netrw_ftpmode]
Bram Moolenaar9964e462007-05-05 17:54:07 +0000866 get filename tempfile [g:netrw_extracmd]
867 get filename tempfile >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000868 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000869<
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200870The |g:netrw_ftpmode| and |g:netrw_ftpextracmd| are optional.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000871
Bram Moolenaar071d4272004-06-13 20:20:40 +0000872Netrw then executes the lines above by use of a filter:
873>
874 :%! {g:netrw_ftp_cmd} -i [-n]
875<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000876where
877 g:netrw_ftp_cmd is usually "ftp",
878 -i tells ftp not to be interactive
879 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
880
881If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000882userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000883The temporary file is then read into the main editing session window that
884requested it and the temporary file deleted.
885
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000886If your ftp doesn't accept the "user" command and immediately just demands a
887userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000888
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000889 *netrw-cadaver*
890To handle the SSL certificate dialog for untrusted servers, one may pull
891down the certificate and place it into /usr/ssl/cert.pem. This operation
892renders the server treatment as "trusted".
893
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000894 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000895If your ftp for whatever reason generates unwanted lines (such as AUTH
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100896messages) you may write a NetReadFixup() function:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000897>
898 function! NetReadFixup(method,line1,line2)
899 " a:line1: first new line in current file
900 " a:line2: last new line in current file
901 if a:method == 1 "rcp
902 elseif a:method == 2 "ftp + <.netrc>
903 elseif a:method == 3 "ftp + machine,uid,password,filename
904 elseif a:method == 4 "scp
905 elseif a:method == 5 "http/wget
906 elseif a:method == 6 "dav/cadaver
907 elseif a:method == 7 "rsync
908 elseif a:method == 8 "fetch
909 elseif a:method == 9 "sftp
Bram Moolenaar9964e462007-05-05 17:54:07 +0000910 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000911 endif
912 endfunction
913>
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000914The NetReadFixup() function will be called if it exists and thus allows you to
915customize your reading process. As a further example, <netrw.vim> contains
916just such a function to handle Windows 95 ftp. For whatever reason, Windows
91795's ftp dumps four blank lines at the end of a transfer, and so it is
918desirable to automate their removal. Here's some code taken from <netrw.vim>
919itself:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000920>
921 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000922 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000923 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000924 let fourblanklines= line2 - 3
925 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000926 endif
927 endfunction
928 endif
929>
930
931==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00009329. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100933 *netrw-browser* *netrw-dir* *netrw-list*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000934
Bram Moolenaar446cb832008-06-24 21:56:24 +0000935INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2
936 (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000937
Bram Moolenaar446cb832008-06-24 21:56:24 +0000938Netrw supports the browsing of directories on your local system and on remote
939hosts; browsing includes listing files and directories, entering directories,
940editing files therein, deleting files/directories, making new directories,
941moving (renaming) files and directories, copying files and directories, etc.
942One may mark files and execute any system command on them! The Netrw browser
943generally implements the previous explorer's maps and commands for remote
944directories, although details (such as pertinent global variable names)
945necessarily differ. To browse a directory, simply "edit" it! >
Bram Moolenaar269ec652004-07-29 08:43:53 +0000946
Bram Moolenaar446cb832008-06-24 21:56:24 +0000947 vim /your/directory/
948 vim .
949 vim c:\your\directory\
950<
951(Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t|
952 |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| )
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000953
954The Netrw remote file and directory browser handles two protocols: ssh and
Bram Moolenaar446cb832008-06-24 21:56:24 +0000955ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp
956in its remote browsing. Specifying any other protocol will cause it to be
957used for file transfers; but the ssh protocol will be used to do remote
958browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000959
Bram Moolenaar446cb832008-06-24 21:56:24 +0000960To use Netrw's remote directory browser, simply attempt to read a "file" with
961a trailing slash and it will be interpreted as a request to list a directory:
962>
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000963 vim [protocol]://[user@]hostname/path/
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000964<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000965where [protocol] is typically scp or ftp. As an example, try: >
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000966
Bram Moolenaar446cb832008-06-24 21:56:24 +0000967 vim ftp://ftp.home.vim.org/pub/vim/
968<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100969For local directories, the trailing slash is not required. Again, because it's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000970easy to miss: to browse remote directories, the url must terminate with a
971slash!
Bram Moolenaar83bab712005-08-01 21:58:57 +0000972
Bram Moolenaar446cb832008-06-24 21:56:24 +0000973If you'd like to avoid entering the password repeatedly for remote directory
974listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with
975ftp, see |netrw-netrc| (if your ftp supports it).
Bram Moolenaar83bab712005-08-01 21:58:57 +0000976
Bram Moolenaar446cb832008-06-24 21:56:24 +0000977There are several things you can do to affect the browser's display of files:
Bram Moolenaar83bab712005-08-01 21:58:57 +0000978
Bram Moolenaar446cb832008-06-24 21:56:24 +0000979 * To change the listing style, press the "i" key (|netrw-i|).
980 Currently there are four styles: thin, long, wide, and tree.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100981 To make that change "permanent", see |g:netrw_liststyle|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000982
Bram Moolenaar446cb832008-06-24 21:56:24 +0000983 * To hide files (don't want to see those xyz~ files anymore?) see
984 |netrw-ctrl-h|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000985
Bram Moolenaar446cb832008-06-24 21:56:24 +0000986 * Press s to sort files by name, time, or size.
987
988See |netrw-browse-cmds| for all the things you can do with netrw!
989
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100990 *netrw-getftype* *netrw-filigree* *netrw-ftype*
991The |getftype()| function is used to append a bit of filigree to indicate
992filetype to locally listed files:
993
994 directory : /
995 executable : *
996 fifo : |
997 links : @
998 sockets : =
999
1000The filigree also affects the |g:netrw_sort_sequence|.
1001
Bram Moolenaar446cb832008-06-24 21:56:24 +00001002
1003QUICK HELP *netrw-quickhelp* {{{2
1004 (Use ctrl-] to select a topic)~
1005 Intro to Browsing...............................|netrw-intro-browse|
1006 Quick Reference: Maps.........................|netrw-quickmap|
1007 Quick Reference: Commands.....................|netrw-browse-cmds|
1008 Hiding
1009 Edit hiding list..............................|netrw-ctrl-h|
1010 Hiding Files or Directories...................|netrw-a|
1011 Hiding/Unhiding by suffix.....................|netrw-mh|
1012 Hiding dot-files.............................|netrw-gh|
1013 Listing Style
1014 Select listing style (thin/long/wide/tree)....|netrw-i|
1015 Associated setting variable...................|g:netrw_liststyle|
1016 Shell command used to perform listing.........|g:netrw_list_cmd|
1017 Quick file info...............................|netrw-qf|
1018 Sorted by
1019 Select sorting style (name/time/size).........|netrw-s|
1020 Editing the sorting sequence..................|netrw-S|
Bram Moolenaarc236c162008-07-13 17:41:49 +00001021 Sorting options...............................|g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001022 Associated setting variable...................|g:netrw_sort_sequence|
1023 Reverse sorting order.........................|netrw-r|
1024
1025
1026 *netrw-quickmap* *netrw-quickmaps*
1027QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001028>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001029 --- ----------------- ----
1030 Map Quick Explanation Link
1031 --- ----------------- ----
1032< <F1> Causes Netrw to issue help
1033 <cr> Netrw will enter the directory or read the file |netrw-cr|
1034 <del> Netrw will attempt to remove the file/directory |netrw-del|
1035 - Makes Netrw go up one directory |netrw--|
1036 a Toggles between normal display, |netrw-a|
1037 hiding (suppress display of files matching g:netrw_list_hide)
1038 showing (display only files which match g:netrw_list_hide)
1039 c Make browsing directory the current directory |netrw-c|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001040 C Setting the editing window |netrw-C|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001041 d Make a directory |netrw-d|
1042 D Attempt to remove the file(s)/directory(ies) |netrw-D|
1043 gb Go to previous bookmarked directory |netrw-gb|
1044 gh Quick hide/unhide of dot-files |netrw-gh|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001045 <c-h> Edit file hiding list |netrw-ctrl-h|
1046 i Cycle between thin, long, wide, and tree listings |netrw-i|
1047 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
1048 mb Bookmark current directory |netrw-mb|
1049 mc Copy marked files to marked-file target directory |netrw-mc|
1050 md Apply diff to marked files (up to 3) |netrw-md|
1051 me Place marked files on arg list and edit them |netrw-me|
1052 mf Mark a file |netrw-mf|
1053 mh Toggle marked file suffices' presence on hiding list |netrw-mh|
1054 mm Move marked files to marked-file target directory |netrw-mm|
1055 mp Print marked files |netrw-mp|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001056 mr Mark files satisfying a shell-style |regexp| |netrw-mr|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001057 mt Current browsing directory becomes markfile target |netrw-mt|
1058 mT Apply ctags to marked files |netrw-mT|
1059 mu Unmark all marked files |netrw-mu|
1060 mx Apply arbitrary shell command to marked files |netrw-mx|
1061 mz Compress/decompress marked files |netrw-mz|
1062 o Enter the file/directory under the cursor in a new |netrw-o|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001063 browser window. A horizontal split is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001064 O Obtain a file specified by cursor |netrw-O|
1065 p Preview the file |netrw-p|
1066 P Browse in the previously used window |netrw-P|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001067 qb List bookmarked directories and history |netrw-qb|
1068 qf Display information on file |netrw-qf|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001069 r Reverse sorting order |netrw-r|
1070 R Rename the designed file(s)/directory(ies) |netrw-R|
1071 s Select sorting style: by name, time, or file size |netrw-s|
1072 S Specify suffix priority for name-sorting |netrw-S|
1073 t Enter the file/directory under the cursor in a new tab|netrw-t|
1074 u Change to recently-visited directory |netrw-u|
1075 U Change to subsequently-visited directory |netrw-U|
1076 v Enter the file/directory under the cursor in a new |netrw-v|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001077 browser window. A vertical split is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001078 x View file with an associated program |netrw-x|
Bram Moolenaar97d62492012-11-15 21:28:22 +01001079 X Execute filename under cursor via |system()| |netrw-X|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001080
Bram Moolenaarc236c162008-07-13 17:41:49 +00001081 % Open a new file in netrw's current directory |netrw-%|
1082
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001083 *netrw-mouse* *netrw-leftmouse* *netrw-middlemouse* *netrw-rightmouse*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001084 <leftmouse> (gvim only) selects word under mouse as if a <cr>
1085 had been pressed (ie. edit file, change directory)
1086 <middlemouse> (gvim only) same as P selecting word under mouse;
1087 see |netrw-P|
1088 <rightmouse> (gvim only) delete file/directory using word under
1089 mouse
1090 <2-leftmouse> (gvim only) when:
1091 * in a netrw-selected file, AND
1092 * |g:netrw_retmap| == 1 AND
Bram Moolenaarff034192013-04-24 18:51:19 +02001093 * the user doesn't already have a <2-leftmouse>
1094 mapping defined before netrw is autoloaded,
Bram Moolenaar446cb832008-06-24 21:56:24 +00001095 then a double clicked leftmouse button will return
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001096 to the netrw browser window. See |g:netrw_retmap|.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001097 <s-leftmouse> (gvim only) like mf, will mark files
1098
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001099 (to disable mouse buttons while browsing: |g:netrw_mousemaps|)
1100
Bram Moolenaar446cb832008-06-24 21:56:24 +00001101 *netrw-quickcom* *netrw-quickcoms*
1102QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
1103 :NetrwClean[!] ...........................................|netrw-clean|
1104 :NetrwSettings ...........................................|netrw-settings|
1105 :Explore[!] [dir] Explore directory of current file......|netrw-explore|
1106 :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
1107 :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1108 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1109 :Rexplore Return to Explorer.....................|netrw-explore|
1110 :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore|
1111 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
1112 :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1113
1114BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001115
Bram Moolenaar446cb832008-06-24 21:56:24 +00001116One may easily "bookmark" a directory by using >
1117
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001118 mb
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001119<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001120Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are
1121kept in sorted order.
1122
1123Related Topics:
1124 |netrw-gb| how to return (go) to a bookmark
1125 |netrw-mB| how to delete bookmarks
1126 |netrw-qb| how to list bookmarks
Bram Moolenaar4a85b412006-04-23 22:40:29 +00001127
1128
Bram Moolenaar446cb832008-06-24 21:56:24 +00001129BROWSING *netrw-cr* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001130
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001131Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001132Hitting the <cr> (the return key) will select the file or directory.
1133Directories will themselves be listed, and files will be opened using the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001134protocol given in the original read request.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001135
Bram Moolenaar446cb832008-06-24 21:56:24 +00001136 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that
1137 two or more spaces delimit filenames and directory names for the long and
1138 wide listing formats. Thus, if your filename or directory name has two or
1139 more sequential spaces embedded in it, or any trailing spaces, then you'll
1140 need to use the "thin" format to select it.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001141
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001142The |g:netrw_browse_split| option, which is zero by default, may be used to
Bram Moolenaar446cb832008-06-24 21:56:24 +00001143cause the opening of files to be done in a new window or tab instead of the
1144default. When the option is one or two, the splitting will be taken
1145horizontally or vertically, respectively. When the option is set to three, a
1146<cr> will cause the file to appear in a new tab.
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001147
Bram Moolenaar83bab712005-08-01 21:58:57 +00001148
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001149When using the gui (gvim), one may select a file by pressing the <leftmouse>
1150button. In addition, if
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001151
Bram Moolenaar446cb832008-06-24 21:56:24 +00001152 *|g:netrw_retmap| == 1 AND (its default value is 0)
1153 * in a netrw-selected file, AND
1154 * the user doesn't already have a <2-leftmouse> mapping defined before
1155 netrw is loaded
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001156
Bram Moolenaar446cb832008-06-24 21:56:24 +00001157then a doubly-clicked leftmouse button will return to the netrw browser
1158window.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001159
Bram Moolenaar446cb832008-06-24 21:56:24 +00001160Netrw attempts to speed up browsing, especially for remote browsing where one
1161may have to enter passwords, by keeping and re-using previously obtained
1162directory listing buffers. The |g:netrw_fastbrowse| variable is used to
1163control this behavior; one may have slow browsing (no buffer re-use), medium
1164speed browsing (re-use directory buffer listings only for remote directories),
1165and fast browsing (re-use directory buffer listings as often as possible).
1166The price for such re-use is that when changes are made (such as new files
1167are introduced into a directory), the listing may become out-of-date. One may
1168always refresh directory listing buffers by pressing ctrl-L (see
1169|netrw-ctrl-l|).
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001170
1171
Bram Moolenaar446cb832008-06-24 21:56:24 +00001172Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
1173Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse|
1174 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1175 |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd|
1176 |g:netrw_ssh_browse_reject| |g:netrw_use_noswf|
1177
1178
1179BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2
1180
1181Normally one enters a file or directory using the <cr>. However, the "o" map
1182allows one to open a new window to hold the new directory listing or file. A
1183horizontal split is used. (for vertical splitting, see |netrw-v|)
1184
1185Normally, the o key splits the window horizontally with the new window and
Bram Moolenaar15146672011-10-20 22:22:38 +02001186cursor at the top.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001187
1188Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
1189
Bram Moolenaarff034192013-04-24 18:51:19 +02001190Related Actions |netrw-cr| |netrw-p| |netrw-t| |netrw-v|
Bram Moolenaar15146672011-10-20 22:22:38 +02001191Associated setting variables:
1192 |g:netrw_alto| control above/below splitting
1193 |g:netrw_winsize| control initial sizing
Bram Moolenaar446cb832008-06-24 21:56:24 +00001194
Bram Moolenaarff034192013-04-24 18:51:19 +02001195BROWSING WITH A NEW TAB *netrw-t*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001196
1197Normally one enters a file or directory using the <cr>. The "t" map
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001198allows one to open a new window holding the new directory listing or file in
Bram Moolenaarff034192013-04-24 18:51:19 +02001199a new tab.
1200
1201If you'd like to have the new listing in a background tab, use |gT|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001202
Bram Moolenaar15146672011-10-20 22:22:38 +02001203Related Actions |netrw-cr| |netrw-o| |netrw-p| |netrw-v|
1204Associated setting variables:
1205 |g:netrw_winsize| control initial sizing
Bram Moolenaar446cb832008-06-24 21:56:24 +00001206
1207BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2
1208
1209Normally one enters a file or directory using the <cr>. However, the "v" map
1210allows one to open a new window to hold the new directory listing or file. A
1211vertical split is used. (for horizontal splitting, see |netrw-o|)
1212
1213Normally, the v key splits the window vertically with the new window and
Bram Moolenaar15146672011-10-20 22:22:38 +02001214cursor at the left.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001215
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001216There is only one tree listing buffer; using "v" on a displayed subdirectory
Bram Moolenaar446cb832008-06-24 21:56:24 +00001217will split the screen, but the same buffer will be shown twice.
1218
1219Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
1220
Bram Moolenaarff034192013-04-24 18:51:19 +02001221Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
Bram Moolenaar15146672011-10-20 22:22:38 +02001222Associated setting variables:
1223 |g:netrw_altv| control right/left splitting
1224 |g:netrw_winsize| control initial sizing
1225
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001226
1227CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001228
Bram Moolenaar9964e462007-05-05 17:54:07 +00001229The "i" map cycles between the thin, long, wide, and tree listing formats.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001230
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001231The thin listing format gives just the files' and directories' names.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001232
Bram Moolenaar8299df92004-07-10 09:47:34 +00001233The long listing is either based on the "ls" command via ssh for remote
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001234directories or displays the filename, file size (in bytes), and the time and
1235date of last modification for local directories. With the long listing
1236format, netrw is not able to recognize filenames which have trailing spaces.
1237Use the thin listing format for such files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001238
Bram Moolenaar9964e462007-05-05 17:54:07 +00001239The wide listing format uses two or more contiguous spaces to delineate
1240filenames; when using that format, netrw won't be able to recognize or use
1241filenames which have two or more contiguous spaces embedded in the name or any
1242trailing spaces. The thin listing format will, however, work with such files.
1243This listing format is the most compact.
1244
1245The tree listing format has a top directory followed by files and directories
1246preceded by a "|". One may open and close directories by pressing the <cr>
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001247key while atop the directory name.
1248
1249One may make a preferred listing style your default; see |g:netrw_liststyle|.
1250As an example, by putting the following line in your .vimrc, >
1251 let g:netrw_liststyle= 4
1252the tree style will become your default listing style.
Bram Moolenaar8299df92004-07-10 09:47:34 +00001253
Bram Moolenaar5b435d62012-04-05 17:33:26 +02001254One typical way to use the netrw tree display is to: >
1255
1256 vim .
1257 (use i until a tree display shows)
1258 navigate to a file
1259 v (edit as desired in vertically split window)
1260 ctrl-w h (to return to the netrw listing)
1261 P (edit newly selected file in the previous window)
1262 ctrl-w h (to return to the netrw listing)
1263 P (edit newly selected file in the previous window)
1264 ...etc...
1265<
Bram Moolenaar446cb832008-06-24 21:56:24 +00001266Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
1267 |g:netrw_timefmt| |g:netrw_list_cmd|
Bram Moolenaar8299df92004-07-10 09:47:34 +00001268
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001269CHANGE FILE PERMISSION *netrw-gp* {{{2
1270
1271"gp" will ask you for a new permission for the file named under the cursor.
1272Currently, this only works for local files.
1273
1274Associated setting variables: |g:netrw_chgperm|
1275
Bram Moolenaar83bab712005-08-01 21:58:57 +00001276
Bram Moolenaar446cb832008-06-24 21:56:24 +00001277CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2
Bram Moolenaar843ee412004-06-30 16:16:41 +00001278
Bram Moolenaar446cb832008-06-24 21:56:24 +00001279To change directory back to a bookmarked directory, use
Bram Moolenaar843ee412004-06-30 16:16:41 +00001280
Bram Moolenaar446cb832008-06-24 21:56:24 +00001281 {cnt}gb
Bram Moolenaar843ee412004-06-30 16:16:41 +00001282
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001283Any count may be used to reference any of the bookmarks.
Bram Moolenaarff034192013-04-24 18:51:19 +02001284Note that |netrw-qb| shows both bookmarks and history; to go
1285to a location stored in the history see |netrw-u| and |netrw-U|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001286
1287Related Topics:
1288 |netrw-mB| how to delete bookmarks
1289 |netrw-mb| how to make a bookmark
1290 |netrw-qb| how to list bookmarks
Bram Moolenaar843ee412004-06-30 16:16:41 +00001291
Bram Moolenaar843ee412004-06-30 16:16:41 +00001292
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001293CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001294
1295Every time you change to a new directory (new for the current session),
1296netrw will save the directory in a recently-visited directory history
Bram Moolenaaradc21822011-04-01 18:03:16 +02001297list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001298"u" map, one can change to an earlier directory (predecessor). To do
1299the opposite, see |netrw-U|.
1300
Bram Moolenaarff034192013-04-24 18:51:19 +02001301The "u" map also accepts counts to go back in the history several slots.
1302For your convenience, |netrw-qb| lists the history number which can be
1303re-used in that count.
1304
1305See |g:netrw_dirhistmax| for how to control the quantity of history stack
1306slots.
1307
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001308
Bram Moolenaar446cb832008-06-24 21:56:24 +00001309CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001310
1311With the "U" map, one can change to a later directory (successor).
1312This map is the opposite of the "u" map. (see |netrw-u|) Use the
Bram Moolenaar446cb832008-06-24 21:56:24 +00001313q map to list both the bookmarks and history. (see |netrw-qb|)
1314
Bram Moolenaarff034192013-04-24 18:51:19 +02001315The "U" map also accepts counts to go forward in the history several slots.
1316
1317See |g:netrw_dirhistmax| for how to control the quantity of history stack
1318slots.
1319
Bram Moolenaar446cb832008-06-24 21:56:24 +00001320
1321NETRW CLEAN *netrw-clean* *:NetrwClean*
1322
1323With :NetrwClean one may easily remove netrw from one's home directory;
1324more precisely, from the first directory on your |'runtimepath'|.
1325
1326With :NetrwClean!, netrw will remove netrw from all directories on your
1327|'runtimepath'|.
1328
1329With either form of the command, netrw will first ask for confirmation
1330that the removal is in fact what you want to do. If netrw doesn't have
1331permission to remove a file, it will issue an error message.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001332
Bram Moolenaar9964e462007-05-05 17:54:07 +00001333 *netrw-gx*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001334CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2
Bram Moolenaar9964e462007-05-05 17:54:07 +00001335 (also see |netrw_filehandler|)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001336
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001337Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
1338best seen with a special handler (ie. a tool provided with your computer).
1339Netrw allows one to invoke such special handlers by: >
1340
1341 * when Exploring, hit the "x" key
1342 * when editing, hit gx with the cursor atop the special filename
Bram Moolenaar9964e462007-05-05 17:54:07 +00001343< (not available if the |g:netrw_nogx| variable exists)
1344
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001345Netrw determines which special handler by the following method:
1346
1347 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
1348 view files. Examples of useful settings (place into your <.vimrc>): >
1349
1350 :let g:netrw_browsex_viewer= "kfmclient exec"
1351< or >
1352 :let g:netrw_browsex_viewer= "gnome-open"
1353<
1354 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
1355 invoked first (see |netrw_filehandler|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001356
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001357 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001358 * for Gnome (with gnome-open): gnome-open is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001359 * for KDE (with kfmclient) : kfmclient is used.
1360 * for Mac OS X : open is used.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001361 * otherwise the netrwFileHandler plugin is used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001362
1363The file's suffix is used by these various approaches to determine an
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001364appropriate application to use to "handle" these files. Such things as
1365OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
1366*.eps) can be handled.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001367
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001368 *netrw_filehandler*
Bram Moolenaar9964e462007-05-05 17:54:07 +00001369
1370The "x" map applies a function to a file, based on its extension. Of course,
1371the handler function must exist for it to be called!
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001372>
1373 Ex. mypgm.html x ->
Bram Moolenaar9964e462007-05-05 17:54:07 +00001374 NFH_html("scp://user@host/some/path/mypgm.html")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001375<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001376Users may write their own netrw File Handler functions to support more
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001377suffixes with special handling. See <autoload/netrwFileHandlers.vim> for
Bram Moolenaar9964e462007-05-05 17:54:07 +00001378examples on how to make file handler functions. As an example: >
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001379
Bram Moolenaar9964e462007-05-05 17:54:07 +00001380 " NFH_suffix(filename)
1381 fun! NFH_suffix(filename)
1382 ..do something special with filename..
1383 endfun
1384<
1385These functions need to be defined in some file in your .vim/plugin
1386(vimfiles\plugin) directory. Vim's function names may not have punctuation
1387characters (except for the underscore) in them. To support suffices that
1388contain such characters, netrw will first convert the suffix using the
1389following table: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001390
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001391 @ -> AT ! -> EXCLAMATION % -> PERCENT
1392 : -> COLON = -> EQUAL ? -> QUESTION
Bram Moolenaar9964e462007-05-05 17:54:07 +00001393 , -> COMMA - -> MINUS ; -> SEMICOLON
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001394 $ -> DOLLAR + -> PLUS ~ -> TILDE
1395<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001396So, for example: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001397
Bram Moolenaar9964e462007-05-05 17:54:07 +00001398 file.rcs,v -> NFH_rcsCOMMAv()
1399<
1400If more such translations are necessary, please send me email: >
1401 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
1402with a request.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001403
Bram Moolenaar446cb832008-06-24 21:56:24 +00001404Associated setting variable: |g:netrw_browsex_viewer|
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001405
Bram Moolenaar446cb832008-06-24 21:56:24 +00001406 *netrw-curdir*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001407DELETING BOOKMARKS *netrw-mB* {{{2
1408
1409To delete a bookmark, use >
1410
1411 {cnt}mB
1412<
1413Related Topics:
1414 |netrw-gb| how to return (go) to a bookmark
1415 |netrw-mb| how to make a bookmark
1416 |netrw-qb| how to list bookmarks
1417
1418
Bram Moolenaar446cb832008-06-24 21:56:24 +00001419DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001420
Bram Moolenaar446cb832008-06-24 21:56:24 +00001421If files have not been marked with |netrw-mf|: (local marked file list)
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001422
Bram Moolenaar446cb832008-06-24 21:56:24 +00001423 Deleting/removing files and directories involves moving the cursor to the
1424 file/directory to be deleted and pressing "D". Directories must be empty
1425 first before they can be successfully removed. If the directory is a
1426 softlink to a directory, then netrw will make two requests to remove the
1427 directory before succeeding. Netrw will ask for confirmation before doing
1428 the removal(s). You may select a range of lines with the "V" command
1429 (visual selection), and then pressing "D".
Bram Moolenaar9964e462007-05-05 17:54:07 +00001430
Bram Moolenaar446cb832008-06-24 21:56:24 +00001431If files have been marked with |netrw-mf|: (local marked file list)
1432
1433 Marked files (and empty directories) will be deleted; again, you'll be
1434 asked to confirm the deletion before it actually takes place.
1435
1436The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
1437used to control the attempts to remove files and directories. The
1438g:netrw_rm_cmd is used with files, and its default value is:
1439
1440 g:netrw_rm_cmd: ssh HOSTNAME rm
1441
1442The g:netrw_rmdir_cmd variable is used to support the removal of directories.
1443Its default value is:
1444
1445 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
1446
1447If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
1448to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
1449
1450 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
1451
Bram Moolenaar15146672011-10-20 22:22:38 +02001452Related topics: |netrw-d|
Bram Moolenaar5b435d62012-04-05 17:33:26 +02001453Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001454 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001455
1456
Bram Moolenaar446cb832008-06-24 21:56:24 +00001457*netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
1458*netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
1459DIRECTORY EXPLORATION COMMANDS {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001460
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001461 :[N]Explore[!] [dir]... Explore directory of current file *:Explore*
1462 :[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
1463 :Rexplore ... Return to Explorer *:Rexplore*
1464 :[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore*
1465 :Texplore [dir]... Tab & Explore *:Texplore*
1466 :[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001467
1468 Used with :Explore **/pattern : (also see |netrw-starstar|)
1469 :Nexplore............. go to next matching file *:Nexplore*
1470 :Pexplore............. go to previous matching file *:Pexplore*
1471
1472:Explore will open the local-directory browser on the current file's
1473 directory (or on directory [dir] if specified). The window will be
1474 split only if the file has been modified, otherwise the browsing
1475 window will take over that window. Normally the splitting is taken
1476 horizontally.
1477:Explore! is like :Explore, but will use vertical splitting.
1478:Sexplore will always split the window before invoking the local-directory
1479 browser. As with Explore, the splitting is normally done
1480 horizontally.
1481:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
1482:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
1483:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
1484:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
1485:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
1486:Texplore [dir] does a tabnew before generating the browser window
1487
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001488By default, these commands use the current file's directory. However, one may
1489explicitly provide a directory (path) to use.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001490
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001491The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or
1492columns the new explorer window should have.
1493
1494Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
1495user, is used to control the quantity of rows and/or columns new explorer
1496windows should have.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001497
1498:Rexplore This command is a little different from the others. When one
1499 edits a file, for example by pressing <cr> when atop a file in
1500 a netrw browser window, :Rexplore will return the display to
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001501 that of the last netrw browser window. It is a command version
1502 of the <2-leftmouse> map (which is only available under gvim and
Bram Moolenaar446cb832008-06-24 21:56:24 +00001503 cooperative terms).
1504
1505
1506*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
1507EXPLORING WITH STARS AND PATTERNS
1508
1509When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
1510following four styles, Explore generates a list of files which satisfy
1511the request. >
1512
1513 */filepat files in current directory which satisfy filepat
1514 **/filepat files in current directory or below which satisfy the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001515 file pattern
Bram Moolenaar446cb832008-06-24 21:56:24 +00001516 *//pattern files in the current directory which contain the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001517 pattern (vimgrep is used)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001518 **//pattern files in the current directory or below which contain
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001519 the pattern (vimgrep is used)
Bram Moolenaar572cb562005-08-05 21:35:02 +00001520<
Bram Moolenaar446cb832008-06-24 21:56:24 +00001521The cursor will be placed on the first file in the list. One may then
1522continue to go to subsequent files on that list via |:Nexplore| or to
1523preceding files on that list with |:Pexplore|. Explore will update the
1524directory and place the cursor appropriately.
1525
1526A plain >
1527 :Explore
1528will clear the explore list.
1529
1530If your console or gui produces recognizable shift-up or shift-down sequences,
1531then you'll likely find using shift-downarrow and shift-uparrow convenient.
1532They're mapped by netrw:
1533
1534 <s-down> == Nexplore, and
1535 <s-up> == Pexplore.
1536
1537As an example, consider
1538>
1539 :Explore */*.c
1540 :Nexplore
1541 :Nexplore
1542 :Pexplore
1543<
1544The status line will show, on the right hand side of the status line, a
1545message like "Match 3 of 20".
1546
1547Associated setting variables: |g:netrw_keepdir| |g:netrw_browse_split|
1548 |g:netrw_fastbrowse| |g:netrw_ftp_browse_reject|
1549 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1550 |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
1551 |g:netrw_liststyle|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001552
1553
Bram Moolenaar446cb832008-06-24 21:56:24 +00001554DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001555
Bram Moolenaar446cb832008-06-24 21:56:24 +00001556With the cursor atop a filename, pressing "qf" will reveal the file's size
1557and last modification timestamp. Currently this capability is only available
1558for local files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001559
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001560
Bram Moolenaar446cb832008-06-24 21:56:24 +00001561EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001562
Bram Moolenaar446cb832008-06-24 21:56:24 +00001563The "<ctrl-h>" map brings up a requestor allowing the user to change the
1564file/directory hiding list contained in |g:netrw_list_hide|. The hiding list
1565consists of one or more patterns delimited by commas. Files and/or
1566directories satisfying these patterns will either be hidden (ie. not shown) or
1567be the only ones displayed (see |netrw-a|).
1568
1569The "gh" mapping (see |netrw-gh|) quickly alternates between the usual
1570hiding list and the hiding of files or directories that begin with ".".
1571
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001572As an example, >
1573 let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
1574Effectively, this makes the effect of a |netrw-gh| command the initial setting.
1575What it means:
1576
1577 \(^\|\s\s\) : if the line begins with the following, -or-
1578 two consecutive spaces are encountered
1579 \zs : start the hiding match now
1580 \. : if it now begins with a dot
1581 \S\+ : and is followed by one or more non-whitespace
1582 characters
1583
Bram Moolenaar446cb832008-06-24 21:56:24 +00001584Associated setting variables: |g:netrw_hide| |g:netrw_list_hide|
1585Associated topics: |netrw-a| |netrw-gh| |netrw-mh|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001586
Bram Moolenaar15146672011-10-20 22:22:38 +02001587 *netrw-sort-sequence*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001588EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2
1589
1590When "Sorted by" is name, one may specify priority via the sorting sequence
1591(g:netrw_sort_sequence). The sorting sequence typically prioritizes the
1592name-listing by suffix, although any pattern will do. Patterns are delimited
1593by commas. The default sorting sequence is (all one line):
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001594
1595For Unix: >
1596 '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,
1597 \.info$,\.swp$,\.bak$,\~$'
1598<
1599Otherwise: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00001600 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
1601 \.swp$,\.bak$,\~$'
1602<
1603The lone * is where all filenames not covered by one of the other patterns
1604will end up. One may change the sorting sequence by modifying the
1605g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
1606using the "S" map.
1607
Bram Moolenaarc236c162008-07-13 17:41:49 +00001608Related topics: |netrw-s| |netrw-S|
1609Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001610
1611
Bram Moolenaar97d62492012-11-15 21:28:22 +01001612EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X*
1613
1614Pressing X while the cursor is atop an executable file will yield a prompt
1615using the filename asking for any arguments. Upon pressing a [return], netrw
1616will then call |system()| with that command and arguments. The result will
1617be displayed by |:echomsg|, and so |:messages| will repeat display of the
1618result. Ansi escape sequences will be stripped out.
1619
1620
Bram Moolenaaradc21822011-04-01 18:03:16 +02001621FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
1622
1623Remote symbolic links (ie. those listed via ssh or ftp) are problematic
1624in that it is difficult to tell whether they link to a file or to a
1625directory.
1626
1627To force treatment as a file: use >
Bram Moolenaar97d62492012-11-15 21:28:22 +01001628 gf
Bram Moolenaaradc21822011-04-01 18:03:16 +02001629<
1630To force treatment as a directory: use >
Bram Moolenaar97d62492012-11-15 21:28:22 +01001631 gd
Bram Moolenaaradc21822011-04-01 18:03:16 +02001632<
1633
Bram Moolenaar446cb832008-06-24 21:56:24 +00001634GOING UP *netrw--* {{{2
1635
1636To go up a directory, press "-" or press the <cr> when atop the ../ directory
1637entry in the listing.
1638
1639Netrw will use the command in |g:netrw_list_cmd| to perform the directory
1640listing operation after changing HOSTNAME to the host specified by the
1641user-provided url. By default netrw provides the command as:
1642
1643 ssh HOSTNAME ls -FLa
1644
1645where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
1646read. Naturally, the user may override this command with whatever is
1647preferred. The NetList function which implements remote browsing
1648expects that directories will be flagged by a trailing slash.
1649
1650
1651HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2
1652
1653Netrw's browsing facility allows one to use the hiding list in one of three
1654ways: ignore it, hide files which match, and show only those files which
1655match.
1656
1657If no files have been marked via |netrw-mf|:
1658
1659The "a" map allows the user to cycle through the three hiding modes.
1660
1661The |g:netrw_list_hide| variable holds a comma delimited list of patterns
1662based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list.
1663(also see |netrw-ctrl-h|) To set the hiding list, use the <c-h> map. As an
1664example, to hide files which begin with a ".", one may use the <c-h> map to
1665set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*'
1666in one's <.vimrc>). One may then use the "a" key to show all files, hide
1667matching files, or to show only the matching files.
1668
1669 Example: \.[ch]$
1670 This hiding list command will hide/show all *.c and *.h files.
1671
1672 Example: \.c$,\.h$
1673 This hiding list command will also hide/show all *.c and *.h
1674 files.
1675
1676Don't forget to use the "a" map to select the mode (normal/hiding/show) you
1677want!
1678
1679If files have been marked using |netrw-mf|, then this command will:
1680
1681 if showing all files or non-hidden files:
1682 modify the g:netrw_list_hide list by appending the marked files to it
1683 and showing only non-hidden files.
1684
1685 else if showing hidden files only:
1686 modify the g:netrw_list_hide list by removing the marked files from it
1687 and showing only non-hidden files.
1688 endif
1689
1690 *netrw-gh* *netrw-hide*
1691As a quick shortcut, one may press >
1692 gh
1693to toggle between hiding files which begin with a period (dot) and not hiding
1694them.
1695
Bram Moolenaarff034192013-04-24 18:51:19 +02001696Associated setting variable: |g:netrw_list_hide| |g:netrw_hide|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001697Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
1698
1699IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001700
1701Especially with the remote directory browser, constantly entering the password
1702is tedious.
1703
Bram Moolenaar9964e462007-05-05 17:54:07 +00001704For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00001705tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
1706for setting up no-password ssh and scp and discusses associated security
Bram Moolenaar9964e462007-05-05 17:54:07 +00001707issues. It used to be available at http://hacks.oreilly.com/pub/h/66 ,
1708but apparently that address is now being redirected to some "hackzine".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001709I'll attempt a summary based on that article and on a communication from
1710Ben Schmidt:
Bram Moolenaar843ee412004-06-30 16:16:41 +00001711
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001712 1. Generate a public/private key pair on the local machine
1713 (ssh client): >
1714 ssh-keygen -t rsa
1715 (saving the file in ~/.ssh/id_rsa as prompted)
1716<
1717 2. Just hit the <CR> when asked for passphrase (twice) for no
1718 passphrase. If you do use a passphrase, you will also need to use
1719 ssh-agent so you only have to type the passphrase once per session.
1720 If you don't use a passphrase, simply logging onto your local
1721 computer or getting access to the keyfile in any way will suffice
1722 to access any ssh servers which have that key authorized for login.
1723
1724 3. This creates two files: >
1725 ~/.ssh/id_rsa
1726 ~/.ssh/id_rsa.pub
1727<
1728 4. On the target machine (ssh server): >
1729 cd
1730 mkdir -p .ssh
1731 chmod 0700 .ssh
1732<
1733 5. On your local machine (ssh client): (one line) >
1734 ssh {serverhostname}
1735 cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub
1736<
1737 or, for OpenSSH, (one line) >
1738 ssh {serverhostname}
1739 cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
1740<
1741You can test it out with >
1742 ssh {serverhostname}
1743and you should be log onto the server machine without further need to type
1744anything.
1745
1746If you decided to use a passphrase, do: >
1747 ssh-agent $SHELL
1748 ssh-add
1749 ssh {serverhostname}
1750You will be prompted for your key passphrase when you use ssh-add, but not
1751subsequently when you use ssh. For use with vim, you can use >
1752 ssh-agent vim
1753and, when next within vim, use >
1754 :!ssh-add
1755Alternatively, you can apply ssh-agent to the terminal you're planning on
1756running vim in: >
1757 ssh-agent xterm &
1758and do ssh-add whenever you need.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001759
Bram Moolenaar9964e462007-05-05 17:54:07 +00001760For Windows, folks on the vim mailing list have mentioned that Pageant helps
1761with avoiding the constant need to enter the password.
Bram Moolenaar433f7c82006-03-21 21:29:36 +00001762
Bram Moolenaar446cb832008-06-24 21:56:24 +00001763Kingston Fung wrote about another way to avoid constantly needing to enter
1764passwords:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001765
Bram Moolenaar446cb832008-06-24 21:56:24 +00001766 In order to avoid the need to type in the password for scp each time, you
1767 provide a hack in the docs to set up a non password ssh account. I found a
1768 better way to do that: I can use a regular ssh account which uses a
1769 password to access the material without the need to key-in the password
1770 each time. It's good for security and convenience. I tried ssh public key
1771 authorization + ssh-agent, implementing this, and it works! Here are two
1772 links with instructions:
1773
1774 http://www.ibm.com/developerworks/library/l-keyc2/
1775 http://sial.org/howto/openssh/publickey-auth/
1776
1777
1778LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2
1779
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001780Pressing "qb" (query bookmarks) will list both the bookmarked directories and
1781directory traversal history.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001782
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001783Related Topics:
1784 |netrw-gb| how to return (go) to a bookmark
1785 |netrw-mb| how to make a bookmark
1786 |netrw-mB| how to delete bookmarks
1787 |netrw-u| change to a predecessor directory via the history stack
1788 |netrw-U| change to a successor directory via the history stack
Bram Moolenaar446cb832008-06-24 21:56:24 +00001789
1790MAKING A NEW DIRECTORY *netrw-d* {{{2
1791
1792With the "d" map one may make a new directory either remotely (which depends
1793on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
Bram Moolenaar5b435d62012-04-05 17:33:26 +02001794global variable g:netrw_localmkdir). Netrw will issue a request for the new
Bram Moolenaar446cb832008-06-24 21:56:24 +00001795directory's name. A bare <CR> at that point will abort the making of the
1796directory. Attempts to make a local directory that already exists (as either
1797a file or a directory) will be detected, reported on, and ignored.
1798
Bram Moolenaar15146672011-10-20 22:22:38 +02001799Related topics: |netrw-D|
Bram Moolenaar5b435d62012-04-05 17:33:26 +02001800Associated setting variables: |g:netrw_localmkdir| |g:netrw_mkdir_cmd|
Bram Moolenaar15146672011-10-20 22:22:38 +02001801 |g:netrw_remote_mkdir|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001802
1803
1804MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
1805
1806By default, |g:netrw_keepdir| is 1. This setting means that the current
Bram Moolenaarff034192013-04-24 18:51:19 +02001807directory will not track the browsing directory. (done for backwards
1808compatibility with v6's file explorer).
Bram Moolenaar446cb832008-06-24 21:56:24 +00001809
Bram Moolenaarff034192013-04-24 18:51:19 +02001810Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00001811track netrw's browsing directory.
1812
1813However, given the default setting for g:netrw_keepdir of 1 where netrw
1814maintains its own separate notion of the current directory, in order to make
1815the two directories the same, use the "c" map (just type c). That map will
1816set Vim's notion of the current directory to netrw's current browsing
1817directory.
1818
1819Associated setting variable: |g:netrw_keepdir|
1820
1821MARKING FILES *netrw-mf* {{{2
1822 (also see |netrw-mr|)
1823
1824One may mark files with the cursor atop a filename and then pressing "mf".
1825With gvim, one may also mark files with <s-leftmouse>. The following netrw
1826maps make use of marked files:
1827
1828 |netrw-a| Hide marked files/directories
1829 |netrw-D| Delete marked files/directories
1830 |netrw-mc| Copy marked files to target
1831 |netrw-md| Apply vimdiff to marked files
1832 |netrw-me| Edit marked files
Bram Moolenaarff034192013-04-24 18:51:19 +02001833 |netrw-mF| Unmark marked files
Bram Moolenaar446cb832008-06-24 21:56:24 +00001834 |netrw-mg| Apply vimgrep to marked files
1835 |netrw-mm| Move marked files
1836 |netrw-mp| Print marked files
1837 |netrw-mt| Set target for |netrw-mm| and |netrw-mc|
1838 |netrw-mT| Generate tags using marked files
1839 |netrw-mx| Apply shell command to marked files
1840 |netrw-mz| Compress/Decompress marked files
Bram Moolenaarff034192013-04-24 18:51:19 +02001841 |netrw-qF| Mark files using quickfix list
Bram Moolenaar446cb832008-06-24 21:56:24 +00001842 |netrw-O| Obtain marked files
1843 |netrw-R| Rename marked files
1844
1845One may unmark files one at a time the same way one marks them; ie. place
1846the cursor atop a marked file and press "mf". This process also works
1847with <s-leftmouse> using gvim. One may unmark all files by pressing
1848"mu" (see |netrw-mu|).
1849
Bram Moolenaaradc21822011-04-01 18:03:16 +02001850Marked files are highlighted using the "netrwMarkFile" highlighting group,
1851which by default is linked to "Identifier" (see Identifier under
1852|group-name|). You may change the highlighting group by putting something
1853like >
1854
1855 highlight clear netrwMarkFile
1856 hi link netrwMarkFile ..whatever..
1857<
1858into $HOME/.vim/after/syntax/netrw.vim .
1859
Bram Moolenaar446cb832008-06-24 21:56:24 +00001860*markfilelist* *global_markfilelist* *local_markfilelist*
1861All marked files are entered onto the global marked file list; there is only
1862one such list. In addition, every netrw buffer also has its own local marked
1863file list; since netrw buffers are associated with specific directories, this
1864means that each directory has its own local marked file list. The various
1865commands which operate on marked files use one or the other of the marked file
1866lists.
1867
1868
Bram Moolenaarff034192013-04-24 18:51:19 +02001869UNMARKING FILES *netrw-mF* {{{2
1870 (also see |netrw-mf|)
1871
1872This command will unmark all files in the current buffer. One may also use
1873mf (|netrw-mf|) on a specific file to unmark just that file.
1874
1875
1876MARKING FILES BY QUICKFIX LIST *netrw-qF*
1877 (also see |netrw-mf|)
1878
1879One may convert the |quickfix-error-lists| into a marked file list using
1880"qF". You may then proceed with commands such as me (|netrw-me|) to
1881edit them. Quickfix error lists are generated, for example, by calls
1882to |:vimgrep|.
1883
1884
Bram Moolenaar446cb832008-06-24 21:56:24 +00001885MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2
1886 (also see |netrw-mf|)
1887
1888One may also mark files by pressing "mr"; netrw will then issue a prompt,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001889"Enter regexp: ". You may then enter a shell-style regular expression such
1890as *.c$ (see |glob()|). For remote systems, glob() doesn't work -- so netrw
1891converts "*" into ".*" (see |regexp|) and marks files based on that. In the
1892future I may make it possible to use |regexp|s instead of glob()-style
1893expressions (yet-another-option).
Bram Moolenaar446cb832008-06-24 21:56:24 +00001894
1895
1896MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2
1897 (See |netrw-mf| and |netrw-mr| for how to mark files)
1898 (uses the local marked-file list)
1899
1900Upon activation of the "mx" map, netrw will query the user for some (external)
1901command to be applied to all marked files. All "%"s in the command will be
1902substituted with the name of each marked file in turn. If no "%"s are in the
1903command, then the command will be followed by a space and a marked filename.
1904
1905
1906MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
1907 (See |netrw-mf| and |netrw-mr| for how to mark files)
1908 (uses the local marked file list)
1909
1910If any marked files are compressed, then "mz" will decompress them.
1911If any marked files are decompressed, then "mz" will compress them
1912using the command specified by |g:netrw_compress|; by default,
1913that's "gzip".
1914
1915For decompression, netrw provides a |Dictionary| of suffices and their
1916associated decompressing utilities; see |g:netrw_decompress|.
1917
1918Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
1919
1920MARKED FILES: COPYING *netrw-mc* {{{2
1921 (See |netrw-mf| and |netrw-mr| for how to mark files)
1922 (Uses the global marked file list)
1923
1924Select a target directory with mt (|netrw-mt|). Then change directory,
Bram Moolenaaradc21822011-04-01 18:03:16 +02001925select file(s) (see |netrw-mf|), and press "mc". The copy is done
1926from the current window (where one does the mf) to the target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001927
1928Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
1929
1930MARKED FILES: DIFF *netrw-md* {{{2
1931 (See |netrw-mf| and |netrw-mr| for how to mark files)
1932 (uses the global marked file list)
1933
1934Use |vimdiff| to visualize difference between selected files (two or
1935three may be selected for this). Uses the global marked file list.
1936
1937MARKED FILES: EDITING *netrw-me* {{{2
1938 (See |netrw-mf| and |netrw-mr| for how to mark files)
1939 (uses the global marked file list)
1940
1941This command will place the marked files on the |arglist| and commence
1942editing them. One may return the to explorer window with |:Rexplore|.
Bram Moolenaarff034192013-04-24 18:51:19 +02001943(use |:n| and |:p| to edit next and previous files in the arglist)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001944
1945MARKED FILES: GREP *netrw-mg* {{{2
1946 (See |netrw-mf| and |netrw-mr| for how to mark files)
1947 (uses the global marked file list)
1948
Bram Moolenaarff034192013-04-24 18:51:19 +02001949This command will apply |:vimgrep| to the marked files.
1950The command will ask for the requested pattern; one may then enter: >
1951
Bram Moolenaar446cb832008-06-24 21:56:24 +00001952 /pattern/[g][j]
1953 ! /pattern/[g][j]
1954 pattern
1955<
Bram Moolenaarff034192013-04-24 18:51:19 +02001956In the cases of "j" option usage as shown above, "mg" will winnow the current
1957marked file list to just those possessing the specified pattern.
1958Thus, one may use >
1959 mr ...file-pattern
1960 mg ..contents-pattern
1961to have a marked file list satisfying the file-pattern but containing the
1962desried contents-pattern.
1963
Bram Moolenaar446cb832008-06-24 21:56:24 +00001964MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2
1965 (See |netrw-mf| and |netrw-mr| for how to mark files)
1966 (uses the local marked file list)
1967
1968This command extracts the suffices of the marked files and toggles their
1969presence on the hiding list. Please note that marking the same suffix
1970this way multiple times will result in the suffix's presence being toggled
1971for each file (so an even quantity of marked files having the same suffix
1972is the same as not having bothered to select them at all).
1973
1974Related topics: |netrw-a| |g:netrw_list_hide|
1975
1976MARKED FILES: MOVING *netrw-mm* {{{2
1977 (See |netrw-mf| and |netrw-mr| for how to mark files)
1978 (uses the global marked file list)
1979
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001980 WARNING: moving files is more dangerous than copying them.
1981 A file being moved is first copied and then deleted; if the
1982 copy operation fails and the delete succeeds, you will lose
1983 the file. Either try things out with unimportant files
1984 first or do the copy and then delete yourself using mc and D.
1985 Use at your own risk!
1986
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001987Select a target directory with mt (|netrw-mt|). Then change directory,
Bram Moolenaaradc21822011-04-01 18:03:16 +02001988select file(s) (see |netrw-mf|), and press "mm". The move is done
1989from the current window (where one does the mf) to the target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001990
1991Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
1992
1993MARKED FILES: PRINTING *netrw-mp* {{{2
1994 (See |netrw-mf| and |netrw-mr| for how to mark files)
1995 (uses the local marked file list)
1996
1997Netrw will apply the |:hardcopy| command to marked files. What it does
1998is open each file in a one-line window, execute hardcopy, then close the
1999one-line window.
2000
2001
2002MARKED FILES: SOURCING *netrw-ms* {{{2
2003 (See |netrw-mf| and |netrw-mr| for how to mark files)
2004 (uses the local marked file list)
2005
2006Netrw will source the marked files (using vim's |:source| command)
2007
2008
Bram Moolenaarff034192013-04-24 18:51:19 +02002009MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2
2010 (See |netrw-mf| and |netrw-mr| for how to mark files)
2011
2012Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
2013
2014 * If the cursor is atop a file name, then the netrw window's currently
2015 displayed directory is used for the copy/move-to target.
2016
2017 * Also, if the cursor is in the banner, then the netrw window's currently
2018 displayed directory is used for the copy/move-to target.
2019 Unless the target already is the current directory. In which case,
2020 remove the target.
2021
2022 * However, if the cursor is atop a directory name, then that directory is
2023 used for the copy/move-to target
2024
2025There is only one copy/move-to target per vim session; ie. the target is a
2026script variable (see |s:var|) and is shared between all netrw windows (in an
2027instance of vim).
2028
2029When using menus and gvim, netrw provides a "Targets" entry which allows one
2030to pick a target from the list of bookmarks and history.
2031
2032Related topics:
2033 Marking Files......................................|netrw-mf|
2034 Marking Files by Regular Expression................|netrw-mr|
2035 Marked Files: Target Directory Using Bookmarks.....|netrw-Tb|
2036 Marked Files: Target Directory Using History.......|netrw-Th|
2037
2038
Bram Moolenaar446cb832008-06-24 21:56:24 +00002039MARKED FILES: TAGGING *netrw-mT* {{{2
2040 (See |netrw-mf| and |netrw-mr| for how to mark files)
2041 (uses the global marked file list)
2042
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002043The "mT" mapping will apply the command in |g:netrw_ctags| (by default, it is
Bram Moolenaar446cb832008-06-24 21:56:24 +00002044"ctags") to marked files. For remote browsing, in order to create a tags file
2045netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for
2046this to work on remote systems. For your local system, see |ctags| on how to
2047get a version. I myself use hdrtags, currently available at
Bram Moolenaar97d62492012-11-15 21:28:22 +01002048http://www.drchip.org/astronaut/src/index.html , and have >
Bram Moolenaar446cb832008-06-24 21:56:24 +00002049
2050 let g:netrw_ctags= "hdrtag"
2051<
2052in my <.vimrc>.
2053
2054When a remote set of files are tagged, the resulting tags file is "obtained";
2055ie. a copy is transferred to the local system's directory. The local tags
2056file is then modified so that one may use it through the network. The
2057modification is concerns the names of the files in the tags; each filename is
2058preceded by the netrw-compatible url used to obtain it. When one subsequently
2059uses one of the go to tag actions (|tags|), the url will be used by netrw to
2060edit the desired file and go to the tag.
2061
Bram Moolenaarc236c162008-07-13 17:41:49 +00002062Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
Bram Moolenaar446cb832008-06-24 21:56:24 +00002063
Bram Moolenaarff034192013-04-24 18:51:19 +02002064MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +00002065
Bram Moolenaarff034192013-04-24 18:51:19 +02002066Sets the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|).
Bram Moolenaar446cb832008-06-24 21:56:24 +00002067
Bram Moolenaarff034192013-04-24 18:51:19 +02002068The |netrw-qb| map will give you a list of bookmarks (and history).
2069One may choose one of the bookmarks to become your marked file
2070target by using [count]Tb (default count: 1).
Bram Moolenaar446cb832008-06-24 21:56:24 +00002071
Bram Moolenaarff034192013-04-24 18:51:19 +02002072Related topics:
2073 Listing Bookmarks and History......................|netrw-qb|
2074 Marked Files: Setting The Target Directory.........|netrw-mt|
2075 Marked Files: Target Directory Using History.......|netrw-Th|
2076 Marking Files......................................|netrw-mf|
2077 Marking Files by Regular Expression................|netrw-mr|
Bram Moolenaar446cb832008-06-24 21:56:24 +00002078
Bram Moolenaar446cb832008-06-24 21:56:24 +00002079
Bram Moolenaarff034192013-04-24 18:51:19 +02002080MARKED FILES: TARGET DIRECTORY USING HISTORY *netrw-Th* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +00002081
Bram Moolenaarff034192013-04-24 18:51:19 +02002082Sets the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|).
2083
2084The |netrw-qb| map will give you a list of history (and bookmarks).
2085One may choose one of the history entries to become your marked file
2086target by using [count]Th (default count: 0; ie. the current directory).
2087
2088Related topics:
2089 Listing Bookmarks and History......................|netrw-qb|
2090 Marked Files: Setting The Target Directory.........|netrw-mt|
2091 Marked Files: Target Directory Using Bookmarks.....|netrw-Tb|
2092 Marking Files......................................|netrw-mf|
2093 Marking Files by Regular Expression................|netrw-mr|
2094
Bram Moolenaar446cb832008-06-24 21:56:24 +00002095
2096MARKED FILES: UNMARKING *netrw-mu* {{{2
2097 (See |netrw-mf| and |netrw-mr| for how to mark files)
2098
2099The "mu" mapping will unmark all currently marked files.
2100
Bram Moolenaar15146672011-10-20 22:22:38 +02002101 *netrw-browser-settings*
Bram Moolenaar446cb832008-06-24 21:56:24 +00002102NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2
2103
Bram Moolenaar15146672011-10-20 22:22:38 +02002104(if you're interested in the netrw file transfer settings, see |netrw-options|
2105 and |netrw-protocol|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002106
2107The <netrw.vim> browser provides settings in the form of variables which
2108you may modify; by placing these settings in your <.vimrc>, you may customize
2109your browsing preferences. (see also: |netrw-settings|)
2110>
2111 --- -----------
2112 Var Explanation
2113 --- -----------
Bram Moolenaarff034192013-04-24 18:51:19 +02002114< *g:netrw_alto* change from above splitting to below splitting
Bram Moolenaar446cb832008-06-24 21:56:24 +00002115 by setting this variable (see |netrw-o|)
2116 default: =&sb (see |'sb'|)
2117
Bram Moolenaarff034192013-04-24 18:51:19 +02002118 *g:netrw_altv* change from left splitting to right splitting
Bram Moolenaar446cb832008-06-24 21:56:24 +00002119 by setting this variable (see |netrw-v|)
2120 default: =&spr (see |'spr'|)
2121
Bram Moolenaarff034192013-04-24 18:51:19 +02002122 *g:netrw_banner* enable/suppress the banner
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002123 =0: suppress the banner
2124 =1: banner is enabled (default)
2125 NOTE: suppressing the banner is a new feature
2126 which may cause problems.
2127
Bram Moolenaarff034192013-04-24 18:51:19 +02002128 *g:netrw_browse_split* when browsing, <cr> will open the file by:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002129 =0: re-using the same window
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002130 =1: horizontally splitting the window first
2131 =2: vertically splitting the window first
Bram Moolenaar446cb832008-06-24 21:56:24 +00002132 =3: open file in new tab
2133 =4: act like "P" (ie. open previous window)
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002134 Note that |g:netrw_preview| may be used
2135 to get vertical splitting instead of
2136 horizontal splitting.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002137
Bram Moolenaarff034192013-04-24 18:51:19 +02002138 *g:netrw_browsex_viewer* specify user's preference for a viewer: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00002139 "kfmclient exec"
2140 "gnome-open"
2141< If >
2142 "-"
2143< is used, then netrwFileHandler() will look for
2144 a script/function to handle the given
2145 extension. (see |netrw_filehandler|).
2146
Bram Moolenaarff034192013-04-24 18:51:19 +02002147 *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002148 Windows: "cacls FILENAME /e /p PERM"
2149 Used to change access permission for a file.
2150
Bram Moolenaarff034192013-04-24 18:51:19 +02002151 *g:netrw_compress* ="gzip"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002152 Will compress marked files with this
2153 command
2154
Bram Moolenaarff034192013-04-24 18:51:19 +02002155 *g:Netrw_corehandler* Allows one to specify something additional
Bram Moolenaar15146672011-10-20 22:22:38 +02002156 to do when handling <core> files via netrw's
2157 browser's "x" command (see |netrw-x|). If
2158 present, g:Netrw_corehandler specifies
2159 either one or more function references
2160 (see |Funcref|). (the capital g:Netrw...
2161 is required its holding a function reference)
2162
2163
Bram Moolenaarff034192013-04-24 18:51:19 +02002164 *g:netrw_ctags* ="ctags"
2165 The default external program used to create
2166 tags
Bram Moolenaarc236c162008-07-13 17:41:49 +00002167
Bram Moolenaarff034192013-04-24 18:51:19 +02002168 *g:netrw_cursor* = 2 (default)
Bram Moolenaaradc21822011-04-01 18:03:16 +02002169 This option controls the use of the
2170 |'cursorline'| (cul) and |'cursorcolumn'|
2171 (cuc) settings by netrw:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002172
Bram Moolenaaradc21822011-04-01 18:03:16 +02002173 Value Thin-Long-Tree Wide
2174 =0 u-cul u-cuc u-cul u-cuc
2175 =1 u-cul u-cuc cul u-cuc
2176 =2 cul u-cuc cul u-cuc
2177 =3 cul u-cuc cul cuc
2178 =4 cul cuc cul cuc
2179
2180 Where
2181 u-cul : user's |'cursorline'| setting used
2182 u-cuc : user's |'cursorcolumn'| setting used
2183 cul : |'cursorline'| locally set
2184 cuc : |'cursorcolumn'| locally set
2185
Bram Moolenaarff034192013-04-24 18:51:19 +02002186 *g:netrw_decompress* = { ".gz" : "gunzip" ,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002187 ".bz2" : "bunzip2" ,
2188 ".zip" : "unzip" ,
2189 ".tar" : "tar -xf"}
2190 A dictionary mapping suffices to
2191 decompression programs.
2192
Bram Moolenaaradc21822011-04-01 18:03:16 +02002193 *g:netrw_dirhistmax* =10: controls maximum quantity of past
2194 history. May be zero to supppress
2195 history.
2196 (related: |netrw-qb| |netrw-u| |netrw-U|)
2197
Bram Moolenaar97d62492012-11-15 21:28:22 +01002198 *g:netrw_dynamic_maxfilenamelen* =32: enables dynamic determination of
2199 |g:netrw_maxfilenamelen|, which affects
2200 local file long listing.
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002201 *g:netrw_errorlvl* =0: error levels greater than or equal to
2202 this are permitted to be displayed
2203 0: notes
2204 1: warnings
2205 2: errors
2206
Bram Moolenaarff034192013-04-24 18:51:19 +02002207 *g:netrw_fastbrowse* =0: slow speed directory browsing;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002208 never re-uses directory listings,
2209 always obtains directory listings.
2210 =1: medium speed directory browsing;
2211 re-use directory listings only
2212 when remote directory browsing.
2213 (default value)
2214 =2: fast directory browsing;
2215 only obtains directory listings when the
2216 directory hasn't been seen before
2217 (or |netrw-ctrl-l| is used).
2218
2219 Fast browsing retains old directory listing
2220 buffers so that they don't need to be
2221 re-acquired. This feature is especially
2222 important for remote browsing. However, if
2223 a file is introduced or deleted into or from
2224 such directories, the old directory buffer
2225 becomes out-of-date. One may always refresh
2226 such a directory listing with |netrw-ctrl-l|.
2227 This option gives the user the choice of
2228 trading off accuracy (ie. up-to-date listing)
2229 versus speed.
2230
Bram Moolenaarff034192013-04-24 18:51:19 +02002231 *g:netrw_fname_escape* =' ?&;%'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002232 Used on filenames before remote reading/writing
Bram Moolenaar446cb832008-06-24 21:56:24 +00002233
Bram Moolenaarff034192013-04-24 18:51:19 +02002234 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
Bram Moolenaar446cb832008-06-24 21:56:24 +00002235 that can show up as "directories" and "files"
2236 in the listing. This pattern is used to
2237 remove such embedded messages. By default its
2238 value is:
2239 '^total\s\+\d\+$\|
2240 ^Trying\s\+\d\+.*$\|
2241 ^KERBEROS_V\d rejected\|
2242 ^Security extensions not\|
2243 No such file\|
2244 : connect to address [0-9a-fA-F:]*
2245 : No route to host$'
2246
Bram Moolenaarff034192013-04-24 18:51:19 +02002247 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002248 listing. Defaults:
2249 unix or g:netrw_cygwin set: : "ls -lF"
2250 otherwise "dir"
2251
2252
Bram Moolenaarff034192013-04-24 18:51:19 +02002253 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002254 listing, sorted by size of file.
2255 Defaults:
2256 unix or g:netrw_cygwin set: : "ls -slF"
2257 otherwise "dir"
2258
Bram Moolenaarff034192013-04-24 18:51:19 +02002259 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002260 listing, sorted by time of last modification.
2261 Defaults:
2262 unix or g:netrw_cygwin set: : "ls -tlF"
2263 otherwise "dir"
2264
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002265 *g:netrw_glob_escape* ='[]*?`{~$' (unix)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002266 ='[]*?`{$' (windows
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002267 These characters in directory names are
Bram Moolenaar446cb832008-06-24 21:56:24 +00002268 escaped before applying glob()
2269
Bram Moolenaarff034192013-04-24 18:51:19 +02002270 *g:netrw_hide* Controlled by the "a" map (see |netrw-a|)
2271 =0 : show all
2272 =1 : show not-hidden files
2273 =2 : show hidden files only
Bram Moolenaar446cb832008-06-24 21:56:24 +00002274 default: =0
2275
Bram Moolenaarff034192013-04-24 18:51:19 +02002276 *g:netrw_home* The home directory for where bookmarks and
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002277 history are saved (as .netrwbook and
2278 .netrwhist).
2279 default: the first directory on the
2280 |'runtimepath'|
2281
Bram Moolenaarff034192013-04-24 18:51:19 +02002282 *g:netrw_keepdir* =1 (default) keep current directory immune from
Bram Moolenaar446cb832008-06-24 21:56:24 +00002283 the browsing directory.
2284 =0 keep the current directory the same as the
2285 browsing directory.
2286 The current browsing directory is contained in
2287 b:netrw_curdir (also see |netrw-c|)
2288
Bram Moolenaarff034192013-04-24 18:51:19 +02002289 *g:netrw_list_cmd* command for listing remote directories
Bram Moolenaar446cb832008-06-24 21:56:24 +00002290 default: (if ssh is executable)
2291 "ssh HOSTNAME ls -FLa"
2292
Bram Moolenaarff034192013-04-24 18:51:19 +02002293 *g:netrw_liststyle* Set the default listing style:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002294 = 0: thin listing (one file per line)
2295 = 1: long listing (one file per line with time
2296 stamp information and file size)
2297 = 2: wide listing (multiple files in columns)
2298 = 3: tree style listing
Bram Moolenaarff034192013-04-24 18:51:19 +02002299 *g:netrw_list_hide* comma separated pattern list for hiding files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002300 Patterns are regular expressions (see |regexp|)
2301 Example: let g:netrw_list_hide= '.*\.swp$'
2302 default: ""
2303
Bram Moolenaarff034192013-04-24 18:51:19 +02002304 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002305 ="copy" Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002306 Copies marked files (|netrw-mf|) to target
2307 directory (|netrw-mt|, |netrw-mc|)
2308
Bram Moolenaarff034192013-04-24 18:51:19 +02002309 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002310 ="move" Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002311 Moves marked files (|netrw-mf|) to target
2312 directory (|netrw-mt|, |netrw-mm|)
2313
Bram Moolenaarff034192013-04-24 18:51:19 +02002314 *g:netrw_localmkdir* command for making a local directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002315 default: "mkdir"
2316
Bram Moolenaarff034192013-04-24 18:51:19 +02002317 *g:netrw_localrmdir* remove directory command (rmdir)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002318 default: "rmdir"
2319
Bram Moolenaarff034192013-04-24 18:51:19 +02002320 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
Bram Moolenaar446cb832008-06-24 21:56:24 +00002321 listings fit on 80 column displays.
2322 If your screen is wider, and you have file
2323 or directory names longer than 32 bytes,
2324 you may set this option to keep listings
2325 columnar.
2326
Bram Moolenaarff034192013-04-24 18:51:19 +02002327 *g:netrw_mkdir_cmd* command for making a remote directory
Bram Moolenaar15146672011-10-20 22:22:38 +02002328 via ssh (also see |g:netrw_remote_mkdir|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002329 default: "ssh USEPORT HOSTNAME mkdir"
2330
Bram Moolenaar251e1912011-06-19 05:09:16 +02002331 *g:netrw_mousemaps* =1 (default) enables mouse buttons while
2332 browsing to:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002333 leftmouse : open file/directory
2334 shift-leftmouse : mark file
2335 middlemouse : same as P
2336 rightmouse : remove file/directory
2337 =0: disables mouse maps
2338
Bram Moolenaar15146672011-10-20 22:22:38 +02002339 *g:netrw_nobeval* doesn't exist (default)
2340 If this variable exists, then balloon
2341 evaluation will be suppressed
2342 (see |'ballooneval'|)
2343
Bram Moolenaarff034192013-04-24 18:51:19 +02002344 *g:netrw_remote_mkdir* command for making a local directory
Bram Moolenaar15146672011-10-20 22:22:38 +02002345 via ftp (also see |g:netrw_mkdir_cmd|)
2346 default: "mkdir"
2347
Bram Moolenaarff034192013-04-24 18:51:19 +02002348 *g:netrw_retmap* if it exists and is set to one, then:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002349 * if in a netrw-selected file, AND
2350 * no normal-mode <2-leftmouse> mapping exists,
2351 then the <2-leftmouse> will be mapped for easy
Bram Moolenaar446cb832008-06-24 21:56:24 +00002352 return to the netrw browser window.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002353 example: click once to select and open a file,
2354 double-click to return.
2355
2356 Note that one may instead choose to:
2357 * let g:netrw_retmap= 1, AND
2358 * nmap <silent> YourChoice <Plug>NetrwReturn
2359 and have another mapping instead of
2360 <2-leftmouse> to invoke the return.
2361
2362 You may also use the |:Rexplore| command to do
2363 the same thing.
2364
Bram Moolenaar446cb832008-06-24 21:56:24 +00002365 default: =0
2366
Bram Moolenaarff034192013-04-24 18:51:19 +02002367 *g:netrw_rm_cmd* command for removing files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002368 default: "ssh USEPORT HOSTNAME rm"
2369
Bram Moolenaarff034192013-04-24 18:51:19 +02002370 *g:netrw_rmdir_cmd* command for removing directories
Bram Moolenaar446cb832008-06-24 21:56:24 +00002371 default: "ssh USEPORT HOSTNAME rmdir"
2372
Bram Moolenaarff034192013-04-24 18:51:19 +02002373 *g:netrw_rmf_cmd* command for removing softlinks
Bram Moolenaar446cb832008-06-24 21:56:24 +00002374 default: "ssh USEPORT HOSTNAME rm -f"
2375
Bram Moolenaarff034192013-04-24 18:51:19 +02002376 *g:netrw_sort_by* sort by "name", "time", or "size"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002377 default: "name"
2378
Bram Moolenaarff034192013-04-24 18:51:19 +02002379 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002380 default: "normal"
2381
Bram Moolenaarff034192013-04-24 18:51:19 +02002382 *g:netrw_sort_options* sorting is done using |:sort|; this
Bram Moolenaarc236c162008-07-13 17:41:49 +00002383 variable's value is appended to the
2384 sort command. Thus one may ignore case,
2385 for example, with the following in your
2386 .vimrc: >
2387 let g:netrw_sort_options="i"
2388< default: ""
2389
Bram Moolenaarff034192013-04-24 18:51:19 +02002390 *g:netrw_sort_sequence* when sorting by name, first sort by the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002391 comma-separated pattern sequence. Note that
2392 the filigree added to indicate filetypes
2393 should be accounted for in your pattern.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002394 default: '[\/]$,*,\.bak$,\.o$,\.h$,
2395 \.info$,\.swp$,\.obj$'
2396
Bram Moolenaarff034192013-04-24 18:51:19 +02002397 *g:netrw_special_syntax* If true, then certain files will be shown
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002398 using special syntax in the browser:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002399
2400 netrwBak : *.bak
2401 netrwCompress: *.gz *.bz2 *.Z *.zip
2402 netrwData : *.dat
2403 netrwHdr : *.h
2404 netrwLib : *.a *.so *.lib *.dll
2405 netrwMakefile: [mM]akefile *.mak
2406 netrwObj : *.o *.obj
2407 netrwTags : tags ANmenu ANtags
Bram Moolenaaradc21822011-04-01 18:03:16 +02002408 netrwTilde : *~
Bram Moolenaar446cb832008-06-24 21:56:24 +00002409 netrwTmp : tmp* *tmp
2410
2411 These syntax highlighting groups are linked
2412 to Folded or DiffChange by default
2413 (see |hl-Folded| and |hl-DiffChange|), but
2414 one may put lines like >
2415 hi link netrwCompress Visual
2416< into one's <.vimrc> to use one's own
2417 preferences.
2418
Bram Moolenaarff034192013-04-24 18:51:19 +02002419 *g:netrw_ssh_cmd* One may specify an executable command
Bram Moolenaar446cb832008-06-24 21:56:24 +00002420 to use instead of ssh for remote actions
2421 such as listing, file removal, etc.
2422 default: ssh
2423
Bram Moolenaarff034192013-04-24 18:51:19 +02002424 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002425 messages, banners, and whatnot that one doesn't
2426 want masquerading as "directories" and "files".
2427 Use this pattern to remove such embedded
2428 messages. By default its value is:
2429 '^total\s\+\d\+$'
2430
2431
Bram Moolenaarff034192013-04-24 18:51:19 +02002432 *g:netrw_tmpfile_escape* =' &;'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002433 escape() is applied to all temporary files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002434 to escape these characters.
2435
Bram Moolenaarff034192013-04-24 18:51:19 +02002436 *g:netrw_timefmt* specify format string to vim's strftime().
Bram Moolenaar446cb832008-06-24 21:56:24 +00002437 The default, "%c", is "the preferred date
2438 and time representation for the current
2439 locale" according to my manpage entry for
2440 strftime(); however, not all are satisfied
2441 with it. Some alternatives:
2442 "%a %d %b %Y %T",
2443 " %a %Y-%m-%d %I-%M-%S %p"
2444 default: "%c"
2445
Bram Moolenaarff034192013-04-24 18:51:19 +02002446 *g:netrw_use_noswf* netrw normally avoids writing swapfiles
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002447 for browser buffers. However, under some
Bram Moolenaar446cb832008-06-24 21:56:24 +00002448 systems this apparently is causing nasty
2449 ml_get errors to appear; if you're getting
2450 ml_get errors, try putting
2451 let g:netrw_use_noswf= 0
2452 in your .vimrc.
2453
Bram Moolenaarff034192013-04-24 18:51:19 +02002454 *g:netrw_winsize* specify initial size of new windows made with
Bram Moolenaar446cb832008-06-24 21:56:24 +00002455 "o" (see |netrw-o|), "v" (see |netrw-v|),
Bram Moolenaar251e1912011-06-19 05:09:16 +02002456 |:Hexplore| or |:Vexplore|. The g:netrw_winsize
2457 is an integer describing the percentage of the
2458 current netrw buffer's window to be used for
2459 the new window.
Bram Moolenaar15146672011-10-20 22:22:38 +02002460 If g:netrw_winsize is less than zero, then
2461 the absolute value of g:netrw_winsize lines
2462 or columns will be used for the new window.
Bram Moolenaar251e1912011-06-19 05:09:16 +02002463 default: 50 (for 50%)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002464
Bram Moolenaarff034192013-04-24 18:51:19 +02002465 *g:netrw_xstrlen* Controls how netrw computes string lengths,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002466 including multi-byte characters' string
Bram Moolenaar446cb832008-06-24 21:56:24 +00002467 length. (thanks to N Weibull, T Mechelynck)
2468 =0: uses Vim's built-in strlen()
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002469 =1: number of codepoints (Latin a + combining
Bram Moolenaar446cb832008-06-24 21:56:24 +00002470 circumflex is two codepoints) (DEFAULT)
2471 =2: number of spacing codepoints (Latin a +
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002472 combining circumflex is one spacing
Bram Moolenaar446cb832008-06-24 21:56:24 +00002473 codepoint; a hard tab is one; wide and
2474 narrow CJK are one each; etc.)
2475 =3: virtual length (counting tabs as anything
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002476 between 1 and |'tabstop'|, wide CJK as 2
Bram Moolenaar446cb832008-06-24 21:56:24 +00002477 rather than 1, Arabic alif as zero when
2478 immediately preceded by lam, one
2479 otherwise, etc)
2480
Bram Moolenaarff034192013-04-24 18:51:19 +02002481 *g:NetrwTopLvlMenu* This variable specifies the top level
Bram Moolenaar446cb832008-06-24 21:56:24 +00002482 menu name; by default, it's "Netrw.". If
2483 you wish to change this, do so in your
2484 .vimrc.
2485
2486NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2
2487
2488Netrw has been designed to handle user options by saving them, setting the
2489options to something that's compatible with netrw's needs, and then restoring
2490them. However, the autochdir option: >
2491 :set acd
2492is problematical. Autochdir sets the current directory to that containing the
2493file you edit; this apparently also applies to directories. In other words,
2494autochdir sets the current directory to that containing the "file" (even if
2495that "file" is itself a directory).
2496
Bram Moolenaar15146672011-10-20 22:22:38 +02002497NETRW SETTINGS WINDOW *netrw-settings-window* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002498
2499With the NetrwSettings.vim plugin, >
2500 :NetrwSettings
2501will bring up a window with the many variables that netrw uses for its
Bram Moolenaar1afcace2005-11-25 19:54:28 +00002502settings. You may change any of their values; when you save the file, the
2503settings therein will be used. One may also press "?" on any of the lines for
2504help on what each of the variables do.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002505
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002506(also see: |netrw-browser-var| |netrw-protocol| |netrw-variables|)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002507
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002508
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00002509==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00002510OBTAINING A FILE *netrw-O* {{{2
2511
2512If there are no marked files:
2513
2514 When browsing a remote directory, one may obtain a file under the cursor
2515 (ie. get a copy on your local machine, but not edit it) by pressing the O
2516 key.
2517
2518If there are marked files:
2519
2520 The marked files will be obtained (ie. a copy will be transferred to your
2521 local machine, but not set up for editing).
2522
2523Only ftp and scp are supported for this operation (but since these two are
2524available for browsing, that shouldn't be a problem). The status bar will
2525then show, on its right hand side, a message like "Obtaining filename". The
2526statusline will be restored after the transfer is complete.
2527
2528Netrw can also "obtain" a file using the local browser. Netrw's display
2529of a directory is not necessarily the same as Vim's "current directory",
2530unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
2531a file using the local browser (by putting the cursor on it) and pressing
2532"O" will then "obtain" the file; ie. copy it to Vim's current directory.
2533
2534Related topics:
2535 * To see what the current directory is, use |:pwd|
2536 * To make the currently browsed directory the current directory, see |netrw-c|
2537 * To automatically make the currently browsed directory the current
2538 directory, see |g:netrw_keepdir|.
2539
Bram Moolenaaradc21822011-04-01 18:03:16 +02002540 *netrw-createfile*
Bram Moolenaarc236c162008-07-13 17:41:49 +00002541OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
2542
2543To open a file in netrw's current directory, press "%". This map will
2544query the user for a new filename; an empty file by that name will be
2545placed in the netrw's current directory (ie. b:netrw_curdir).
2546
2547
Bram Moolenaar446cb832008-06-24 21:56:24 +00002548PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2
2549
2550One may use a preview window by using the "p" key when the cursor is atop the
2551desired filename to be previewed. The display will then split to show both
2552the browser (where the cursor will remain) and the file (see |:pedit|).
2553By default, the split will be taken horizontally; one may use vertical
2554splitting if one has set |g:netrw_preview| first.
2555
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002556An interesting set of netrw settings is: >
2557
2558 let g:netrw_preview = 1
2559 let g:netrw_liststyle = 3
2560 let g:netrw_winsize = 30
2561
2562These will:
2563 1. Make vertical splitting the default for previewing files
2564 2. Make the default listing style "tree"
2565 3. When a vertical preview window is opened, the directory listing
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002566 will use only 30% of the columns available; the rest of the window
2567 is used for the preview window.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002568
2569PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
2570
2571To edit a file or directory in the previously used (last accessed) window (see
2572:he |CTRL-W_p|), press a "P". If there's only one window, then the one window
Bram Moolenaar15146672011-10-20 22:22:38 +02002573will be horizontally split (by default).
Bram Moolenaar446cb832008-06-24 21:56:24 +00002574
2575If there's more than one window, the previous window will be re-used on
2576the selected file/directory. If the previous window's associated buffer
2577has been modified, and there's only one window with that buffer, then
2578the user will be asked if s/he wishes to save the buffer first (yes,
2579no, or cancel).
2580
Bram Moolenaarff034192013-04-24 18:51:19 +02002581Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
Bram Moolenaar15146672011-10-20 22:22:38 +02002582Associated setting variables:
2583 |g:netrw_alto| control above/below splitting
2584 |g:netrw_altv| control right/left splitting
2585 |g:netrw_preview| control horizontal vs vertical splitting
2586 |g:netrw_winsize| control initial sizing
2587
Bram Moolenaar446cb832008-06-24 21:56:24 +00002588
2589REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2
2590
2591To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
2592hit the <cr> when atop the ./ directory entry in the listing. One may also
2593refresh a local directory by using ":e .".
2594
2595
Bram Moolenaarff034192013-04-24 18:51:19 +02002596REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2
2597
2598One may toggle between normal and reverse sorting order by pressing the
2599"r" key.
2600
2601Related topics: |netrw-s|
2602Associated setting variable: |g:netrw_sort_direction|
2603
2604
Bram Moolenaar446cb832008-06-24 21:56:24 +00002605RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2
2606
2607If there are no marked files: (see |netrw-mf|)
2608
2609 Renaming/moving files and directories involves moving the cursor to the
2610 file/directory to be moved (renamed) and pressing "R". You will then be
2611 queried for where you want the file/directory to be moved. You may select
2612 a range of lines with the "V" command (visual selection), and then
2613 pressing "R".
2614
2615If there are marked files: (see |netrw-mf|)
2616
2617 Marked files will be renamed (moved). You will be queried as above in
2618 order to specify where you want the file/directory to be moved.
2619
2620 WARNING:~
2621
2622 Note that moving files is a dangerous operation; copies are safer. That's
2623 because a "move" for remote files is actually a copy + delete -- and if
2624 the copy fails and the delete does not, you may lose the file.
2625
2626The g:netrw_rename_cmd variable is used to implement renaming. By default its
2627value is:
2628
2629 ssh HOSTNAME mv
2630
2631One may rename a block of files and directories by selecting them with
2632the V (|linewise-visual|).
2633
2634
Bram Moolenaar446cb832008-06-24 21:56:24 +00002635SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
2636
2637One may select the sorting style by name, time, or (file) size. The "s" map
2638allows one to circulate amongst the three choices; the directory listing will
2639automatically be refreshed to reflect the selected style.
2640
2641Related topics: |netrw-r| |netrw-S|
2642Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
2643
2644
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002645SETTING EDITING WINDOW *netrw-C* {{{2
2646
2647One may select a netrw window for editing with the "C" mapping, or by setting
2648g:netrw_chgwin to the selected window number. Subsequent selection of a file
2649to edit (|netrw-cr|) will use that window.
2650
2651Related topics: |netrw-cr|
2652Associated setting variables: |g:netrw_chgwin|
2653
2654
Bram Moolenaar446cb832008-06-24 21:56:24 +0000265510. Problems and Fixes *netrw-problems* {{{1
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002656
2657 (This section is likely to grow as I get feedback)
2658 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00002659 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002660 P1. I use windows 95, and my ftp dumps four blank lines at the
2661 end of every read.
2662
2663 See |netrw-fixup|, and put the following into your
2664 <.vimrc> file:
2665
2666 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002667
Bram Moolenaar488c6512005-08-11 20:09:58 +00002668 *netrw-p2*
Bram Moolenaar9964e462007-05-05 17:54:07 +00002669 P2. I use Windows, and my network browsing with ftp doesn't sort by
2670 time or size! -or- The remote system is a Windows server; why
2671 don't I get sorts by time or size?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002672
2673 Windows' ftp has a minimal support for ls (ie. it doesn't
2674 accept sorting options). It doesn't support the -F which
2675 gives an explanatory character (ABC/ for "ABC is a directory").
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002676 Netrw then uses "dir" to get both its thin and long listings.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002677 If you think your ftp does support a full-up ls, put the
2678 following into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002679
Bram Moolenaar9964e462007-05-05 17:54:07 +00002680 let g:netrw_ftp_list_cmd = "ls -lF"
2681 let g:netrw_ftp_timelist_cmd= "ls -tlF"
2682 let g:netrw_ftp_sizelist_cmd= "ls -slF"
2683<
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002684 Alternatively, if you have cygwin on your Windows box, put
Bram Moolenaar9964e462007-05-05 17:54:07 +00002685 into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002686
2687 let g:netrw_cygwin= 1
Bram Moolenaar9964e462007-05-05 17:54:07 +00002688<
2689 This problem also occurs when the remote system is Windows.
2690 In this situation, the various g:netrw_ftp_[time|size]list_cmds
2691 are as shown above, but the remote system will not correctly
2692 modify its listing behavior.
2693
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002694
Bram Moolenaar488c6512005-08-11 20:09:58 +00002695 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002696 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
2697 used ssh! That wasn't what I asked for...
2698
2699 Netrw has two methods for browsing remote directories: ssh
2700 and ftp. Unless you specify ftp specifically, ssh is used.
2701 When it comes time to do download a file (not just a directory
2702 listing), netrw will use the given protocol to do so.
2703
Bram Moolenaar488c6512005-08-11 20:09:58 +00002704 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002705 P4. I would like long listings to be the default.
2706
Bram Moolenaar446cb832008-06-24 21:56:24 +00002707 Put the following statement into your |.vimrc|: >
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002708
Bram Moolenaar446cb832008-06-24 21:56:24 +00002709 let g:netrw_liststyle= 1
2710<
2711 Check out |netrw-browser-var| for more customizations that
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002712 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002713
Bram Moolenaar488c6512005-08-11 20:09:58 +00002714 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002715 P5. My times come up oddly in local browsing
2716
2717 Does your system's strftime() accept the "%c" to yield dates
Bram Moolenaarff034192013-04-24 18:51:19 +02002718 such as "Sun Apr 27 11:49:23 1997"? If not, do a
2719 "man strftime" and find out what option should be used. Then
2720 put it into your |.vimrc|: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002721
Bram Moolenaar446cb832008-06-24 21:56:24 +00002722 let g:netrw_timefmt= "%X" (where X is the option)
2723<
Bram Moolenaar488c6512005-08-11 20:09:58 +00002724 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002725 P6. I want my current directory to track my browsing.
2726 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002727
Bram Moolenaar446cb832008-06-24 21:56:24 +00002728 Put the following line in your |.vimrc|:
2729>
Bram Moolenaar433f7c82006-03-21 21:29:36 +00002730 let g:netrw_keepdir= 0
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002731<
Bram Moolenaar9964e462007-05-05 17:54:07 +00002732 *netrw-p7*
2733 P7. I use Chinese (or other non-ascii) characters in my filenames, and
2734 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002735
Bram Moolenaar9964e462007-05-05 17:54:07 +00002736 (taken from an answer provided by Wu Yongwei on the vim
2737 mailing list)
2738 I now see the problem. You code page is not 936, right? Vim
2739 seems only able to open files with names that are valid in the
2740 current code page, as are many other applications that do not
2741 use the Unicode version of Windows APIs. This is an OS-related
2742 issue. You should not have such problems when the system
2743 locale uses UTF-8, such as modern Linux distros.
2744
2745 (...it is one more reason to recommend that people use utf-8!)
2746
2747 *netrw-p8*
2748 P8. I'm getting "ssh is not executable on your system" -- what do I
2749 do?
2750
2751 (Dudley Fox) Most people I know use putty for windows ssh. It
2752 is a free ssh/telnet application. You can read more about it
2753 here:
2754
2755 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also:
2756
2757 (Marlin Unruh) This program also works for me. It's a single
2758 executable, so he/she can copy it into the Windows\System32
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002759 folder and create a shortcut to it.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002760
2761 (Dudley Fox) You might also wish to consider plink, as it
2762 sounds most similar to what you are looking for. plink is an
2763 application in the putty suite.
2764
2765 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink
2766
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002767 (Vissale Neang) Maybe you can try OpenSSH for windows, which
Bram Moolenaar9964e462007-05-05 17:54:07 +00002768 can be obtained from:
2769
2770 http://sshwindows.sourceforge.net/
2771
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002772 It doesn't need the full Cygwin package.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002773
2774 (Antoine Mechelynck) For individual Unix-like programs needed
2775 for work in a native-Windows environment, I recommend getting
2776 them from the GnuWin32 project on sourceforge if it has them:
2777
2778 http://gnuwin32.sourceforge.net/
2779
2780 Unlike Cygwin, which sets up a Unix-like virtual machine on
2781 top of Windows, GnuWin32 is a rewrite of Unix utilities with
2782 Windows system calls, and its programs works quite well in the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002783 cmd.exe "Dos box".
Bram Moolenaar9964e462007-05-05 17:54:07 +00002784
2785 (dave) Download WinSCP and use that to connect to the server.
2786 In Preferences > Editors, set gvim as your editor:
2787
2788 - Click "Add..."
2789 - Set External Editor (adjust path as needed, include
2790 the quotes and !.! at the end):
2791 "c:\Program Files\Vim\vim70\gvim.exe" !.!
2792 - Check that the filetype in the box below is
2793 {asterisk}.{asterisk} (all files), or whatever types
2794 you want (cec: change {asterisk} to * ; I had to
2795 write it that way because otherwise the helptags
Bram Moolenaar446cb832008-06-24 21:56:24 +00002796 system thinks it's a tag)
2797 - Make sure it's at the top of the listbox (click it,
2798 then click "Up" if it's not)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002799 If using the Norton Commander style, you just have to hit <F4>
2800 to edit a file in a local copy of gvim.
2801
2802 (Vit Gottwald) How to generate public/private key and save
2803 public key it on server: >
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002804 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready
2805 (8.3 Getting ready for public key authentication)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002806<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002807 How to use a private key with 'pscp': >
2808
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002809 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html
2810 (5.2.4 Using public key authentication with PSCP)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002811<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002812 (Ben Schmidt) I find the ssh included with cwRsync is
2813 brilliant, and install cwRsync or cwRsyncServer on most
2814 Windows systems I come across these days. I guess COPSSH,
2815 packed by the same person, is probably even better for use as
2816 just ssh on Windows, and probably includes sftp, etc. which I
2817 suspect the cwRsync doesn't, though it might
2818
Bram Moolenaar9964e462007-05-05 17:54:07 +00002819 (cec) To make proper use of these suggestions above, you will
2820 need to modify the following user-settable variables in your
2821 .vimrc:
2822
Bram Moolenaar446cb832008-06-24 21:56:24 +00002823 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd|
2824 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
Bram Moolenaar9964e462007-05-05 17:54:07 +00002825
2826 The first one (|g:netrw_ssh_cmd|) is the most important; most
2827 of the others will use the string in g:netrw_ssh_cmd by
2828 default.
2829 *netrw-p9* *netrw-ml_get*
2830 P9. I'm browsing, changing directory, and bang! ml_get errors
2831 appear and I have to kill vim. Any way around this?
2832
2833 Normally netrw attempts to avoid writing swapfiles for
2834 its temporary directory buffers. However, on some systems
2835 this attempt appears to be causing ml_get errors to
2836 appear. Please try setting |g:netrw_use_noswf| to 0
2837 in your <.vimrc>: >
2838 let g:netrw_use_noswf= 0
2839<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002840 *netrw-p10*
2841 P10. I'm being pestered with "[something] is a directory" and
2842 "Press ENTER or type command to continue" prompts...
2843
2844 The "[something] is a directory" prompt is issued by Vim,
2845 not by netrw, and there appears to be no way to work around
2846 it. Coupled with the default cmdheight of 1, this message
2847 causes the "Press ENTER..." prompt. So: read |hit-enter|;
2848 I also suggest that you set your |'cmdheight'| to 2 (or more) in
2849 your <.vimrc> file.
2850
2851 *netrw-p11*
2852 P11. I want to have two windows; a thin one on the left and my editing
Bram Moolenaar251e1912011-06-19 05:09:16 +02002853 window on the right. How may I accomplish this?
Bram Moolenaar446cb832008-06-24 21:56:24 +00002854
2855 * Put the following line in your <.vimrc>:
2856 let g:netrw_altv = 1
2857 * Edit the current directory: :e .
2858 * Select some file, press v
2859 * Resize the windows as you wish (see |CTRL-W_<| and
2860 |CTRL-W_>|). If you're using gvim, you can drag
2861 the separating bar with your mouse.
2862 * When you want a new file, use ctrl-w h to go back to the
2863 netrw browser, select a file, then press P (see |CTRL-W_h|
2864 and |netrw-P|). If you're using gvim, you can press
2865 <leftmouse> in the browser window and then press the
2866 <middlemouse> to select the file.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002867
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002868 *netrw-p12*
2869 P12. My directory isn't sorting correctly, or unwanted letters are
2870 appearing in the listed filenames, or things aren't lining
2871 up properly in the wide listing, ...
2872
2873 This may be due to an encoding problem. I myself usually use
2874 utf-8, but really only use ascii (ie. bytes from 32-126).
2875 Multibyte encodings use two (or more) bytes per character.
2876 You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
2877
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002878 *netrw-p13*
2879 P13. I'm a Windows + putty + ssh user, and when I attempt to browse,
2880 the directories are missing trailing "/"s so netrw treats them
2881 as file transfers instead of as attempts to browse
2882 subdirectories. How may I fix this?
2883
2884 (mikeyao) If you want to use vim via ssh and putty under Windows,
2885 try combining the use of pscp/psftp with plink. pscp/psftp will
2886 be used to connect and plink will be used to execute commands on
2887 the server, for example: list files and directory using 'ls'.
2888
2889 These are the settings I use to do this:
2890>
2891 " list files, it's the key setting, if you haven't set,
2892 " you will get a blank buffer
2893 let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"
2894 " if you haven't add putty directory in system path, you should
2895 " specify scp/sftp command. For examples:
2896 "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
2897 "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
2898<
Bram Moolenaar251e1912011-06-19 05:09:16 +02002899 *netrw-p14*
2900 P14. I'd would like to speed up writes using Nwrite and scp/ssh
2901 style connections. How? (Thomer M. Gil)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002902
Bram Moolenaar251e1912011-06-19 05:09:16 +02002903 Try using ssh's ControlMaster and ControlPath (see the ssh_config
2904 man page) to share multiple ssh connections over a single network
2905 connection. That cuts out the cryptographic handshake on each
2906 file write, sometimes speeding it up by an order of magnitude.
2907 (see http://thomer.com/howtos/netrw_ssh.html)
2908 (included by permission)
2909
2910 Add the following to your ~/.ssh/config: >
2911
2912 # you change "*" to the hostname you care about
2913 Host *
2914 ControlMaster auto
2915 ControlPath /tmp/%r@%h:%p
2916
2917< Then create an ssh connection to the host and leave it running: >
2918
2919 ssh -N host.domain.com
2920
2921< Now remotely open a file with Vim's Netrw and enjoy the
2922 zippiness: >
2923
2924 vim scp://host.domain.com//home/user/.bashrc
2925<
2926 *netrw-p15*
2927 P15. How may I use a double-click instead of netrw's usual single click
2928 to open a file or directory? (Ben Fritz)
2929
2930 First, disable netrw's mapping with >
2931 let g:netrw_mousemaps= 0
2932< and then create a netrw buffer only mapping in
2933 $HOME/.vim/after/ftplugin/netrw.vim: >
2934 nmap <buffer> <2-leftmouse> <CR>
2935< Note that setting g:netrw_mousemaps to zero will turn off
2936 all netrw's mouse mappings, not just the <leftmouse> one.
2937 (see |g:netrw_mousemaps|)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002938
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002939==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000294011. Debugging Netrw Itself *netrw-debug* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00002941
Bram Moolenaaradc21822011-04-01 18:03:16 +02002942The <netrw.vim> script is typically available as something like:
Bram Moolenaar488c6512005-08-11 20:09:58 +00002943>
Bram Moolenaar446cb832008-06-24 21:56:24 +00002944 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
2945 /usr/local/share/vim/vim7x/autoload/netrw.vim
Bram Moolenaaradc21822011-04-01 18:03:16 +02002946< -or- >
2947 /usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
2948 /usr/local/share/vim/vim6x/autoload/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00002949<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002950which is loaded automatically at startup (assuming :set nocp).
2951
2952 1. Get the <Decho.vim> script, available as:
2953
Bram Moolenaar97d62492012-11-15 21:28:22 +01002954 http://www.drchip.org/astronaut/vim/index.html#DECHO
Bram Moolenaar071d4272004-06-13 20:20:40 +00002955 or
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00002956 http://vim.sourceforge.net/scripts/script.php?script_id=120
Bram Moolenaar071d4272004-06-13 20:20:40 +00002957
Bram Moolenaar446cb832008-06-24 21:56:24 +00002958 It now comes as a "vimball"; if you're using vim 7.0 or earlier,
2959 you'll need to update vimball, too. See
Bram Moolenaar97d62492012-11-15 21:28:22 +01002960 http://www.drchip.org/astronaut/vim/index.html#VIMBALL
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002961
Bram Moolenaar446cb832008-06-24 21:56:24 +00002962 2. Edit the <netrw.vim> file by typing: >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002963
2964 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00002965 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002966 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00002967<
2968 To restore to normal non-debugging behavior, re-edit <netrw.vim>
2969 and type >
Bram Moolenaar071d4272004-06-13 20:20:40 +00002970
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002971 vim netrw.vim
2972 :DechoOff
2973 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00002974<
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002975 This command, provided by <Decho.vim>, will comment out all
2976 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
2977
Bram Moolenaar446cb832008-06-24 21:56:24 +00002978 3. Then bring up vim and attempt to evoke the problem by doing a
2979 transfer or doing some browsing. A set of messages should appear
2980 concerning the steps that <netrw.vim> took in attempting to
2981 read/write your file over the network in a separate tab.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002982
Bram Moolenaar9964e462007-05-05 17:54:07 +00002983 To save the file, use >
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002984 :tabnext
Bram Moolenaar9964e462007-05-05 17:54:07 +00002985 :set bt=
2986 :w! DBG
2987< Please send that information to <netrw.vim>'s maintainer, >
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00002988 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar9964e462007-05-05 17:54:07 +00002989<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002990==============================================================================
Bram Moolenaar9964e462007-05-05 17:54:07 +0000299112. History *netrw-history* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00002992
Bram Moolenaarff034192013-04-24 18:51:19 +02002993 v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct
2994 choice of listing style, hiding style, and
2995 sorting style
2996 v147: Nov 24, 2012 * (James McCoy) Even with g:netrw_dirhistmax
2997 at zero, the .vim/ directory would be
2998 created to support history/bookmarks. I've
2999 gone over netrw to suppress history and
3000 bookmarking when g:netrw_dirhistmax is zero.
3001 For instance, the menus will display
3002 (disabled) when attempts to use
3003 bookmarks/history are made.
3004 Nov 29, 2012 * (Kim Jang-hwan) reported that with
3005 g:Align_xstrlen set to 3 that the cursor was
3006 moved (linewise) after invocation. This
3007 problem also afflicted netrw.
3008 (see |g:netrw_xstrlen|) Fixed.
3009 Jan 21, 2013 * (mattn) provided a patch to insert some
3010 endifs needed with the code implementing
3011 |netrw-O|.
3012 Jan 24, 2013 * (John Szakmeister) found that remote file
3013 editing resulted in filetype options being
3014 overwritten by NetrwOptionRestore(). I
3015 moved filetype detect from NetrwGetFile()
3016 to NetrwOptionRestore.
3017 Feb 17, 2013 * (Yukhiro Nakadaira) provided a patch
3018 correcting some syntax errors.
3019 Feb 28, 2013 * (Ingo Karkat) provided a patch preventing
3020 receipt of an |E95| when revisiting a
3021 file://... style url.
3022 Mar 18, 2013 * (Gary Johnson) pointed out that changing
3023 cedit to <Esc> caused problems with visincr;
3024 the cedit setting is now bypassed in netrw too.
3025 Apr 02, 2013 * (Paul Domaskis) reported an undefined
3026 variable error (s:didstarstar) was
3027 occurring. It is now defined at
3028 initialization.
3029 * included additional sanity checking for the
3030 marked file functions.
3031 * included |netrw-qF| and special "j" option
3032 handling for |netrw-mg|
3033 Apr 12, 2013 * |netrw-u| and |netrw-U| now handle counts
3034 * the former mapping for "T" has been removed;
3035 in its place are new maps, |netrw-Tb| and |netrw-Th|.
3036 * the menu now supports a "Targets" entry for
3037 easier target selection. (see |netrw-mt|)
3038 * (Paul Domaskis) reported some problems with
3039 moving/copying files under Windows' gvim
3040 (ie. not cygwin). Fixed.
3041 * (Paul Mueller) provided a patch to get
3042 start and rundll working via |netrw-gx|
3043 by bypassing the user's |'shellslash'| option.
Bram Moolenaar97d62492012-11-15 21:28:22 +01003044 v146: Oct 20, 2012 * (David Kotchan) reported that under Windows,
3045 directories named with unusual characters
3046 such as "#" or "$" were not being listed
3047 properly.
3048 * (Kenny Lee) reported that the buffer list
3049 was being populated by netrw buffers.
3050 Netrw will now |:bwipe| netrw buffers
3051 upon editing a file if g:netrw_fastbrowse
3052 is zero and its not in tree listing style.
Bram Moolenaarff034192013-04-24 18:51:19 +02003053 * fixed a bug with s:NetrwInit() that
3054 prevented initialization with |Lists| and
3055 |Dictionaries|.
3056 * |netrw-mu| now unmarks marked-file lists
Bram Moolenaar97d62492012-11-15 21:28:22 +01003057 v145: Apr 05, 2012 * moved some command from a g:netrw_local_...
3058 format to g:netwr_local... format
3059 * included some NOTE level messages about
3060 commands that aren't executable
3061 * |g:netrw_errorlvl| (default: NOTE=0)
3062 option introduced
3063 May 18, 2012 * (Ilya Dogolazky) a scenario where a
3064 |g:netrw_fastbrowse| of zero did not
3065 have a local directory refreshed fixed.
3066 Jul 10, 2012 * (Donatas) |netrw-gb| wasn't working due
3067 to an incorrectly used variable.
3068 Aug 09, 2012 * (Bart Baker) netrw was doubling
3069 of entries after a split.
3070 * (code by Takahiro Yoshihara) implemented
3071 |g:netrw_dynamic_maxfilenamelen|
3072 Aug 31, 2012 * (Andrew Wong) netrw refresh overwriting
3073 the yank buffer.
3074 v144: Mar 12, 2012 * when |CTRL-W_s| or |CTRL-W_v| are used,
3075 or their wincmd equivalents, on a netrw
3076 buffer, the netrw's w: variables were
3077 not copied over. Fixed.
3078 Mar 13, 2012 * nbcd_curpos_{bufnr('%')} was commented
3079 out, and was mistakenly used during
3080 RestorePosn. Unfortunately, I'm not
3081 sure why it was commented out, so this
3082 "fix" may re-introduce an earlier problem.
3083 Mar 21, 2012 * included s:rexposn internally to make
3084 :Rex return the cursor to the same pos'n
3085 upon restoration of netrw buffer
3086 Mar 27, 2012 * (sjbesse) s:NetrwGetFile() needs to remove
3087 "/" from the netrw buffer's usual |'isk'|
3088 in order to allow "filetype detect" to work
3089 properly for scripts.
3090 v143: Jun 01, 2011 * |g:netrw_winsize| will accept a negative
3091 number; the absolute value of it will then
3092 be used to specify lines/columns instead of
3093 a percentage.
3094 Jul 05, 2011 * the "d" map now supports mkdir via ftp
3095 See |netrw-d| and |g:netrw_remote_mkdir|
3096 Jul 11, 2011 * Changed Explore!, Sexplore!, and Vexplore
3097 to use a percentage of |winwidth()| instead
3098 of a percentage of |winheight()|.
3099 Jul 11, 2011 * included support for https://... I'm just
3100 beginning to test this, however.
3101 Aug 01, 2011 * changed RestoreOptions to also restore
3102 cursor position in netrw buffers.
3103 Aug 12, 2011 * added a note about "%" to the balloon
3104 Aug 30, 2011 * if |g:netrw_nobeval| exists, then balloon
3105 evaluation is suppressed.
3106 Aug 31, 2011 * (Benjamin R Haskell) provided a patch that
3107 implements non-standard port handling for
3108 files opened via the remote browser.
3109 Aug 31, 2011 * Fixed a **//pattern Explorer bug
3110 Sep 15, 2011 * (reported by Francesco Campana) netrw
3111 now permits the "@" to be part of the
3112 user id (if there's an @ that appears
3113 to the right).
3114 Nov 21, 2011 * New option: |g:netrw_ftp_options|
3115 Dec 07, 2011 * (James Sinclair) provided a fix handling
3116 attempts to use a uid and password when
3117 they weren't defined. This affected
3118 NetWrite (NetRead already had that fix).
Bram Moolenaar071d4272004-06-13 20:20:40 +00003119
3120
3121==============================================================================
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100312213. Todo *netrw-todo* {{{1
3123
312407/29/09 : banner :|g:netrw_banner| can be used to suppress the
3125 suppression banner. This feature is new and experimental,
3126 so its in the process of being debugged.
312709/04/09 : "gp" : See if it can be made to work for remote systems.
3128 : See if it can be made to work with marked files.
3129
3130==============================================================================
313114. Credits *netrw-credits* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00003132
3133 Vim editor by Bram Moolenaar (Thanks, Bram!)
3134 dav support by C Campbell
3135 fetch support by Bram Moolenaar and C Campbell
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003136 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
Bram Moolenaar071d4272004-06-13 20:20:40 +00003137 http support by Bram Moolenaar <bram@moolenaar.net>
3138 rcp
3139 rsync support by C Campbell (suggested by Erik Warendorph)
3140 scp support by raf <raf@comdyn.com.au>
3141 sftp support by C Campbell
3142
3143 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
3144
3145 Jérôme Augé -- also using new buffer method with ftp+.netrc
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003146 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003147 fetch,...
Bram Moolenaar071d4272004-06-13 20:20:40 +00003148 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
3149 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
3150 variables, rsync etc)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003151 Doug Claar -- modifications to test for success with ftp
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003152 operation
Bram Moolenaar071d4272004-06-13 20:20:40 +00003153
3154==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00003155Modelines: {{{1
Bram Moolenaar83bab712005-08-01 21:58:57 +00003156 vim:tw=78:ts=8:ft=help:norl:fdm=marker