blob: 1ee4b6a5253aaed85ff3ca28c7358aad6cc7f9ea [file] [log] [blame]
Bram Moolenaar251e1912011-06-19 05:09:16 +02001*pi_netrw.txt* For Vim version 7.3. Last change: 2011 May 31
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
Bram Moolenaar9964e462007-05-05 17:54:07 +00003 -----------------------------------------------------
4 NETRW REFERENCE MANUAL by Charles E. Campbell, Jr.
5 -----------------------------------------------------
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01006Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
7 (remove NOSPAM from Campbell's email first)
8
Bram Moolenaaradc21822011-04-01 18:03:16 +02009Copyright: Copyright (C) 1999-2011 Charles E Campbell, Jr *netrw-copyright*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010010 Permission is hereby granted to use and distribute this code, with
11 or without modifications, provided that this copyright notice is
12 copied with it. Like anything else that's free, netrw.vim,
13 netrwPlugin.vim, netrwFileHandlers.vim, netrwSettings.vim,
14 syntax/netrw.vim, and pi_netrw.txt are provided *as is* and comes
15 with no warranty of any kind, either expressed or implied. No
16 guarantees of merchantability. No guarantees of suitability for
17 any purpose. By using this plugin, you agree that in no event will
18 the copyright holder be liable for any damages resulting from the
19 use of this software.
Bram Moolenaar071d4272004-06-13 20:20:40 +000020
Bram Moolenaar1afcace2005-11-25 19:54:28 +000021
Bram Moolenaar00a927d2010-05-14 23:24:24 +020022 *dav* *ftp* *netrw-file* *rcp* *scp*
23 *davs* *http* *netrw.vim* *rsync* *sftp*
24 *fetch* *netrw* *network*
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
26==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000271. Contents *netrw-contents* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +000028
Bram Moolenaar9964e462007-05-05 17:54:07 +0000291. Contents.............................................|netrw-contents|
302. Starting With Netrw..................................|netrw-start|
313. Netrw Reference......................................|netrw-ref|
Bram Moolenaar446cb832008-06-24 21:56:24 +000032 EXTERNAL APPLICATIONS AND PROTOCOLS................|netrw-externapp|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000033 READING............................................|netrw-read|
34 WRITING............................................|netrw-write|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010035 SOURCING...........................................|netrw-source|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000036 DIRECTORY LISTING..................................|netrw-dirlist|
37 CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
Bram Moolenaar446cb832008-06-24 21:56:24 +000038 VARIABLES AND SETTINGS.............................|netrw-variables|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000039 PATHS..............................................|netrw-path|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000404. Network-Oriented File Transfer.......................|netrw-xfer|
Bram Moolenaar83bab712005-08-01 21:58:57 +000041 NETRC..............................................|netrw-netrc|
42 PASSWORD...........................................|netrw-passwd|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000435. Activation...........................................|netrw-activate|
Bram Moolenaaradc21822011-04-01 18:03:16 +0200446. Transparent Remote File Editing......................|netrw-transparent|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000457. Ex Commands..........................................|netrw-ex|
468. Variables and Options................................|netrw-var|
Bram Moolenaar446cb832008-06-24 21:56:24 +0000479. Browsing.............................................|netrw-browse|
48 Introduction To Browsing...........................|netrw-intro-browse|
49 Quick Reference: Maps..............................|netrw-browse-maps|
50 Quick Reference: Commands..........................|netrw-browse-cmds|
51 Bookmarking A Directory............................|netrw-mb|
Bram Moolenaar83bab712005-08-01 21:58:57 +000052 Browsing...........................................|netrw-cr|
Bram Moolenaar83bab712005-08-01 21:58:57 +000053 Browsing With A Horizontally Split Window..........|netrw-o|
Bram Moolenaar9964e462007-05-05 17:54:07 +000054 Browsing With A New Tab............................|netrw-t|
Bram Moolenaar446cb832008-06-24 21:56:24 +000055 Browsing With A Vertically Split Window............|netrw-v|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010056 Change Listing Style.(thin wide long tree).........|netrw-i|
Bram Moolenaar446cb832008-06-24 21:56:24 +000057 Changing To A Bookmarked Directory.................|netrw-gb|
Bram Moolenaar83bab712005-08-01 21:58:57 +000058 Changing To A Predecessor Directory................|netrw-u|
59 Changing To A Successor Directory..................|netrw-U|
Bram Moolenaar83bab712005-08-01 21:58:57 +000060 Customizing Browsing With A User Function..........|netrw-x|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010061 Deleting Bookmarks.................................|netrw-mB|
Bram Moolenaar446cb832008-06-24 21:56:24 +000062 Deleting Files Or Directories......................|netrw-D|
63 Directory Exploring Commands.......................|netrw-explore|
64 Exploring With Stars and Patterns..................|netrw-star|
65 Displaying Information About File..................|netrw-qf|
66 Edit File Or Directory Hiding List.................|netrw-ctrl-h|
67 Editing The Sorting Sequence.......................|netrw-S|
Bram Moolenaaradc21822011-04-01 18:03:16 +020068 Forcing treatment as a file or directory...........|netrw-gd| |netrw-gf|
Bram Moolenaar446cb832008-06-24 21:56:24 +000069 Going Up...........................................|netrw--|
70 Hiding Files Or Directories........................|netrw-a|
71 Improving Browsing.................................|netrw-ssh-hack|
72 Listing Bookmarks And History......................|netrw-qb|
73 Making A New Directory.............................|netrw-d|
Bram Moolenaar83bab712005-08-01 21:58:57 +000074 Making The Browsing Directory The Current Directory|netrw-c|
Bram Moolenaar446cb832008-06-24 21:56:24 +000075 Marking Files......................................|netrw-mf|
76 Marking Files By Regular Expression................|netrw-mr|
77 Marked Files: Arbitrary Command....................|netrw-mx|
78 Marked Files: Compression And Decompression........|netrw-mz|
79 Marked Files: Copying..............................|netrw-mc|
80 Marked Files: Diff.................................|netrw-md|
81 Marked Files: Editing..............................|netrw-me|
82 Marked Files: Grep.................................|netrw-mg|
83 Marked Files: Hiding and Unhiding by Suffix........|netrw-mh|
84 Marked Files: Moving...............................|netrw-mm|
85 Marked Files: Printing.............................|netrw-mp|
86 Marked Files: Sourcing.............................|netrw-ms|
87 Marked Files: Tagging..............................|netrw-mT|
88 Marked Files: Setting the Target Directory.........|netrw-mt|
89 Marked Files: Unmarking............................|netrw-mu|
90 Netrw Browser Variables............................|netrw-browser-var|
91 Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
92 Netrw Settings.....................................|netrw-settings|
93 Obtaining A File...................................|netrw-O|
94 Preview Window.....................................|netrw-p|
95 Previous Window....................................|netrw-P|
96 Refreshing The Listing.............................|netrw-ctrl-l|
97 Renaming Files Or Directories......................|netrw-move|
98 Reversing Sorting Order............................|netrw-r|
99 Selecting Sorting Style............................|netrw-s|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100100 Setting Editing Window.............................|netrw-C|
Bram Moolenaar9964e462007-05-05 17:54:07 +000010110. Problems and Fixes...................................|netrw-problems|
Bram Moolenaar446cb832008-06-24 21:56:24 +000010211. Debugging Netrw Itself...............................|netrw-debug|
Bram Moolenaar9964e462007-05-05 17:54:07 +000010312. History..............................................|netrw-history|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010010413. Todo.................................................|netrw-todo|
10514. Credits..............................................|netrw-credits|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000106
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107{Vi does not have any of this}
108
109==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00001102. Starting With Netrw *netrw-start* {{{1
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000111
Bram Moolenaar446cb832008-06-24 21:56:24 +0000112Netrw makes reading files, writing files, browsing over a network, and
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100113local browsing easy! First, make sure that you have plugins enabled, so
Bram Moolenaar446cb832008-06-24 21:56:24 +0000114you'll need to have at least the following in your <.vimrc>:
115(or see |netrw-activate|) >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000116
Bram Moolenaar9964e462007-05-05 17:54:07 +0000117 set nocp " 'compatible' is not set
118 filetype plugin on " plugins are enabled
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000119<
120(see |'cp'| and |:filetype-plugin-on|)
121
122Netrw supports "transparent" editing of files on other machines using urls
123(see |netrw-transparent|). As an example of this, let's assume you have an
Bram Moolenaar446cb832008-06-24 21:56:24 +0000124account on some other machine; if you can use scp, try: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000125
126 vim scp://hostname/path/to/file
127<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000128Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000129
Bram Moolenaar446cb832008-06-24 21:56:24 +0000130So, what if you have ftp, not ssh/scp? That's easy, too; try >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000131
132 vim ftp://hostname/path/to/file
133<
134Want to make ftp simpler to use? See if your ftp supports a file called
135<.netrc> -- typically it goes in your home directory, has read/write
136permissions for only the user to read (ie. not group, world, other, etc),
137and has lines resembling >
138
139 machine HOSTNAME login USERID password "PASSWORD"
140 machine HOSTNAME login USERID password "PASSWORD"
141 ...
Bram Moolenaar9964e462007-05-05 17:54:07 +0000142 default login USERID password "PASSWORD"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000143<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000144Now about browsing -- when you just want to look around before editing a
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000145file. For browsing on your current host, just "edit" a directory: >
146
147 vim .
148 vim /home/userid/path
149<
150For browsing on a remote host, "edit" a directory (but make sure that
151the directory name is followed by a "/"): >
152
153 vim scp://hostname/
154 vim ftp://hostname/path/to/dir/
155<
156See |netrw-browse| for more!
157
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100158There are more protocols supported by netrw than just scp and ftp, too: see the
159next section, |netrw-externapp|, on how to use these external applications with
160netrw and vim.
161
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200162PREVENTING LOADING *netrw-noload*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000163
164If you want to use plugins, but for some reason don't wish to use netrw, then
165you need to avoid loading both the plugin and the autoload portions of netrw.
166You may do so by placing the following two lines in your <.vimrc>: >
167
168 :let g:loaded_netrw = 1
169 :let g:loaded_netrwPlugin = 1
170<
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000171
172==============================================================================
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001733. Netrw Reference *netrw-ref* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100175 Netrw supports several protocols in addition to scp and ftp as mentioned
Bram Moolenaar446cb832008-06-24 21:56:24 +0000176 in |netrw-start|. These include dav, fetch, http,... well, just look
177 at the list in |netrw-externapp|. Each protocol is associated with a
178 variable which holds the default command supporting that protocol.
179
180EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000181
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000182 Protocol Variable Default Value
183 -------- ---------------- -------------
Bram Moolenaaradc21822011-04-01 18:03:16 +0200184 dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable
185 dav: g:netrw_dav_cmd = "curl -o" elseif curl is available
186 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
187 ftp: *g:netrw_ftp_cmd* = "ftp"
188 http: *g:netrw_http_cmd* = "elinks" if elinks is available
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100189 http: g:netrw_http_cmd = "links" elseif links is available
190 http: g:netrw_http_cmd = "curl" elseif curl is available
191 http: g:netrw_http_cmd = "wget" elseif wget is available
192 http: g:netrw_http_cmd = "fetch" elseif fetch is available
Bram Moolenaaradc21822011-04-01 18:03:16 +0200193 rcp: *g:netrw_rcp_cmd* = "rcp"
194 rsync: *g:netrw_rsync_cmd* = "rsync -a"
195 scp: *g:netrw_scp_cmd* = "scp -q"
196 sftp: *g:netrw_sftp_cmd* = "sftp"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100197
198 *g:netrw_http_xcmd* : the option string for http://... protocols are
199 specified via this variable and may be independently overridden. By
200 default, the option arguments for the http-handling commands are: >
201
202 elinks : "-source >"
203 links : "-source >"
204 curl : "-o"
205 wget : "-q -O"
206 fetch : "-o"
207<
208 For example, if your system has elinks, and you'd rather see the
209 page using an attempt at rendering the text, you may wish to have >
210 let g:netrw_http_xcmd= "-dump >"
211< in your .vimrc.
212
Bram Moolenaar071d4272004-06-13 20:20:40 +0000213
Bram Moolenaar446cb832008-06-24 21:56:24 +0000214READING *netrw-read* *netrw-nread* {{{2
215
216 Generally, one may just use the url notation with a normal editing
217 command, such as >
218
219 :e ftp://[user@]machine/path
220<
221 Netrw also provides the Nread command:
222
Bram Moolenaar071d4272004-06-13 20:20:40 +0000223 :Nread ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000224 :Nread "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000225 :Nread "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000226 :Nread "machine id password path" uses ftp
227 :Nread "dav://machine[:port]/path" uses cadaver
228 :Nread "fetch://[user@]machine/path" uses fetch
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000229 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000230 :Nread "http://[user@]machine/path" uses http uses wget
231 :Nread "rcp://[user@]machine/path" uses rcp
232 :Nread "rsync://[user@]machine[:port]/path" uses rsync
233 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
234 :Nread "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000235
Bram Moolenaar446cb832008-06-24 21:56:24 +0000236WRITING *netrw-write* *netrw-nwrite* {{{2
237
238 One may just use the url notation with a normal file writing
239 command, such as >
240
241 :w ftp://[user@]machine/path
242<
243 Netrw also provides the Nwrite command:
244
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000245 :Nwrite ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000246 :Nwrite "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000247 :Nwrite "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000248 :Nwrite "machine id password path" uses ftp
249 :Nwrite "dav://machine[:port]/path" uses cadaver
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000250 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000251 :Nwrite "rcp://[user@]machine/path" uses rcp
252 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
253 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
254 :Nwrite "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000255 http: not supported!
256
Bram Moolenaar446cb832008-06-24 21:56:24 +0000257SOURCING *netrw-source* {{{2
258
259 One may just use the url notation with the normal file sourcing
260 command, such as >
261
262 :so ftp://[user@]machine/path
263<
264 Netrw also provides the Nsource command:
265
Bram Moolenaar9964e462007-05-05 17:54:07 +0000266 :Nsource ? give help
267 :Nsource "dav://machine[:port]/path" uses cadaver
268 :Nsource "fetch://[user@]machine/path" uses fetch
269 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
270 :Nsource "http://[user@]machine/path" uses http uses wget
271 :Nsource "rcp://[user@]machine/path" uses rcp
272 :Nsource "rsync://[user@]machine[:port]/path" uses rsync
273 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp
274 :Nsource "sftp://[user@]machine/path" uses sftp
275
Bram Moolenaar251e1912011-06-19 05:09:16 +0200276DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +0000277
278 One may browse a directory to get a listing by simply attempting to
279 edit the directory: >
280
281 :e scp://[user]@hostname/path/
282 :e ftp://[user]@hostname/path/
283<
Bram Moolenaar251e1912011-06-19 05:09:16 +0200284 For remote directory listings (ie. those using scp or ftp), that
285 trailing "/" is necessary (the slash tells netrw to treat the argument
286 as a directory to browse instead of as a file to download).
Bram Moolenaar446cb832008-06-24 21:56:24 +0000287
Bram Moolenaar251e1912011-06-19 05:09:16 +0200288 The Nread command may also be used to accomplish this (again, that
289 trailing slash is necessary): >
Bram Moolenaar446cb832008-06-24 21:56:24 +0000290
Bram Moolenaar251e1912011-06-19 05:09:16 +0200291 :Nread [protocol]://[user]@hostname/path/
292<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000293 *netrw-login* *netrw-password*
294CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000295
Bram Moolenaar071d4272004-06-13 20:20:40 +0000296 Attempts to use ftp will prompt you for a user-id and a password.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000297 These will be saved in global variables g:netrw_uid and
Bram Moolenaar446cb832008-06-24 21:56:24 +0000298 s:netrw_passwd; subsequent uses of ftp will re-use those two items to
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000299 simplify the further use of ftp. However, if you need to use a
300 different user id and/or password, you'll want to call NetUserPass()
301 first. To work around the need to enter passwords, check if your ftp
302 supports a <.netrc> file in your home directory. Also see
303 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how
Bram Moolenaar446cb832008-06-24 21:56:24 +0000304 to not need to use passwords, look at |netrw-ssh-hack|).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000305
306 :NetUserPass [uid [password]] -- prompts as needed
307 :call NetUserPass() -- prompts for uid and password
308 :call NetUserPass("uid") -- prompts for password
309 :call NetUserPass("uid","password") -- sets global uid and password
310
Bram Moolenaar446cb832008-06-24 21:56:24 +0000311NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
312(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-var|)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000313
Bram Moolenaar446cb832008-06-24 21:56:24 +0000314Netrw provides a lot of variables which allow you to customize netrw to your
315preferences. One way to look at them is via the command :NetrwSettings (see
316|netrw-settings|) which will display your current netrw settings. Most such
317settings are described below, in |netrw-browser-options|, and in
318|netrw-externapp|:
Bram Moolenaar9964e462007-05-05 17:54:07 +0000319
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100320 *b:netrw_lastfile* last file Network-read/written retained on a
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200321 per-buffer basis (supports plain :Nw )
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100322
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200323 *g:netrw_bufsettings* the settings that netrw buffers have
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200324 (default) noma nomod nonu nowrap ro nobl
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200325
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100326 *g:netrw_chgwin* specifies a window number where file edits will take
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200327 place. (also see |netrw-C|)
328 (default) not defined
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100329
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200330 *g:Netrw_funcref* specifies a function (or functions) to be called when
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200331 netrw edits a file. The file is first edited, and
332 then the function reference (|Funcref|) is called.
333 This variable may also hold a |List| of Funcrefs.
334 (default) not defined
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200335>
336 Example: place in .vimrc; affects all file opening
337 fun! MyFuncRef()
338 endfun
339 let g:Netrw_funcref= function("MyFuncRef")
340<
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000341 *g:netrw_ftp* if it doesn't exist, use default ftp
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200342 =0 use default ftp (uid password)
343 =1 use alternate ftp method (user uid password)
344 If you're having trouble with ftp, try changing the
345 value of this variable to see if the alternate ftp
346 method works for your setup.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000347
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100348 *g:netrw_ftpextracmd* default: doesn't exist
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200349 If this variable exists, then any string it contains
350 will be placed into the commands set to your ftp
351 client. As an example:
352 ="passive"
Bram Moolenaar9964e462007-05-05 17:54:07 +0000353
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000354 *g:netrw_ftpmode* ="binary" (default)
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200355 ="ascii"
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000356
Bram Moolenaar9964e462007-05-05 17:54:07 +0000357 *g:netrw_ignorenetrc* =0 (default for linux, cygwin)
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200358 =1 If you have a <.netrc> file but it doesn't work and
359 you want it ignored, then set this variable as
360 shown. (default for Windows + cmd.exe)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000361
362 *g:netrw_menu* =0 disable netrw's menu
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200363 =1 (default) netrw's menu enabled
Bram Moolenaar9964e462007-05-05 17:54:07 +0000364
365 *g:netrw_nogx* if this variable exists, then the "gx" map will not
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200366 be available (see |netrw-gx|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000367
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100368 *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis
369 *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
Bram Moolenaar446cb832008-06-24 21:56:24 +0000370
371 *g:netrw_preview* =0 (default) preview window shown in a horizontally
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200372 split window
373 =1 preview window shown in a vertically split window.
374 Also affects the "previous window" (see |netrw-P|) in
375 the same way.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000376
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000377 *g:netrw_scpport* = "-P" : option to use to set port for scp
378 *g:netrw_sshport* = "-p" : option to use to set port for ssh
379
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100380 *g:netrw_sepchr* =\0xff
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200381 =\0x01 for enc == euc-jp (and perhaps it should be for
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100382 others, too, please let me
383 know)
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200384 Separates priority codes from filenames internally.
385 See |netrw-p12|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100386
Bram Moolenaar446cb832008-06-24 21:56:24 +0000387 *g:netrw_silent* =0 : transfers done normally
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200388 =1 : transfers done silently
Bram Moolenaar446cb832008-06-24 21:56:24 +0000389
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000390 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200391 line window. This window provides reliable
392 delivery of messages. (default)
393 =0 : messages from netrw will use echoerr ;
394 messages don't always seem to show up this
395 way, but one doesn't have to quit the window.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000396
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000397 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200398 lines that o/s's ftp "provides" on transfers
399 =0 force normal ftp behavior (no trailing line removal)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000400
401 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200402 permits network browsing to use ls with time and
403 size sorting (default if windows)
404 =0 assume Windows' scp accepts windows-style paths
405 Network browsing uses dir instead of ls
406 This option is ignored if you're using unix
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000407
408 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200409 =1 use WinNT's rcp in binary mode (default)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000410
Bram Moolenaar446cb832008-06-24 21:56:24 +0000411PATHS *netrw-path* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000412
413Paths to files are generally user-directory relative for most protocols.
414It is possible that some protocol will make paths relative to some
415associated directory, however.
416>
417 example: vim scp://user@host/somefile
418 example: vim scp://user@host/subdir1/subdir2/somefile
419<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000420where "somefile" is in the "user"'s home directory. If you wish to get a
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000421file using root-relative paths, use the full path:
422>
423 example: vim scp://user@host//somefile
424 example: vim scp://user@host//subdir1/subdir2/somefile
425<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000426
427==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00004284. Network-Oriented File Transfer *netrw-xfer* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000429
430Network-oriented file transfer under Vim is implemented by a VimL-based script
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000431(<netrw.vim>) using plugin techniques. It currently supports both reading and
432writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000433dav/cadaver, rsync, or sftp.
434
435http is currently supported read-only via use of wget or fetch.
436
437<netrw.vim> is a standard plugin which acts as glue between Vim and the
438various file transfer programs. It uses autocommand events (BufReadCmd,
439FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
440
441 ex. vim ftp://hostname/path/to/file
442<
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000443The characters preceding the colon specify the protocol to use; in the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000444example, it's ftp. The <netrw.vim> script then formulates a command or a
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000445series of commands (typically ftp) which it issues to an external program
446(ftp, scp, etc) which does the actual file transfer/protocol. Files are read
447from/written to a temporary file (under Unix/Linux, /tmp/...) which the
448<netrw.vim> script will clean up.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000449
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100450Now, a word about Jan Minář's "FTP User Name and Password Disclosure"; first,
451ftp is not a secure protocol. User names and passwords are transmitted "in
452the clear" over the internet; any snooper tool can pick these up; this is not
453a netrw thing, this is a ftp thing. If you're concerned about this, please
454try to use scp or sftp instead.
455
456Netrw re-uses the user id and password during the same vim session and so long
457as the remote hostname remains the same.
458
459Jan seems to be a bit confused about how netrw handles ftp; normally multiple
460commands are performed in a "ftp session", and he seems to feel that the
461uid/password should only be retained over one ftp session. However, netrw
462does every ftp operation in a separate "ftp session"; so remembering the
463uid/password for just one "ftp session" would be the same as not remembering
464the uid/password at all. IMHO this would rapidly grow tiresome as one
465browsed remote directories, for example.
466
467On the other hand, thanks go to Jan M. for pointing out the many
468vulnerabilities that netrw (and vim itself) had had in handling "crafted"
469filenames. The |shellescape()| and |fnameescape()| functions were written in
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200470response by Bram Moolenaar to handle these sort of problems, and netrw has
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100471been modified to use them. Still, my advice is, if the "filename" looks like
472a vim command that you aren't comfortable with having executed, don't open it.
473
Bram Moolenaar9964e462007-05-05 17:54:07 +0000474 *netrw-putty* *netrw-pscp* *netrw-psftp*
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000475One may modify any protocol's implementing external application by setting a
476variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000477"scp -q"). As an example, consider using PuTTY: >
Bram Moolenaar9964e462007-05-05 17:54:07 +0000478
479 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch'
480 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000481<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000482See |netrw-p8| for more about putty, pscp, psftp, etc.
483
Bram Moolenaar071d4272004-06-13 20:20:40 +0000484Ftp, an old protocol, seems to be blessed by numerous implementations.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000485Unfortunately, some implementations are noisy (ie., add junk to the end of the
486file). Thus, concerned users may decide to write a NetReadFixup() function
487that will clean up after reading with their ftp. Some Unix systems (ie.,
488FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
489not noisy and more convenient, actually, for <netrw.vim> to use.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100490Consequently, if "fetch" is available (ie. executable), it may be preferable
491to use it for ftp://... based transfers.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000492
493For rcp, scp, sftp, and http, one may use network-oriented file transfers
Bram Moolenaar83bab712005-08-01 21:58:57 +0000494transparently; ie.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000495>
496 vim rcp://[user@]machine/path
497 vim scp://[user@]machine/path
498<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100499If your ftp supports <.netrc>, then it too can be transparently used
Bram Moolenaar071d4272004-06-13 20:20:40 +0000500if the needed triad of machine name, user id, and password are present in
501that file. Your ftp must be able to use the <.netrc> file on its own, however.
502>
503 vim ftp://[user@]machine[[:#]portnumber]/path
504<
Bram Moolenaaradc21822011-04-01 18:03:16 +0200505Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses
506an option, -s:filename (filename can and probably should be a full path)
507which contains ftp commands which will be automatically run whenever ftp
508starts. You may use this feature to enter a user and password for one site: >
509 userid
510 password
511If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
512netrw will substitute the current machine name requested for ftp connection
513for MACHINE. Hence one can have multiple machine.ftp files containing login
514and password for ftp. Example: >
515
516 g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
517 vim ftp://myhost.somewhere.net/
518will use a file >
519 C:\Users\Myself\myhost.ftp
520<
521Often, ftp will need to query the user for the userid and password.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000522The latter will be done "silently"; ie. asterisks will show up instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000523the actually-typed-in password. Netrw will retain the userid and password
524for subsequent read/writes from the most recent transfer so subsequent
525transfers (read/write) to or from that machine will take place without
526additional prompting.
527
528 *netrw-urls*
529 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000530 | Reading | Writing | Uses |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000531 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000532 | DAV: | | |
533 | dav://host/path | | cadaver |
534 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000535 +---------------------------------+----------------------------+------------+
Bram Moolenaar446cb832008-06-24 21:56:24 +0000536 | DAV + SSL: | | |
537 | davs://host/path | | cadaver |
538 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver |
539 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000540 | FETCH: | | |
541 | fetch://[user@]host/path | | |
542 | fetch://[user@]host:http/path | Not Available | fetch |
543 | :Nread fetch://[user@]host/path| | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000544 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000545 | FILE: | | |
546 | file:///* | file:///* | |
547 | file://localhost/* | file://localhost/* | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000549 | FTP: (*3) | (*3) | |
550 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
551 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
552 | :Nread host path | :Nwrite host path | ftp+.netrc |
553 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000554 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000555 | HTTP: wget is executable: (*4) | | |
556 | http://[user@]host/path | Not Available | wget |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000557 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000558 | HTTP: fetch is executable (*4) | | |
559 | http://[user@]host/path | Not Available | fetch |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000560 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000561 | RCP: | | |
562 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000563 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000564 | RSYNC: | | |
565 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
566 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
567 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000568 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000569 | SCP: | | |
570 | scp://[user@]host/path | scp://[user@]host/path | scp |
571 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000572 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000573 | SFTP: | | |
574 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
575 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000576 +=================================+============================+============+
577
578 (*1) For an absolute path use scp://machine//path.
579
580 (*2) if <.netrc> is present, it is assumed that it will
581 work with your ftp client. Otherwise the script will
Bram Moolenaar9964e462007-05-05 17:54:07 +0000582 prompt for user-id and password.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000583
Bram Moolenaar9964e462007-05-05 17:54:07 +0000584 (*3) for ftp, "machine" may be machine#port or machine:port
Bram Moolenaar071d4272004-06-13 20:20:40 +0000585 if a different port is needed than the standard ftp port
586
587 (*4) for http:..., if wget is available it will be used. Otherwise,
588 if fetch is available it will be used.
589
590Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
591
592
593NETRC *netrw-netrc*
594
Bram Moolenaar446cb832008-06-24 21:56:24 +0000595The <.netrc> file, typically located in your home directory, contains lines
596therein which map a hostname (machine name) to the user id and password you
597prefer to use with it.
598
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599The typical syntax for lines in a <.netrc> file is given as shown below.
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000600Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000601>
602 machine {full machine name} login {user-id} password "{password}"
603 default login {user-id} password "{password}"
604
605Your ftp client must handle the use of <.netrc> on its own, but if the
606<.netrc> file exists, an ftp transfer will not ask for the user-id or
607password.
608
609 Note:
610 Since this file contains passwords, make very sure nobody else can
611 read this file! Most programs will refuse to use a .netrc that is
612 readable for others. Don't forget that the system administrator can
Bram Moolenaar446cb832008-06-24 21:56:24 +0000613 still read the file! Ie. for Linux/Unix: chmod 600 .netrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000614
615
616PASSWORD *netrw-passwd*
617
618The script attempts to get passwords for ftp invisibly using |inputsecret()|,
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200619a built-in Vim function. See |netrw-userpass| for how to change the password
Bram Moolenaar071d4272004-06-13 20:20:40 +0000620after one has set it.
621
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000622Unfortunately there doesn't appear to be a way for netrw to feed a password to
623scp. Thus every transfer via scp will require re-entry of the password.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000624However, |netrw-ssh-hack| can help with this problem.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000625
626
627==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00006285. Activation *netrw-activate* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000629
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000630Network-oriented file transfers are available by default whenever Vim's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000631|'nocompatible'| mode is enabled. Netrw's script files reside in your
632system's plugin, autoload, and syntax directories; just the
633plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
634vim. The main script in autoload/netrw.vim is only loaded when you actually
635use netrw. I suggest that, at a minimum, you have at least the following in
636your <.vimrc> customization file: >
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000637
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000638 set nocp
639 if version >= 600
640 filetype plugin indent on
641 endif
642<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000643
644==============================================================================
Bram Moolenaaradc21822011-04-01 18:03:16 +02006456. Transparent Remote File Editing *netrw-transparent* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000646
647Transparent file transfers occur whenever a regular file read or write
Bram Moolenaar446cb832008-06-24 21:56:24 +0000648(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
649events) is made. Thus one may read, write, or source files across networks
650just as easily as if they were local files! >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000651
652 vim ftp://[user@]machine/path
653 ...
654 :wq
655
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000656See |netrw-activate| for more on how to encourage your vim to use plugins
657such as netrw.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000658
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000659
Bram Moolenaar071d4272004-06-13 20:20:40 +0000660==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00006617. Ex Commands *netrw-ex* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000662
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000663The usual read/write commands are supported. There are also a few
Bram Moolenaar446cb832008-06-24 21:56:24 +0000664additional commands available. Often you won't need to use Nwrite or
Bram Moolenaar9964e462007-05-05 17:54:07 +0000665Nread as shown in |netrw-transparent| (ie. simply use >
666 :e url
667 :r url
668 :w url
669instead, as appropriate) -- see |netrw-urls|. In the explanations
670below, a {netfile} is an url to a remote file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000671
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200672 *:Nwrite* *:Nw*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000673:[range]Nw[rite] Write the specified lines to the current
Bram Moolenaar071d4272004-06-13 20:20:40 +0000674 file as specified in b:netrw_lastfile.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200675 (related: |netrw-nwrite|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000676
Bram Moolenaar446cb832008-06-24 21:56:24 +0000677:[range]Nw[rite] {netfile} [{netfile}]...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000678 Write the specified lines to the {netfile}.
679
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200680 *:Nread* *:Nr*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100681:Nr[ead] Read the lines from the file specified in b:netrw_lastfile
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200682 into the current buffer. (related: |netrw-nread|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000683
Bram Moolenaar446cb832008-06-24 21:56:24 +0000684:Nr[ead] {netfile} {netfile}...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000685 Read the {netfile} after the current line.
686
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200687 *:Nsource* *:Ns*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000688:Ns[ource] {netfile}
Bram Moolenaar9964e462007-05-05 17:54:07 +0000689 Source the {netfile}.
690 To start up vim using a remote .vimrc, one may use
691 the following (all on one line) (tnx to Antoine Mechelynck) >
692 vim -u NORC -N
693 --cmd "runtime plugin/netrwPlugin.vim"
694 --cmd "source scp://HOSTNAME/.vimrc"
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200695< (related: |netrw-source|)
696
697:call NetUserPass() *NetUserPass()*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000698 If g:netrw_uid and s:netrw_passwd don't exist,
699 this function will query the user for them.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200700 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000701
702:call NetUserPass("userid")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000703 This call will set the g:netrw_uid and, if
Bram Moolenaar071d4272004-06-13 20:20:40 +0000704 the password doesn't exist, will query the user for it.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200705 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000706
707:call NetUserPass("userid","passwd")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000708 This call will set both the g:netrw_uid and s:netrw_passwd.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000709 The user-id and password are used by ftp transfers. One may
Bram Moolenaar446cb832008-06-24 21:56:24 +0000710 effectively remove the user-id and password by using empty
711 strings (ie. "").
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200712 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000713
Bram Moolenaar9964e462007-05-05 17:54:07 +0000714:NetrwSettings This command is described in |netrw-settings| -- used to
715 display netrw settings and change netrw behavior.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000716
Bram Moolenaar071d4272004-06-13 20:20:40 +0000717
718==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00007198. Variables and Options *netrw-options* *netrw-var* {{{1
720
721(if you're interested in the netrw browser settings, see: |netrw-browser-var|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000722
Bram Moolenaar9964e462007-05-05 17:54:07 +0000723The <netrw.vim> script provides several variables which act as options to
Bram Moolenaar446cb832008-06-24 21:56:24 +0000724affect <netrw.vim>'s file transfer behavior. These variables typically may be
725set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000726>
Bram Moolenaar9964e462007-05-05 17:54:07 +0000727 -------------
728 Netrw Options
729 -------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000730 Option Meaning
731 -------------- -----------------------------------------------
732<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000733 b:netrw_col Holds current cursor position (during NetWrite)
734 g:netrw_cygwin =1 assume scp under windows is from cygwin
735 (default/windows)
736 =0 assume scp under windows accepts windows
737 style paths (default/else)
738 g:netrw_ftp =0 use default ftp (uid password)
739 g:netrw_ftpmode ="binary" (default)
740 ="ascii" (your choice)
741 g:netrw_ignorenetrc =1 (default)
742 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000743 want it used, then set this variable. Its
744 mere existence is enough to cause <.netrc>
745 to be ignored.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000746 b:netrw_lastfile Holds latest method/machine/path.
747 b:netrw_line Holds current line number (during NetWrite)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000748 g:netrw_silent =0 transfers done normally
749 =1 transfers done silently
750 g:netrw_uid Holds current user-id for ftp.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000751 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
752 =1 use WinNT/2K/XP's rcp, binary mode
753 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
754 =1 use default method to do ftp >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000755 -----------------------------------------------------------------------
756<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000757The script will also make use of the following variables internally, albeit
758temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000759>
760 -------------------
761 Temporary Variables
762 -------------------
763 Variable Meaning
764 -------- ------------------------------------
765<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100766 b:netrw_method Index indicating rcp/ftp+.netrc/ftp
767 w:netrw_method (same as b:netrw_method)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000768 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100769 b:netrw_fname Holds filename being accessed >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000770 ------------------------------------------------------------
771<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000772 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000773
774Netrw supports a number of protocols. These protocols are invoked using the
775variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000776>
777 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000778 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000779 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000780 Option Type Setting Meaning
781 --------- -------- -------------- ---------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000782<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000783 netrw_ftp variable =doesn't exist userid set by "user userid"
784 =0 userid set by "user userid"
785 =1 userid set by "userid"
786 NetReadFixup function =doesn't exist no change
787 =exists Allows user to have files
788 read via ftp automatically
789 transformed however they wish
790 by NetReadFixup()
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100791 g:netrw_dav_cmd variable ="cadaver" if cadaver is executable
792 g:netrw_dav_cmd variable ="curl -o" elseif curl is executable
Bram Moolenaar9964e462007-05-05 17:54:07 +0000793 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
Bram Moolenaar071d4272004-06-13 20:20:40 +0000794 g:netrw_ftp_cmd variable ="ftp"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000795 g:netrw_http_cmd variable ="fetch -o" if fetch is available
796 g:netrw_http_cmd variable ="wget -O" else if wget is available
Bram Moolenaar9964e462007-05-05 17:54:07 +0000797 g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000798 g:netrw_rcp_cmd variable ="rcp"
799 g:netrw_rsync_cmd variable ="rsync -a"
800 g:netrw_scp_cmd variable ="scp -q"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000801 g:netrw_sftp_cmd variable ="sftp" >
802 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000803<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000804 *netrw-ftp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000805
Bram Moolenaar9964e462007-05-05 17:54:07 +0000806The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|)
807specify the external program to use handle the ftp protocol. They may
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200808include command line options (such as -p for passive mode). Example: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000809
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200810 let g:netrw_ftp_cmd= "ftp -p"
811<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000812Browsing is supported by using the |g:netrw_list_cmd|; the substring
813"HOSTNAME" will be changed via substitution with whatever the current request
814is for a hostname.
815
816Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's
817that give trouble . In order to best understand how to use these options if
818ftp is giving you troubles, a bit of discussion is provided on how netrw does
819ftp reads.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000820
821For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000822temporary file:
823>
824 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
825 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000826<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000827 open machine [port] open machine [port]
828 user userid password userid password
829 [g:netrw_ftpmode] password
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200830 [g:netrw_ftpextracmd] [g:netrw_ftpmode]
Bram Moolenaar9964e462007-05-05 17:54:07 +0000831 get filename tempfile [g:netrw_extracmd]
832 get filename tempfile >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000833 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000834<
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200835The |g:netrw_ftpmode| and |g:netrw_ftpextracmd| are optional.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000836
Bram Moolenaar071d4272004-06-13 20:20:40 +0000837Netrw then executes the lines above by use of a filter:
838>
839 :%! {g:netrw_ftp_cmd} -i [-n]
840<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000841where
842 g:netrw_ftp_cmd is usually "ftp",
843 -i tells ftp not to be interactive
844 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
845
846If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000847userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000848The temporary file is then read into the main editing session window that
849requested it and the temporary file deleted.
850
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000851If your ftp doesn't accept the "user" command and immediately just demands a
852userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000853
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000854 *netrw-cadaver*
855To handle the SSL certificate dialog for untrusted servers, one may pull
856down the certificate and place it into /usr/ssl/cert.pem. This operation
857renders the server treatment as "trusted".
858
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000859 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000860If your ftp for whatever reason generates unwanted lines (such as AUTH
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100861messages) you may write a NetReadFixup() function:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000862>
863 function! NetReadFixup(method,line1,line2)
864 " a:line1: first new line in current file
865 " a:line2: last new line in current file
866 if a:method == 1 "rcp
867 elseif a:method == 2 "ftp + <.netrc>
868 elseif a:method == 3 "ftp + machine,uid,password,filename
869 elseif a:method == 4 "scp
870 elseif a:method == 5 "http/wget
871 elseif a:method == 6 "dav/cadaver
872 elseif a:method == 7 "rsync
873 elseif a:method == 8 "fetch
874 elseif a:method == 9 "sftp
Bram Moolenaar9964e462007-05-05 17:54:07 +0000875 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000876 endif
877 endfunction
878>
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000879The NetReadFixup() function will be called if it exists and thus allows you to
880customize your reading process. As a further example, <netrw.vim> contains
881just such a function to handle Windows 95 ftp. For whatever reason, Windows
88295's ftp dumps four blank lines at the end of a transfer, and so it is
883desirable to automate their removal. Here's some code taken from <netrw.vim>
884itself:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000885>
886 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000887 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000888 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000889 let fourblanklines= line2 - 3
890 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000891 endif
892 endfunction
893 endif
894>
895
896==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00008979. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100898 *netrw-browser* *netrw-dir* *netrw-list*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000899
Bram Moolenaar446cb832008-06-24 21:56:24 +0000900INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2
901 (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000902
Bram Moolenaar446cb832008-06-24 21:56:24 +0000903Netrw supports the browsing of directories on your local system and on remote
904hosts; browsing includes listing files and directories, entering directories,
905editing files therein, deleting files/directories, making new directories,
906moving (renaming) files and directories, copying files and directories, etc.
907One may mark files and execute any system command on them! The Netrw browser
908generally implements the previous explorer's maps and commands for remote
909directories, although details (such as pertinent global variable names)
910necessarily differ. To browse a directory, simply "edit" it! >
Bram Moolenaar269ec652004-07-29 08:43:53 +0000911
Bram Moolenaar446cb832008-06-24 21:56:24 +0000912 vim /your/directory/
913 vim .
914 vim c:\your\directory\
915<
916(Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t|
917 |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| )
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000918
919The Netrw remote file and directory browser handles two protocols: ssh and
Bram Moolenaar446cb832008-06-24 21:56:24 +0000920ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp
921in its remote browsing. Specifying any other protocol will cause it to be
922used for file transfers; but the ssh protocol will be used to do remote
923browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000924
Bram Moolenaar446cb832008-06-24 21:56:24 +0000925To use Netrw's remote directory browser, simply attempt to read a "file" with
926a trailing slash and it will be interpreted as a request to list a directory:
927>
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000928 vim [protocol]://[user@]hostname/path/
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000929<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000930where [protocol] is typically scp or ftp. As an example, try: >
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000931
Bram Moolenaar446cb832008-06-24 21:56:24 +0000932 vim ftp://ftp.home.vim.org/pub/vim/
933<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100934For local directories, the trailing slash is not required. Again, because it's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000935easy to miss: to browse remote directories, the url must terminate with a
936slash!
Bram Moolenaar83bab712005-08-01 21:58:57 +0000937
Bram Moolenaar446cb832008-06-24 21:56:24 +0000938If you'd like to avoid entering the password repeatedly for remote directory
939listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with
940ftp, see |netrw-netrc| (if your ftp supports it).
Bram Moolenaar83bab712005-08-01 21:58:57 +0000941
Bram Moolenaar446cb832008-06-24 21:56:24 +0000942There are several things you can do to affect the browser's display of files:
Bram Moolenaar83bab712005-08-01 21:58:57 +0000943
Bram Moolenaar446cb832008-06-24 21:56:24 +0000944 * To change the listing style, press the "i" key (|netrw-i|).
945 Currently there are four styles: thin, long, wide, and tree.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100946 To make that change "permanent", see |g:netrw_liststyle|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000947
Bram Moolenaar446cb832008-06-24 21:56:24 +0000948 * To hide files (don't want to see those xyz~ files anymore?) see
949 |netrw-ctrl-h|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000950
Bram Moolenaar446cb832008-06-24 21:56:24 +0000951 * Press s to sort files by name, time, or size.
952
953See |netrw-browse-cmds| for all the things you can do with netrw!
954
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100955 *netrw-getftype* *netrw-filigree* *netrw-ftype*
956The |getftype()| function is used to append a bit of filigree to indicate
957filetype to locally listed files:
958
959 directory : /
960 executable : *
961 fifo : |
962 links : @
963 sockets : =
964
965The filigree also affects the |g:netrw_sort_sequence|.
966
Bram Moolenaar446cb832008-06-24 21:56:24 +0000967
968QUICK HELP *netrw-quickhelp* {{{2
969 (Use ctrl-] to select a topic)~
970 Intro to Browsing...............................|netrw-intro-browse|
971 Quick Reference: Maps.........................|netrw-quickmap|
972 Quick Reference: Commands.....................|netrw-browse-cmds|
973 Hiding
974 Edit hiding list..............................|netrw-ctrl-h|
975 Hiding Files or Directories...................|netrw-a|
976 Hiding/Unhiding by suffix.....................|netrw-mh|
977 Hiding dot-files.............................|netrw-gh|
978 Listing Style
979 Select listing style (thin/long/wide/tree)....|netrw-i|
980 Associated setting variable...................|g:netrw_liststyle|
981 Shell command used to perform listing.........|g:netrw_list_cmd|
982 Quick file info...............................|netrw-qf|
983 Sorted by
984 Select sorting style (name/time/size).........|netrw-s|
985 Editing the sorting sequence..................|netrw-S|
Bram Moolenaarc236c162008-07-13 17:41:49 +0000986 Sorting options...............................|g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +0000987 Associated setting variable...................|g:netrw_sort_sequence|
988 Reverse sorting order.........................|netrw-r|
989
990
991 *netrw-quickmap* *netrw-quickmaps*
992QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000993>
Bram Moolenaar446cb832008-06-24 21:56:24 +0000994 --- ----------------- ----
995 Map Quick Explanation Link
996 --- ----------------- ----
997< <F1> Causes Netrw to issue help
998 <cr> Netrw will enter the directory or read the file |netrw-cr|
999 <del> Netrw will attempt to remove the file/directory |netrw-del|
1000 - Makes Netrw go up one directory |netrw--|
1001 a Toggles between normal display, |netrw-a|
1002 hiding (suppress display of files matching g:netrw_list_hide)
1003 showing (display only files which match g:netrw_list_hide)
1004 c Make browsing directory the current directory |netrw-c|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001005 C Setting the editing window |netrw-C|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001006 d Make a directory |netrw-d|
1007 D Attempt to remove the file(s)/directory(ies) |netrw-D|
1008 gb Go to previous bookmarked directory |netrw-gb|
1009 gh Quick hide/unhide of dot-files |netrw-gh|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001010 <c-h> Edit file hiding list |netrw-ctrl-h|
1011 i Cycle between thin, long, wide, and tree listings |netrw-i|
1012 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
1013 mb Bookmark current directory |netrw-mb|
1014 mc Copy marked files to marked-file target directory |netrw-mc|
1015 md Apply diff to marked files (up to 3) |netrw-md|
1016 me Place marked files on arg list and edit them |netrw-me|
1017 mf Mark a file |netrw-mf|
1018 mh Toggle marked file suffices' presence on hiding list |netrw-mh|
1019 mm Move marked files to marked-file target directory |netrw-mm|
1020 mp Print marked files |netrw-mp|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001021 mr Mark files satisfying a shell-style |regexp| |netrw-mr|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001022 mt Current browsing directory becomes markfile target |netrw-mt|
1023 mT Apply ctags to marked files |netrw-mT|
1024 mu Unmark all marked files |netrw-mu|
1025 mx Apply arbitrary shell command to marked files |netrw-mx|
1026 mz Compress/decompress marked files |netrw-mz|
1027 o Enter the file/directory under the cursor in a new |netrw-o|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001028 browser window. A horizontal split is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001029 O Obtain a file specified by cursor |netrw-O|
1030 p Preview the file |netrw-p|
1031 P Browse in the previously used window |netrw-P|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001032 qb List bookmarked directories and history |netrw-qb|
1033 qf Display information on file |netrw-qf|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001034 r Reverse sorting order |netrw-r|
1035 R Rename the designed file(s)/directory(ies) |netrw-R|
1036 s Select sorting style: by name, time, or file size |netrw-s|
1037 S Specify suffix priority for name-sorting |netrw-S|
1038 t Enter the file/directory under the cursor in a new tab|netrw-t|
1039 u Change to recently-visited directory |netrw-u|
1040 U Change to subsequently-visited directory |netrw-U|
1041 v Enter the file/directory under the cursor in a new |netrw-v|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001042 browser window. A vertical split is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001043 x View file with an associated program |netrw-x|
1044
Bram Moolenaarc236c162008-07-13 17:41:49 +00001045 % Open a new file in netrw's current directory |netrw-%|
1046
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001047 *netrw-mouse* *netrw-leftmouse* *netrw-middlemouse* *netrw-rightmouse*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001048 <leftmouse> (gvim only) selects word under mouse as if a <cr>
1049 had been pressed (ie. edit file, change directory)
1050 <middlemouse> (gvim only) same as P selecting word under mouse;
1051 see |netrw-P|
1052 <rightmouse> (gvim only) delete file/directory using word under
1053 mouse
1054 <2-leftmouse> (gvim only) when:
1055 * in a netrw-selected file, AND
1056 * |g:netrw_retmap| == 1 AND
1057 * the user doesn't already have a <2-leftmouse> mapping
1058 defined before netrw is autoloaded,
1059 then a double clicked leftmouse button will return
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001060 to the netrw browser window. See |g:netrw_retmap|.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001061 <s-leftmouse> (gvim only) like mf, will mark files
1062
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001063 (to disable mouse buttons while browsing: |g:netrw_mousemaps|)
1064
Bram Moolenaar446cb832008-06-24 21:56:24 +00001065 *netrw-quickcom* *netrw-quickcoms*
1066QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
1067 :NetrwClean[!] ...........................................|netrw-clean|
1068 :NetrwSettings ...........................................|netrw-settings|
1069 :Explore[!] [dir] Explore directory of current file......|netrw-explore|
1070 :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
1071 :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1072 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1073 :Rexplore Return to Explorer.....................|netrw-explore|
1074 :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore|
1075 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
1076 :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1077
1078BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001079
Bram Moolenaar446cb832008-06-24 21:56:24 +00001080One may easily "bookmark" a directory by using >
1081
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001082 mb
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001083<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001084Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are
1085kept in sorted order.
1086
1087Related Topics:
1088 |netrw-gb| how to return (go) to a bookmark
1089 |netrw-mB| how to delete bookmarks
1090 |netrw-qb| how to list bookmarks
Bram Moolenaar4a85b412006-04-23 22:40:29 +00001091
1092
Bram Moolenaar446cb832008-06-24 21:56:24 +00001093BROWSING *netrw-cr* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001094
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001095Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001096Hitting the <cr> (the return key) will select the file or directory.
1097Directories will themselves be listed, and files will be opened using the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001098protocol given in the original read request.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001099
Bram Moolenaar446cb832008-06-24 21:56:24 +00001100 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that
1101 two or more spaces delimit filenames and directory names for the long and
1102 wide listing formats. Thus, if your filename or directory name has two or
1103 more sequential spaces embedded in it, or any trailing spaces, then you'll
1104 need to use the "thin" format to select it.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001105
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001106The |g:netrw_browse_split| option, which is zero by default, may be used to
Bram Moolenaar446cb832008-06-24 21:56:24 +00001107cause the opening of files to be done in a new window or tab instead of the
1108default. When the option is one or two, the splitting will be taken
1109horizontally or vertically, respectively. When the option is set to three, a
1110<cr> will cause the file to appear in a new tab.
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001111
Bram Moolenaar83bab712005-08-01 21:58:57 +00001112
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001113When using the gui (gvim), one may select a file by pressing the <leftmouse>
1114button. In addition, if
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001115
Bram Moolenaar446cb832008-06-24 21:56:24 +00001116 *|g:netrw_retmap| == 1 AND (its default value is 0)
1117 * in a netrw-selected file, AND
1118 * the user doesn't already have a <2-leftmouse> mapping defined before
1119 netrw is loaded
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001120
Bram Moolenaar446cb832008-06-24 21:56:24 +00001121then a doubly-clicked leftmouse button will return to the netrw browser
1122window.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001123
Bram Moolenaar446cb832008-06-24 21:56:24 +00001124Netrw attempts to speed up browsing, especially for remote browsing where one
1125may have to enter passwords, by keeping and re-using previously obtained
1126directory listing buffers. The |g:netrw_fastbrowse| variable is used to
1127control this behavior; one may have slow browsing (no buffer re-use), medium
1128speed browsing (re-use directory buffer listings only for remote directories),
1129and fast browsing (re-use directory buffer listings as often as possible).
1130The price for such re-use is that when changes are made (such as new files
1131are introduced into a directory), the listing may become out-of-date. One may
1132always refresh directory listing buffers by pressing ctrl-L (see
1133|netrw-ctrl-l|).
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001134
1135
Bram Moolenaar446cb832008-06-24 21:56:24 +00001136Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
1137Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse|
1138 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1139 |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd|
1140 |g:netrw_ssh_browse_reject| |g:netrw_use_noswf|
1141
1142
1143BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2
1144
1145Normally one enters a file or directory using the <cr>. However, the "o" map
1146allows one to open a new window to hold the new directory listing or file. A
1147horizontal split is used. (for vertical splitting, see |netrw-v|)
1148
1149Normally, the o key splits the window horizontally with the new window and
1150cursor at the top. To change to splitting the window horizontally with the
1151new window and cursor at the bottom, have
1152
1153 let g:netrw_alto = 1
1154
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001155in your <.vimrc>. (also see |netrw-t| |netrw-T| |netrw-v|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001156
1157Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
1158
1159
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001160BROWSING WITH A NEW TAB *netrw-t* *netrw-T* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001161
1162Normally one enters a file or directory using the <cr>. The "t" map
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001163allows one to open a new window holding the new directory listing or file in
1164a new tab. The "T" version puts the file or directory into a background tab
1165(see |gT|)
1166
1167Related actions: |netrw-o| |netrw-v|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001168
1169
1170BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2
1171
1172Normally one enters a file or directory using the <cr>. However, the "v" map
1173allows one to open a new window to hold the new directory listing or file. A
1174vertical split is used. (for horizontal splitting, see |netrw-o|)
1175
1176Normally, the v key splits the window vertically with the new window and
1177cursor at the left. To change to splitting the window vertically with the new
1178window and cursor at the right, have
1179
1180 let g:netrw_altv = 1
1181
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001182in your <.vimrc>. (also see: |netrw-o| |netrw-t| |netrw-T|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001183
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001184There is only one tree listing buffer; using "v" on a displayed subdirectory
Bram Moolenaar446cb832008-06-24 21:56:24 +00001185will split the screen, but the same buffer will be shown twice.
1186
1187Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
1188
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001189
1190CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001191
Bram Moolenaar9964e462007-05-05 17:54:07 +00001192The "i" map cycles between the thin, long, wide, and tree listing formats.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001193
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001194The thin listing format gives just the files' and directories' names.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001195
Bram Moolenaar8299df92004-07-10 09:47:34 +00001196The long listing is either based on the "ls" command via ssh for remote
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001197directories or displays the filename, file size (in bytes), and the time and
1198date of last modification for local directories. With the long listing
1199format, netrw is not able to recognize filenames which have trailing spaces.
1200Use the thin listing format for such files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001201
Bram Moolenaar9964e462007-05-05 17:54:07 +00001202The wide listing format uses two or more contiguous spaces to delineate
1203filenames; when using that format, netrw won't be able to recognize or use
1204filenames which have two or more contiguous spaces embedded in the name or any
1205trailing spaces. The thin listing format will, however, work with such files.
1206This listing format is the most compact.
1207
1208The tree listing format has a top directory followed by files and directories
1209preceded by a "|". One may open and close directories by pressing the <cr>
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001210key while atop the directory name.
1211
1212One may make a preferred listing style your default; see |g:netrw_liststyle|.
1213As an example, by putting the following line in your .vimrc, >
1214 let g:netrw_liststyle= 4
1215the tree style will become your default listing style.
Bram Moolenaar8299df92004-07-10 09:47:34 +00001216
Bram Moolenaar446cb832008-06-24 21:56:24 +00001217Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
1218 |g:netrw_timefmt| |g:netrw_list_cmd|
Bram Moolenaar8299df92004-07-10 09:47:34 +00001219
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001220CHANGE FILE PERMISSION *netrw-gp* {{{2
1221
1222"gp" will ask you for a new permission for the file named under the cursor.
1223Currently, this only works for local files.
1224
1225Associated setting variables: |g:netrw_chgperm|
1226
Bram Moolenaar83bab712005-08-01 21:58:57 +00001227
Bram Moolenaar446cb832008-06-24 21:56:24 +00001228CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2
Bram Moolenaar843ee412004-06-30 16:16:41 +00001229
Bram Moolenaar446cb832008-06-24 21:56:24 +00001230To change directory back to a bookmarked directory, use
Bram Moolenaar843ee412004-06-30 16:16:41 +00001231
Bram Moolenaar446cb832008-06-24 21:56:24 +00001232 {cnt}gb
Bram Moolenaar843ee412004-06-30 16:16:41 +00001233
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001234Any count may be used to reference any of the bookmarks.
1235
1236Related Topics:
1237 |netrw-mB| how to delete bookmarks
1238 |netrw-mb| how to make a bookmark
1239 |netrw-qb| how to list bookmarks
Bram Moolenaar843ee412004-06-30 16:16:41 +00001240
Bram Moolenaar843ee412004-06-30 16:16:41 +00001241
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001242CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001243
1244Every time you change to a new directory (new for the current session),
1245netrw will save the directory in a recently-visited directory history
Bram Moolenaaradc21822011-04-01 18:03:16 +02001246list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001247"u" map, one can change to an earlier directory (predecessor). To do
1248the opposite, see |netrw-U|.
1249
1250
Bram Moolenaar446cb832008-06-24 21:56:24 +00001251CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001252
1253With the "U" map, one can change to a later directory (successor).
1254This map is the opposite of the "u" map. (see |netrw-u|) Use the
Bram Moolenaar446cb832008-06-24 21:56:24 +00001255q map to list both the bookmarks and history. (see |netrw-qb|)
1256
1257
1258NETRW CLEAN *netrw-clean* *:NetrwClean*
1259
1260With :NetrwClean one may easily remove netrw from one's home directory;
1261more precisely, from the first directory on your |'runtimepath'|.
1262
1263With :NetrwClean!, netrw will remove netrw from all directories on your
1264|'runtimepath'|.
1265
1266With either form of the command, netrw will first ask for confirmation
1267that the removal is in fact what you want to do. If netrw doesn't have
1268permission to remove a file, it will issue an error message.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001269
Bram Moolenaar9964e462007-05-05 17:54:07 +00001270 *netrw-gx*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001271CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2
Bram Moolenaar9964e462007-05-05 17:54:07 +00001272 (also see |netrw_filehandler|)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001273
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001274Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
1275best seen with a special handler (ie. a tool provided with your computer).
1276Netrw allows one to invoke such special handlers by: >
1277
1278 * when Exploring, hit the "x" key
1279 * when editing, hit gx with the cursor atop the special filename
Bram Moolenaar9964e462007-05-05 17:54:07 +00001280< (not available if the |g:netrw_nogx| variable exists)
1281
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001282Netrw determines which special handler by the following method:
1283
1284 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
1285 view files. Examples of useful settings (place into your <.vimrc>): >
1286
1287 :let g:netrw_browsex_viewer= "kfmclient exec"
1288< or >
1289 :let g:netrw_browsex_viewer= "gnome-open"
1290<
1291 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
1292 invoked first (see |netrw_filehandler|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001293
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001294 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001295 * for Gnome (with gnome-open): gnome-open is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001296 * for KDE (with kfmclient) : kfmclient is used.
1297 * for Mac OS X : open is used.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001298 * otherwise the netrwFileHandler plugin is used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001299
1300The file's suffix is used by these various approaches to determine an
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001301appropriate application to use to "handle" these files. Such things as
1302OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
1303*.eps) can be handled.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001304
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001305 *netrw_filehandler*
Bram Moolenaar9964e462007-05-05 17:54:07 +00001306
1307The "x" map applies a function to a file, based on its extension. Of course,
1308the handler function must exist for it to be called!
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001309>
1310 Ex. mypgm.html x ->
Bram Moolenaar9964e462007-05-05 17:54:07 +00001311 NFH_html("scp://user@host/some/path/mypgm.html")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001312<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001313Users may write their own netrw File Handler functions to support more
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001314suffixes with special handling. See <autoload/netrwFileHandlers.vim> for
Bram Moolenaar9964e462007-05-05 17:54:07 +00001315examples on how to make file handler functions. As an example: >
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001316
Bram Moolenaar9964e462007-05-05 17:54:07 +00001317 " NFH_suffix(filename)
1318 fun! NFH_suffix(filename)
1319 ..do something special with filename..
1320 endfun
1321<
1322These functions need to be defined in some file in your .vim/plugin
1323(vimfiles\plugin) directory. Vim's function names may not have punctuation
1324characters (except for the underscore) in them. To support suffices that
1325contain such characters, netrw will first convert the suffix using the
1326following table: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001327
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001328 @ -> AT ! -> EXCLAMATION % -> PERCENT
1329 : -> COLON = -> EQUAL ? -> QUESTION
Bram Moolenaar9964e462007-05-05 17:54:07 +00001330 , -> COMMA - -> MINUS ; -> SEMICOLON
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001331 $ -> DOLLAR + -> PLUS ~ -> TILDE
1332<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001333So, for example: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001334
Bram Moolenaar9964e462007-05-05 17:54:07 +00001335 file.rcs,v -> NFH_rcsCOMMAv()
1336<
1337If more such translations are necessary, please send me email: >
1338 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
1339with a request.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001340
Bram Moolenaar446cb832008-06-24 21:56:24 +00001341Associated setting variable: |g:netrw_browsex_viewer|
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001342
Bram Moolenaar446cb832008-06-24 21:56:24 +00001343 *netrw-curdir*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001344DELETING BOOKMARKS *netrw-mB* {{{2
1345
1346To delete a bookmark, use >
1347
1348 {cnt}mB
1349<
1350Related Topics:
1351 |netrw-gb| how to return (go) to a bookmark
1352 |netrw-mb| how to make a bookmark
1353 |netrw-qb| how to list bookmarks
1354
1355
Bram Moolenaar446cb832008-06-24 21:56:24 +00001356DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001357
Bram Moolenaar446cb832008-06-24 21:56:24 +00001358If files have not been marked with |netrw-mf|: (local marked file list)
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001359
Bram Moolenaar446cb832008-06-24 21:56:24 +00001360 Deleting/removing files and directories involves moving the cursor to the
1361 file/directory to be deleted and pressing "D". Directories must be empty
1362 first before they can be successfully removed. If the directory is a
1363 softlink to a directory, then netrw will make two requests to remove the
1364 directory before succeeding. Netrw will ask for confirmation before doing
1365 the removal(s). You may select a range of lines with the "V" command
1366 (visual selection), and then pressing "D".
Bram Moolenaar9964e462007-05-05 17:54:07 +00001367
Bram Moolenaar446cb832008-06-24 21:56:24 +00001368If files have been marked with |netrw-mf|: (local marked file list)
1369
1370 Marked files (and empty directories) will be deleted; again, you'll be
1371 asked to confirm the deletion before it actually takes place.
1372
1373The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
1374used to control the attempts to remove files and directories. The
1375g:netrw_rm_cmd is used with files, and its default value is:
1376
1377 g:netrw_rm_cmd: ssh HOSTNAME rm
1378
1379The g:netrw_rmdir_cmd variable is used to support the removal of directories.
1380Its default value is:
1381
1382 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
1383
1384If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
1385to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
1386
1387 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
1388
1389Associated setting variable: |g:netrw_local_rmdir| |g:netrw_rm_cmd|
1390 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001391
1392
Bram Moolenaar446cb832008-06-24 21:56:24 +00001393*netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
1394*netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
1395DIRECTORY EXPLORATION COMMANDS {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001396
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001397 :[N]Explore[!] [dir]... Explore directory of current file *:Explore*
1398 :[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
1399 :Rexplore ... Return to Explorer *:Rexplore*
1400 :[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore*
1401 :Texplore [dir]... Tab & Explore *:Texplore*
1402 :[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001403
1404 Used with :Explore **/pattern : (also see |netrw-starstar|)
1405 :Nexplore............. go to next matching file *:Nexplore*
1406 :Pexplore............. go to previous matching file *:Pexplore*
1407
1408:Explore will open the local-directory browser on the current file's
1409 directory (or on directory [dir] if specified). The window will be
1410 split only if the file has been modified, otherwise the browsing
1411 window will take over that window. Normally the splitting is taken
1412 horizontally.
1413:Explore! is like :Explore, but will use vertical splitting.
1414:Sexplore will always split the window before invoking the local-directory
1415 browser. As with Explore, the splitting is normally done
1416 horizontally.
1417:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
1418:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
1419:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
1420:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
1421:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
1422:Texplore [dir] does a tabnew before generating the browser window
1423
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001424By default, these commands use the current file's directory. However, one may
1425explicitly provide a directory (path) to use.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001426
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001427The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or
1428columns the new explorer window should have.
1429
1430Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
1431user, is used to control the quantity of rows and/or columns new explorer
1432windows should have.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001433
1434:Rexplore This command is a little different from the others. When one
1435 edits a file, for example by pressing <cr> when atop a file in
1436 a netrw browser window, :Rexplore will return the display to
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001437 that of the last netrw browser window. It is a command version
1438 of the <2-leftmouse> map (which is only available under gvim and
Bram Moolenaar446cb832008-06-24 21:56:24 +00001439 cooperative terms).
1440
1441
1442*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
1443EXPLORING WITH STARS AND PATTERNS
1444
1445When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
1446following four styles, Explore generates a list of files which satisfy
1447the request. >
1448
1449 */filepat files in current directory which satisfy filepat
1450 **/filepat files in current directory or below which satisfy the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001451 file pattern
Bram Moolenaar446cb832008-06-24 21:56:24 +00001452 *//pattern files in the current directory which contain the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001453 pattern (vimgrep is used)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001454 **//pattern files in the current directory or below which contain
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001455 the pattern (vimgrep is used)
Bram Moolenaar572cb562005-08-05 21:35:02 +00001456<
Bram Moolenaar446cb832008-06-24 21:56:24 +00001457The cursor will be placed on the first file in the list. One may then
1458continue to go to subsequent files on that list via |:Nexplore| or to
1459preceding files on that list with |:Pexplore|. Explore will update the
1460directory and place the cursor appropriately.
1461
1462A plain >
1463 :Explore
1464will clear the explore list.
1465
1466If your console or gui produces recognizable shift-up or shift-down sequences,
1467then you'll likely find using shift-downarrow and shift-uparrow convenient.
1468They're mapped by netrw:
1469
1470 <s-down> == Nexplore, and
1471 <s-up> == Pexplore.
1472
1473As an example, consider
1474>
1475 :Explore */*.c
1476 :Nexplore
1477 :Nexplore
1478 :Pexplore
1479<
1480The status line will show, on the right hand side of the status line, a
1481message like "Match 3 of 20".
1482
1483Associated setting variables: |g:netrw_keepdir| |g:netrw_browse_split|
1484 |g:netrw_fastbrowse| |g:netrw_ftp_browse_reject|
1485 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1486 |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
1487 |g:netrw_liststyle|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001488
1489
Bram Moolenaar446cb832008-06-24 21:56:24 +00001490DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001491
Bram Moolenaar446cb832008-06-24 21:56:24 +00001492With the cursor atop a filename, pressing "qf" will reveal the file's size
1493and last modification timestamp. Currently this capability is only available
1494for local files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001495
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001496
Bram Moolenaar446cb832008-06-24 21:56:24 +00001497EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001498
Bram Moolenaar446cb832008-06-24 21:56:24 +00001499The "<ctrl-h>" map brings up a requestor allowing the user to change the
1500file/directory hiding list contained in |g:netrw_list_hide|. The hiding list
1501consists of one or more patterns delimited by commas. Files and/or
1502directories satisfying these patterns will either be hidden (ie. not shown) or
1503be the only ones displayed (see |netrw-a|).
1504
1505The "gh" mapping (see |netrw-gh|) quickly alternates between the usual
1506hiding list and the hiding of files or directories that begin with ".".
1507
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001508As an example, >
1509 let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
1510Effectively, this makes the effect of a |netrw-gh| command the initial setting.
1511What it means:
1512
1513 \(^\|\s\s\) : if the line begins with the following, -or-
1514 two consecutive spaces are encountered
1515 \zs : start the hiding match now
1516 \. : if it now begins with a dot
1517 \S\+ : and is followed by one or more non-whitespace
1518 characters
1519
Bram Moolenaar446cb832008-06-24 21:56:24 +00001520Associated setting variables: |g:netrw_hide| |g:netrw_list_hide|
1521Associated topics: |netrw-a| |netrw-gh| |netrw-mh|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001522
1523
Bram Moolenaar446cb832008-06-24 21:56:24 +00001524EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2
1525
1526When "Sorted by" is name, one may specify priority via the sorting sequence
1527(g:netrw_sort_sequence). The sorting sequence typically prioritizes the
1528name-listing by suffix, although any pattern will do. Patterns are delimited
1529by commas. The default sorting sequence is (all one line):
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001530
1531For Unix: >
1532 '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,
1533 \.info$,\.swp$,\.bak$,\~$'
1534<
1535Otherwise: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00001536 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
1537 \.swp$,\.bak$,\~$'
1538<
1539The lone * is where all filenames not covered by one of the other patterns
1540will end up. One may change the sorting sequence by modifying the
1541g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
1542using the "S" map.
1543
Bram Moolenaarc236c162008-07-13 17:41:49 +00001544Related topics: |netrw-s| |netrw-S|
1545Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001546
1547
Bram Moolenaaradc21822011-04-01 18:03:16 +02001548FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
1549
1550Remote symbolic links (ie. those listed via ssh or ftp) are problematic
1551in that it is difficult to tell whether they link to a file or to a
1552directory.
1553
1554To force treatment as a file: use >
1555 gd
1556<
1557To force treatment as a directory: use >
1558 gf
1559<
1560
Bram Moolenaar446cb832008-06-24 21:56:24 +00001561GOING UP *netrw--* {{{2
1562
1563To go up a directory, press "-" or press the <cr> when atop the ../ directory
1564entry in the listing.
1565
1566Netrw will use the command in |g:netrw_list_cmd| to perform the directory
1567listing operation after changing HOSTNAME to the host specified by the
1568user-provided url. By default netrw provides the command as:
1569
1570 ssh HOSTNAME ls -FLa
1571
1572where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
1573read. Naturally, the user may override this command with whatever is
1574preferred. The NetList function which implements remote browsing
1575expects that directories will be flagged by a trailing slash.
1576
1577
1578HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2
1579
1580Netrw's browsing facility allows one to use the hiding list in one of three
1581ways: ignore it, hide files which match, and show only those files which
1582match.
1583
1584If no files have been marked via |netrw-mf|:
1585
1586The "a" map allows the user to cycle through the three hiding modes.
1587
1588The |g:netrw_list_hide| variable holds a comma delimited list of patterns
1589based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list.
1590(also see |netrw-ctrl-h|) To set the hiding list, use the <c-h> map. As an
1591example, to hide files which begin with a ".", one may use the <c-h> map to
1592set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*'
1593in one's <.vimrc>). One may then use the "a" key to show all files, hide
1594matching files, or to show only the matching files.
1595
1596 Example: \.[ch]$
1597 This hiding list command will hide/show all *.c and *.h files.
1598
1599 Example: \.c$,\.h$
1600 This hiding list command will also hide/show all *.c and *.h
1601 files.
1602
1603Don't forget to use the "a" map to select the mode (normal/hiding/show) you
1604want!
1605
1606If files have been marked using |netrw-mf|, then this command will:
1607
1608 if showing all files or non-hidden files:
1609 modify the g:netrw_list_hide list by appending the marked files to it
1610 and showing only non-hidden files.
1611
1612 else if showing hidden files only:
1613 modify the g:netrw_list_hide list by removing the marked files from it
1614 and showing only non-hidden files.
1615 endif
1616
1617 *netrw-gh* *netrw-hide*
1618As a quick shortcut, one may press >
1619 gh
1620to toggle between hiding files which begin with a period (dot) and not hiding
1621them.
1622
1623Associated setting variable: |g:netrw_list_hide|
1624Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
1625
1626IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001627
1628Especially with the remote directory browser, constantly entering the password
1629is tedious.
1630
Bram Moolenaar9964e462007-05-05 17:54:07 +00001631For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00001632tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
1633for setting up no-password ssh and scp and discusses associated security
Bram Moolenaar9964e462007-05-05 17:54:07 +00001634issues. It used to be available at http://hacks.oreilly.com/pub/h/66 ,
1635but apparently that address is now being redirected to some "hackzine".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001636I'll attempt a summary based on that article and on a communication from
1637Ben Schmidt:
Bram Moolenaar843ee412004-06-30 16:16:41 +00001638
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001639 1. Generate a public/private key pair on the local machine
1640 (ssh client): >
1641 ssh-keygen -t rsa
1642 (saving the file in ~/.ssh/id_rsa as prompted)
1643<
1644 2. Just hit the <CR> when asked for passphrase (twice) for no
1645 passphrase. If you do use a passphrase, you will also need to use
1646 ssh-agent so you only have to type the passphrase once per session.
1647 If you don't use a passphrase, simply logging onto your local
1648 computer or getting access to the keyfile in any way will suffice
1649 to access any ssh servers which have that key authorized for login.
1650
1651 3. This creates two files: >
1652 ~/.ssh/id_rsa
1653 ~/.ssh/id_rsa.pub
1654<
1655 4. On the target machine (ssh server): >
1656 cd
1657 mkdir -p .ssh
1658 chmod 0700 .ssh
1659<
1660 5. On your local machine (ssh client): (one line) >
1661 ssh {serverhostname}
1662 cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub
1663<
1664 or, for OpenSSH, (one line) >
1665 ssh {serverhostname}
1666 cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
1667<
1668You can test it out with >
1669 ssh {serverhostname}
1670and you should be log onto the server machine without further need to type
1671anything.
1672
1673If you decided to use a passphrase, do: >
1674 ssh-agent $SHELL
1675 ssh-add
1676 ssh {serverhostname}
1677You will be prompted for your key passphrase when you use ssh-add, but not
1678subsequently when you use ssh. For use with vim, you can use >
1679 ssh-agent vim
1680and, when next within vim, use >
1681 :!ssh-add
1682Alternatively, you can apply ssh-agent to the terminal you're planning on
1683running vim in: >
1684 ssh-agent xterm &
1685and do ssh-add whenever you need.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001686
Bram Moolenaar9964e462007-05-05 17:54:07 +00001687For Windows, folks on the vim mailing list have mentioned that Pageant helps
1688with avoiding the constant need to enter the password.
Bram Moolenaar433f7c82006-03-21 21:29:36 +00001689
Bram Moolenaar446cb832008-06-24 21:56:24 +00001690Kingston Fung wrote about another way to avoid constantly needing to enter
1691passwords:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001692
Bram Moolenaar446cb832008-06-24 21:56:24 +00001693 In order to avoid the need to type in the password for scp each time, you
1694 provide a hack in the docs to set up a non password ssh account. I found a
1695 better way to do that: I can use a regular ssh account which uses a
1696 password to access the material without the need to key-in the password
1697 each time. It's good for security and convenience. I tried ssh public key
1698 authorization + ssh-agent, implementing this, and it works! Here are two
1699 links with instructions:
1700
1701 http://www.ibm.com/developerworks/library/l-keyc2/
1702 http://sial.org/howto/openssh/publickey-auth/
1703
1704
1705LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2
1706
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001707Pressing "qb" (query bookmarks) will list both the bookmarked directories and
1708directory traversal history.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001709
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001710Related Topics:
1711 |netrw-gb| how to return (go) to a bookmark
1712 |netrw-mb| how to make a bookmark
1713 |netrw-mB| how to delete bookmarks
1714 |netrw-u| change to a predecessor directory via the history stack
1715 |netrw-U| change to a successor directory via the history stack
Bram Moolenaar446cb832008-06-24 21:56:24 +00001716
1717MAKING A NEW DIRECTORY *netrw-d* {{{2
1718
1719With the "d" map one may make a new directory either remotely (which depends
1720on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
1721global variable g:netrw_local_mkdir). Netrw will issue a request for the new
1722directory's name. A bare <CR> at that point will abort the making of the
1723directory. Attempts to make a local directory that already exists (as either
1724a file or a directory) will be detected, reported on, and ignored.
1725
1726Currently, making a directory via ftp is not supported.
1727
1728Associated setting variable: |g:netrw_local_mkdir| |g:netrw_mkdir_cmd|
1729
1730
1731MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
1732
1733By default, |g:netrw_keepdir| is 1. This setting means that the current
1734directory will not track the browsing directory.
1735
1736Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to
1737track netrw's browsing directory.
1738
1739However, given the default setting for g:netrw_keepdir of 1 where netrw
1740maintains its own separate notion of the current directory, in order to make
1741the two directories the same, use the "c" map (just type c). That map will
1742set Vim's notion of the current directory to netrw's current browsing
1743directory.
1744
1745Associated setting variable: |g:netrw_keepdir|
1746
1747MARKING FILES *netrw-mf* {{{2
1748 (also see |netrw-mr|)
1749
1750One may mark files with the cursor atop a filename and then pressing "mf".
1751With gvim, one may also mark files with <s-leftmouse>. The following netrw
1752maps make use of marked files:
1753
1754 |netrw-a| Hide marked files/directories
1755 |netrw-D| Delete marked files/directories
1756 |netrw-mc| Copy marked files to target
1757 |netrw-md| Apply vimdiff to marked files
1758 |netrw-me| Edit marked files
1759 |netrw-mg| Apply vimgrep to marked files
1760 |netrw-mm| Move marked files
1761 |netrw-mp| Print marked files
1762 |netrw-mt| Set target for |netrw-mm| and |netrw-mc|
1763 |netrw-mT| Generate tags using marked files
1764 |netrw-mx| Apply shell command to marked files
1765 |netrw-mz| Compress/Decompress marked files
1766 |netrw-O| Obtain marked files
1767 |netrw-R| Rename marked files
1768
1769One may unmark files one at a time the same way one marks them; ie. place
1770the cursor atop a marked file and press "mf". This process also works
1771with <s-leftmouse> using gvim. One may unmark all files by pressing
1772"mu" (see |netrw-mu|).
1773
Bram Moolenaaradc21822011-04-01 18:03:16 +02001774Marked files are highlighted using the "netrwMarkFile" highlighting group,
1775which by default is linked to "Identifier" (see Identifier under
1776|group-name|). You may change the highlighting group by putting something
1777like >
1778
1779 highlight clear netrwMarkFile
1780 hi link netrwMarkFile ..whatever..
1781<
1782into $HOME/.vim/after/syntax/netrw.vim .
1783
Bram Moolenaar446cb832008-06-24 21:56:24 +00001784*markfilelist* *global_markfilelist* *local_markfilelist*
1785All marked files are entered onto the global marked file list; there is only
1786one such list. In addition, every netrw buffer also has its own local marked
1787file list; since netrw buffers are associated with specific directories, this
1788means that each directory has its own local marked file list. The various
1789commands which operate on marked files use one or the other of the marked file
1790lists.
1791
1792
1793MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2
1794 (also see |netrw-mf|)
1795
1796One may also mark files by pressing "mr"; netrw will then issue a prompt,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001797"Enter regexp: ". You may then enter a shell-style regular expression such
1798as *.c$ (see |glob()|). For remote systems, glob() doesn't work -- so netrw
1799converts "*" into ".*" (see |regexp|) and marks files based on that. In the
1800future I may make it possible to use |regexp|s instead of glob()-style
1801expressions (yet-another-option).
Bram Moolenaar446cb832008-06-24 21:56:24 +00001802
1803
1804MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2
1805 (See |netrw-mf| and |netrw-mr| for how to mark files)
1806 (uses the local marked-file list)
1807
1808Upon activation of the "mx" map, netrw will query the user for some (external)
1809command to be applied to all marked files. All "%"s in the command will be
1810substituted with the name of each marked file in turn. If no "%"s are in the
1811command, then the command will be followed by a space and a marked filename.
1812
1813
1814MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
1815 (See |netrw-mf| and |netrw-mr| for how to mark files)
1816 (uses the local marked file list)
1817
1818If any marked files are compressed, then "mz" will decompress them.
1819If any marked files are decompressed, then "mz" will compress them
1820using the command specified by |g:netrw_compress|; by default,
1821that's "gzip".
1822
1823For decompression, netrw provides a |Dictionary| of suffices and their
1824associated decompressing utilities; see |g:netrw_decompress|.
1825
1826Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
1827
1828MARKED FILES: COPYING *netrw-mc* {{{2
1829 (See |netrw-mf| and |netrw-mr| for how to mark files)
1830 (Uses the global marked file list)
1831
1832Select a target directory with mt (|netrw-mt|). Then change directory,
Bram Moolenaaradc21822011-04-01 18:03:16 +02001833select file(s) (see |netrw-mf|), and press "mc". The copy is done
1834from the current window (where one does the mf) to the target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001835
1836Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
1837
1838MARKED FILES: DIFF *netrw-md* {{{2
1839 (See |netrw-mf| and |netrw-mr| for how to mark files)
1840 (uses the global marked file list)
1841
1842Use |vimdiff| to visualize difference between selected files (two or
1843three may be selected for this). Uses the global marked file list.
1844
1845MARKED FILES: EDITING *netrw-me* {{{2
1846 (See |netrw-mf| and |netrw-mr| for how to mark files)
1847 (uses the global marked file list)
1848
1849This command will place the marked files on the |arglist| and commence
1850editing them. One may return the to explorer window with |:Rexplore|.
1851
1852MARKED FILES: GREP *netrw-mg* {{{2
1853 (See |netrw-mf| and |netrw-mr| for how to mark files)
1854 (uses the global marked file list)
1855
1856This command will apply |:vimgrep| to the marked files. The command will ask
1857for the requested pattern; one may enter: >
1858 /pattern/[g][j]
1859 ! /pattern/[g][j]
1860 pattern
1861<
1862MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2
1863 (See |netrw-mf| and |netrw-mr| for how to mark files)
1864 (uses the local marked file list)
1865
1866This command extracts the suffices of the marked files and toggles their
1867presence on the hiding list. Please note that marking the same suffix
1868this way multiple times will result in the suffix's presence being toggled
1869for each file (so an even quantity of marked files having the same suffix
1870is the same as not having bothered to select them at all).
1871
1872Related topics: |netrw-a| |g:netrw_list_hide|
1873
1874MARKED FILES: MOVING *netrw-mm* {{{2
1875 (See |netrw-mf| and |netrw-mr| for how to mark files)
1876 (uses the global marked file list)
1877
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001878 WARNING: moving files is more dangerous than copying them.
1879 A file being moved is first copied and then deleted; if the
1880 copy operation fails and the delete succeeds, you will lose
1881 the file. Either try things out with unimportant files
1882 first or do the copy and then delete yourself using mc and D.
1883 Use at your own risk!
1884
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001885Select a target directory with mt (|netrw-mt|). Then change directory,
Bram Moolenaaradc21822011-04-01 18:03:16 +02001886select file(s) (see |netrw-mf|), and press "mm". The move is done
1887from the current window (where one does the mf) to the target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001888
1889Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
1890
1891MARKED FILES: PRINTING *netrw-mp* {{{2
1892 (See |netrw-mf| and |netrw-mr| for how to mark files)
1893 (uses the local marked file list)
1894
1895Netrw will apply the |:hardcopy| command to marked files. What it does
1896is open each file in a one-line window, execute hardcopy, then close the
1897one-line window.
1898
1899
1900MARKED FILES: SOURCING *netrw-ms* {{{2
1901 (See |netrw-mf| and |netrw-mr| for how to mark files)
1902 (uses the local marked file list)
1903
1904Netrw will source the marked files (using vim's |:source| command)
1905
1906
1907MARKED FILES: TAGGING *netrw-mT* {{{2
1908 (See |netrw-mf| and |netrw-mr| for how to mark files)
1909 (uses the global marked file list)
1910
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001911The "mT" mapping will apply the command in |g:netrw_ctags| (by default, it is
Bram Moolenaar446cb832008-06-24 21:56:24 +00001912"ctags") to marked files. For remote browsing, in order to create a tags file
1913netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for
1914this to work on remote systems. For your local system, see |ctags| on how to
1915get a version. I myself use hdrtags, currently available at
1916http://mysite.verizon.net/astronaut/src/index.html , and have >
1917
1918 let g:netrw_ctags= "hdrtag"
1919<
1920in my <.vimrc>.
1921
1922When a remote set of files are tagged, the resulting tags file is "obtained";
1923ie. a copy is transferred to the local system's directory. The local tags
1924file is then modified so that one may use it through the network. The
1925modification is concerns the names of the files in the tags; each filename is
1926preceded by the netrw-compatible url used to obtain it. When one subsequently
1927uses one of the go to tag actions (|tags|), the url will be used by netrw to
1928edit the desired file and go to the tag.
1929
Bram Moolenaarc236c162008-07-13 17:41:49 +00001930Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001931
1932
1933MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2
1934 (See |netrw-mf| and |netrw-mr| for how to mark files)
1935
1936Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
1937
1938 * if the cursor is atop a file name, then the netrw window's currently
1939 displayed directory is used for the copy/move-to target.
1940
1941 * also, if the cursor is in the banner, then the netrw window's currently
1942 displayed directory is used for the copy/move-to target.
1943
1944 * however, if the cursor is atop a directory name, then that directory is
1945 used for the copy/move-to target
1946
1947There is only one copy/move-to target per vim session; ie. the target is a
1948script variable (see |s:var|) and is shared between all netrw windows (in an
1949instance of vim).
1950
1951MARKED FILES: UNMARKING *netrw-mu* {{{2
1952 (See |netrw-mf| and |netrw-mr| for how to mark files)
1953
1954The "mu" mapping will unmark all currently marked files.
1955
1956
1957NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2
1958
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001959(if you're interested in the netrw file transfer settings, see |netrw-options|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001960
1961The <netrw.vim> browser provides settings in the form of variables which
1962you may modify; by placing these settings in your <.vimrc>, you may customize
1963your browsing preferences. (see also: |netrw-settings|)
1964>
1965 --- -----------
1966 Var Explanation
1967 --- -----------
Bram Moolenaaradc21822011-04-01 18:03:16 +02001968< *g:netrw_alto* change from above splitting to below splitting
Bram Moolenaar446cb832008-06-24 21:56:24 +00001969 by setting this variable (see |netrw-o|)
1970 default: =&sb (see |'sb'|)
1971
Bram Moolenaaradc21822011-04-01 18:03:16 +02001972 *g:netrw_altv* change from left splitting to right splitting
Bram Moolenaar446cb832008-06-24 21:56:24 +00001973 by setting this variable (see |netrw-v|)
1974 default: =&spr (see |'spr'|)
1975
Bram Moolenaaradc21822011-04-01 18:03:16 +02001976 *g:netrw_banner* enable/suppress the banner
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001977 =0: suppress the banner
1978 =1: banner is enabled (default)
1979 NOTE: suppressing the banner is a new feature
1980 which may cause problems.
1981
Bram Moolenaaradc21822011-04-01 18:03:16 +02001982 *g:netrw_browse_split* when browsing, <cr> will open the file by:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001983 =0: re-using the same window
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001984 =1: horizontally splitting the window first
1985 =2: vertically splitting the window first
Bram Moolenaar446cb832008-06-24 21:56:24 +00001986 =3: open file in new tab
1987 =4: act like "P" (ie. open previous window)
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001988 Note that |g:netrw_preview| may be used
1989 to get vertical splitting instead of
1990 horizontal splitting.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001991
Bram Moolenaaradc21822011-04-01 18:03:16 +02001992 *g:netrw_browsex_viewer* specify user's preference for a viewer: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00001993 "kfmclient exec"
1994 "gnome-open"
1995< If >
1996 "-"
1997< is used, then netrwFileHandler() will look for
1998 a script/function to handle the given
1999 extension. (see |netrw_filehandler|).
2000
Bram Moolenaaradc21822011-04-01 18:03:16 +02002001 *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002002 Windows: "cacls FILENAME /e /p PERM"
2003 Used to change access permission for a file.
2004
Bram Moolenaaradc21822011-04-01 18:03:16 +02002005 *g:netrw_compress* ="gzip"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002006 Will compress marked files with this
2007 command
2008
Bram Moolenaaradc21822011-04-01 18:03:16 +02002009 *g:netrw_ctags* ="ctags"
Bram Moolenaarc236c162008-07-13 17:41:49 +00002010 The default external program used to create tags
2011
Bram Moolenaaradc21822011-04-01 18:03:16 +02002012 *g:netrw_cursor* = 2 (default)
2013 This option controls the use of the
2014 |'cursorline'| (cul) and |'cursorcolumn'|
2015 (cuc) settings by netrw:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002016
Bram Moolenaaradc21822011-04-01 18:03:16 +02002017 Value Thin-Long-Tree Wide
2018 =0 u-cul u-cuc u-cul u-cuc
2019 =1 u-cul u-cuc cul u-cuc
2020 =2 cul u-cuc cul u-cuc
2021 =3 cul u-cuc cul cuc
2022 =4 cul cuc cul cuc
2023
2024 Where
2025 u-cul : user's |'cursorline'| setting used
2026 u-cuc : user's |'cursorcolumn'| setting used
2027 cul : |'cursorline'| locally set
2028 cuc : |'cursorcolumn'| locally set
2029
2030 *g:netrw_decompress* = { ".gz" : "gunzip" ,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002031 ".bz2" : "bunzip2" ,
2032 ".zip" : "unzip" ,
2033 ".tar" : "tar -xf"}
2034 A dictionary mapping suffices to
2035 decompression programs.
2036
Bram Moolenaaradc21822011-04-01 18:03:16 +02002037 *g:netrw_dirhistmax* =10: controls maximum quantity of past
2038 history. May be zero to supppress
2039 history.
2040 (related: |netrw-qb| |netrw-u| |netrw-U|)
2041
2042 *g:netrw_fastbrowse* =0: slow speed directory browsing;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002043 never re-uses directory listings,
2044 always obtains directory listings.
2045 =1: medium speed directory browsing;
2046 re-use directory listings only
2047 when remote directory browsing.
2048 (default value)
2049 =2: fast directory browsing;
2050 only obtains directory listings when the
2051 directory hasn't been seen before
2052 (or |netrw-ctrl-l| is used).
2053
2054 Fast browsing retains old directory listing
2055 buffers so that they don't need to be
2056 re-acquired. This feature is especially
2057 important for remote browsing. However, if
2058 a file is introduced or deleted into or from
2059 such directories, the old directory buffer
2060 becomes out-of-date. One may always refresh
2061 such a directory listing with |netrw-ctrl-l|.
2062 This option gives the user the choice of
2063 trading off accuracy (ie. up-to-date listing)
2064 versus speed.
2065
Bram Moolenaaradc21822011-04-01 18:03:16 +02002066 *g:netrw_fname_escape* =' ?&;%'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002067 Used on filenames before remote reading/writing
Bram Moolenaar446cb832008-06-24 21:56:24 +00002068
Bram Moolenaaradc21822011-04-01 18:03:16 +02002069 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
Bram Moolenaar446cb832008-06-24 21:56:24 +00002070 that can show up as "directories" and "files"
2071 in the listing. This pattern is used to
2072 remove such embedded messages. By default its
2073 value is:
2074 '^total\s\+\d\+$\|
2075 ^Trying\s\+\d\+.*$\|
2076 ^KERBEROS_V\d rejected\|
2077 ^Security extensions not\|
2078 No such file\|
2079 : connect to address [0-9a-fA-F:]*
2080 : No route to host$'
2081
Bram Moolenaaradc21822011-04-01 18:03:16 +02002082 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002083 listing. Defaults:
2084 unix or g:netrw_cygwin set: : "ls -lF"
2085 otherwise "dir"
2086
2087
Bram Moolenaaradc21822011-04-01 18:03:16 +02002088 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002089 listing, sorted by size of file.
2090 Defaults:
2091 unix or g:netrw_cygwin set: : "ls -slF"
2092 otherwise "dir"
2093
Bram Moolenaaradc21822011-04-01 18:03:16 +02002094 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002095 listing, sorted by time of last modification.
2096 Defaults:
2097 unix or g:netrw_cygwin set: : "ls -tlF"
2098 otherwise "dir"
2099
Bram Moolenaaradc21822011-04-01 18:03:16 +02002100 *g:netrw_glob_escape* ='[]*?`{~$' (unix)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002101 ='[]*?`{$' (windows
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002102 These characters in directory names are
Bram Moolenaar446cb832008-06-24 21:56:24 +00002103 escaped before applying glob()
2104
Bram Moolenaaradc21822011-04-01 18:03:16 +02002105 *g:netrw_hide* if true, the hiding list is used
Bram Moolenaar446cb832008-06-24 21:56:24 +00002106 default: =0
2107
Bram Moolenaaradc21822011-04-01 18:03:16 +02002108 *g:netrw_home* The home directory for where bookmarks and
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002109 history are saved (as .netrwbook and
2110 .netrwhist).
2111 default: the first directory on the
2112 |'runtimepath'|
2113
Bram Moolenaaradc21822011-04-01 18:03:16 +02002114 *g:netrw_keepdir* =1 (default) keep current directory immune from
Bram Moolenaar446cb832008-06-24 21:56:24 +00002115 the browsing directory.
2116 =0 keep the current directory the same as the
2117 browsing directory.
2118 The current browsing directory is contained in
2119 b:netrw_curdir (also see |netrw-c|)
2120
Bram Moolenaaradc21822011-04-01 18:03:16 +02002121 *g:netrw_list_cmd* command for listing remote directories
Bram Moolenaar446cb832008-06-24 21:56:24 +00002122 default: (if ssh is executable)
2123 "ssh HOSTNAME ls -FLa"
2124
Bram Moolenaaradc21822011-04-01 18:03:16 +02002125 *g:netrw_liststyle* Set the default listing style:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002126 = 0: thin listing (one file per line)
2127 = 1: long listing (one file per line with time
2128 stamp information and file size)
2129 = 2: wide listing (multiple files in columns)
2130 = 3: tree style listing
Bram Moolenaaradc21822011-04-01 18:03:16 +02002131 *g:netrw_list_hide* comma separated pattern list for hiding files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002132 Patterns are regular expressions (see |regexp|)
2133 Example: let g:netrw_list_hide= '.*\.swp$'
2134 default: ""
2135
Bram Moolenaaradc21822011-04-01 18:03:16 +02002136 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002137 ="copy" Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002138 Copies marked files (|netrw-mf|) to target
2139 directory (|netrw-mt|, |netrw-mc|)
2140
Bram Moolenaaradc21822011-04-01 18:03:16 +02002141 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002142 ="move" Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002143 Moves marked files (|netrw-mf|) to target
2144 directory (|netrw-mt|, |netrw-mm|)
2145
Bram Moolenaaradc21822011-04-01 18:03:16 +02002146 *g:netrw_local_mkdir* command for making a local directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002147 default: "mkdir"
2148
Bram Moolenaaradc21822011-04-01 18:03:16 +02002149 *g:netrw_local_rmdir* remove directory command (rmdir)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002150 default: "rmdir"
2151
Bram Moolenaaradc21822011-04-01 18:03:16 +02002152 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
Bram Moolenaar446cb832008-06-24 21:56:24 +00002153 listings fit on 80 column displays.
2154 If your screen is wider, and you have file
2155 or directory names longer than 32 bytes,
2156 you may set this option to keep listings
2157 columnar.
2158
Bram Moolenaaradc21822011-04-01 18:03:16 +02002159 *g:netrw_mkdir_cmd* command for making a remote directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002160 default: "ssh USEPORT HOSTNAME mkdir"
2161
Bram Moolenaar251e1912011-06-19 05:09:16 +02002162 *g:netrw_mousemaps* =1 (default) enables mouse buttons while
2163 browsing to:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002164 leftmouse : open file/directory
2165 shift-leftmouse : mark file
2166 middlemouse : same as P
2167 rightmouse : remove file/directory
2168 =0: disables mouse maps
2169
Bram Moolenaaradc21822011-04-01 18:03:16 +02002170 *g:netrw_retmap* if it exists and is set to one, then:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002171 * if in a netrw-selected file, AND
2172 * no normal-mode <2-leftmouse> mapping exists,
2173 then the <2-leftmouse> will be mapped for easy
Bram Moolenaar446cb832008-06-24 21:56:24 +00002174 return to the netrw browser window.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002175 example: click once to select and open a file,
2176 double-click to return.
2177
2178 Note that one may instead choose to:
2179 * let g:netrw_retmap= 1, AND
2180 * nmap <silent> YourChoice <Plug>NetrwReturn
2181 and have another mapping instead of
2182 <2-leftmouse> to invoke the return.
2183
2184 You may also use the |:Rexplore| command to do
2185 the same thing.
2186
Bram Moolenaar446cb832008-06-24 21:56:24 +00002187 default: =0
2188
Bram Moolenaaradc21822011-04-01 18:03:16 +02002189 *g:netrw_rm_cmd* command for removing files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002190 default: "ssh USEPORT HOSTNAME rm"
2191
Bram Moolenaaradc21822011-04-01 18:03:16 +02002192 *g:netrw_rmdir_cmd* command for removing directories
Bram Moolenaar446cb832008-06-24 21:56:24 +00002193 default: "ssh USEPORT HOSTNAME rmdir"
2194
Bram Moolenaaradc21822011-04-01 18:03:16 +02002195 *g:netrw_rmf_cmd* command for removing softlinks
Bram Moolenaar446cb832008-06-24 21:56:24 +00002196 default: "ssh USEPORT HOSTNAME rm -f"
2197
Bram Moolenaaradc21822011-04-01 18:03:16 +02002198 *g:netrw_sort_by* sort by "name", "time", or "size"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002199 default: "name"
2200
Bram Moolenaaradc21822011-04-01 18:03:16 +02002201 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002202 default: "normal"
2203
Bram Moolenaaradc21822011-04-01 18:03:16 +02002204 *g:netrw_sort_options* sorting is done using |:sort|; this
Bram Moolenaarc236c162008-07-13 17:41:49 +00002205 variable's value is appended to the
2206 sort command. Thus one may ignore case,
2207 for example, with the following in your
2208 .vimrc: >
2209 let g:netrw_sort_options="i"
2210< default: ""
2211
Bram Moolenaaradc21822011-04-01 18:03:16 +02002212 *g:netrw_sort_sequence* when sorting by name, first sort by the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002213 comma-separated pattern sequence. Note that
2214 the filigree added to indicate filetypes
2215 should be accounted for in your pattern.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002216 default: '[\/]$,*,\.bak$,\.o$,\.h$,
2217 \.info$,\.swp$,\.obj$'
2218
Bram Moolenaaradc21822011-04-01 18:03:16 +02002219 *g:netrw_special_syntax* If true, then certain files will be shown
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002220 in special syntax in the browser:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002221
2222 netrwBak : *.bak
2223 netrwCompress: *.gz *.bz2 *.Z *.zip
2224 netrwData : *.dat
2225 netrwHdr : *.h
2226 netrwLib : *.a *.so *.lib *.dll
2227 netrwMakefile: [mM]akefile *.mak
2228 netrwObj : *.o *.obj
2229 netrwTags : tags ANmenu ANtags
Bram Moolenaaradc21822011-04-01 18:03:16 +02002230 netrwTilde : *~
Bram Moolenaar446cb832008-06-24 21:56:24 +00002231 netrwTmp : tmp* *tmp
2232
2233 These syntax highlighting groups are linked
2234 to Folded or DiffChange by default
2235 (see |hl-Folded| and |hl-DiffChange|), but
2236 one may put lines like >
2237 hi link netrwCompress Visual
2238< into one's <.vimrc> to use one's own
2239 preferences.
2240
Bram Moolenaaradc21822011-04-01 18:03:16 +02002241 *g:netrw_ssh_cmd* One may specify an executable command
Bram Moolenaar446cb832008-06-24 21:56:24 +00002242 to use instead of ssh for remote actions
2243 such as listing, file removal, etc.
2244 default: ssh
2245
Bram Moolenaaradc21822011-04-01 18:03:16 +02002246 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002247 messages, banners, and whatnot that one doesn't
2248 want masquerading as "directories" and "files".
2249 Use this pattern to remove such embedded
2250 messages. By default its value is:
2251 '^total\s\+\d\+$'
2252
2253
Bram Moolenaaradc21822011-04-01 18:03:16 +02002254 *g:netrw_tmpfile_escape* =' &;'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002255 escape() is applied to all temporary files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002256 to escape these characters.
2257
Bram Moolenaaradc21822011-04-01 18:03:16 +02002258 *g:netrw_timefmt* specify format string to vim's strftime().
Bram Moolenaar446cb832008-06-24 21:56:24 +00002259 The default, "%c", is "the preferred date
2260 and time representation for the current
2261 locale" according to my manpage entry for
2262 strftime(); however, not all are satisfied
2263 with it. Some alternatives:
2264 "%a %d %b %Y %T",
2265 " %a %Y-%m-%d %I-%M-%S %p"
2266 default: "%c"
2267
Bram Moolenaaradc21822011-04-01 18:03:16 +02002268 *g:netrw_use_noswf* netrw normally avoids writing swapfiles
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002269 for browser buffers. However, under some
Bram Moolenaar446cb832008-06-24 21:56:24 +00002270 systems this apparently is causing nasty
2271 ml_get errors to appear; if you're getting
2272 ml_get errors, try putting
2273 let g:netrw_use_noswf= 0
2274 in your .vimrc.
2275
Bram Moolenaaradc21822011-04-01 18:03:16 +02002276 *g:netrw_winsize* specify initial size of new windows made with
Bram Moolenaar446cb832008-06-24 21:56:24 +00002277 "o" (see |netrw-o|), "v" (see |netrw-v|),
Bram Moolenaar251e1912011-06-19 05:09:16 +02002278 |:Hexplore| or |:Vexplore|. The g:netrw_winsize
2279 is an integer describing the percentage of the
2280 current netrw buffer's window to be used for
2281 the new window.
2282 default: 50 (for 50%)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002283
Bram Moolenaaradc21822011-04-01 18:03:16 +02002284 *g:netrw_xstrlen* Controls how netrw computes string lengths,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002285 including multi-byte characters' string
Bram Moolenaar446cb832008-06-24 21:56:24 +00002286 length. (thanks to N Weibull, T Mechelynck)
2287 =0: uses Vim's built-in strlen()
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002288 =1: number of codepoints (Latin a + combining
Bram Moolenaar446cb832008-06-24 21:56:24 +00002289 circumflex is two codepoints) (DEFAULT)
2290 =2: number of spacing codepoints (Latin a +
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002291 combining circumflex is one spacing
Bram Moolenaar446cb832008-06-24 21:56:24 +00002292 codepoint; a hard tab is one; wide and
2293 narrow CJK are one each; etc.)
2294 =3: virtual length (counting tabs as anything
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002295 between 1 and |'tabstop'|, wide CJK as 2
Bram Moolenaar446cb832008-06-24 21:56:24 +00002296 rather than 1, Arabic alif as zero when
2297 immediately preceded by lam, one
2298 otherwise, etc)
2299
Bram Moolenaaradc21822011-04-01 18:03:16 +02002300 *g:NetrwTopLvlMenu* This variable specifies the top level
Bram Moolenaar446cb832008-06-24 21:56:24 +00002301 menu name; by default, it's "Netrw.". If
2302 you wish to change this, do so in your
2303 .vimrc.
2304
2305NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2
2306
2307Netrw has been designed to handle user options by saving them, setting the
2308options to something that's compatible with netrw's needs, and then restoring
2309them. However, the autochdir option: >
2310 :set acd
2311is problematical. Autochdir sets the current directory to that containing the
2312file you edit; this apparently also applies to directories. In other words,
2313autochdir sets the current directory to that containing the "file" (even if
2314that "file" is itself a directory).
2315
Bram Moolenaaradc21822011-04-01 18:03:16 +02002316NETRW BROWSER SETTINGS *netrw-settings* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002317
2318With the NetrwSettings.vim plugin, >
2319 :NetrwSettings
2320will bring up a window with the many variables that netrw uses for its
Bram Moolenaar1afcace2005-11-25 19:54:28 +00002321settings. You may change any of their values; when you save the file, the
2322settings therein will be used. One may also press "?" on any of the lines for
2323help on what each of the variables do.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002324
Bram Moolenaar446cb832008-06-24 21:56:24 +00002325(also see: |netrw-browser-var| |netrw-protocol| |netrw-var| |netrw-variables|)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002326
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002327
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00002328==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00002329OBTAINING A FILE *netrw-O* {{{2
2330
2331If there are no marked files:
2332
2333 When browsing a remote directory, one may obtain a file under the cursor
2334 (ie. get a copy on your local machine, but not edit it) by pressing the O
2335 key.
2336
2337If there are marked files:
2338
2339 The marked files will be obtained (ie. a copy will be transferred to your
2340 local machine, but not set up for editing).
2341
2342Only ftp and scp are supported for this operation (but since these two are
2343available for browsing, that shouldn't be a problem). The status bar will
2344then show, on its right hand side, a message like "Obtaining filename". The
2345statusline will be restored after the transfer is complete.
2346
2347Netrw can also "obtain" a file using the local browser. Netrw's display
2348of a directory is not necessarily the same as Vim's "current directory",
2349unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
2350a file using the local browser (by putting the cursor on it) and pressing
2351"O" will then "obtain" the file; ie. copy it to Vim's current directory.
2352
2353Related topics:
2354 * To see what the current directory is, use |:pwd|
2355 * To make the currently browsed directory the current directory, see |netrw-c|
2356 * To automatically make the currently browsed directory the current
2357 directory, see |g:netrw_keepdir|.
2358
2359
Bram Moolenaaradc21822011-04-01 18:03:16 +02002360 *netrw-createfile*
Bram Moolenaarc236c162008-07-13 17:41:49 +00002361OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
2362
2363To open a file in netrw's current directory, press "%". This map will
2364query the user for a new filename; an empty file by that name will be
2365placed in the netrw's current directory (ie. b:netrw_curdir).
2366
2367
Bram Moolenaar446cb832008-06-24 21:56:24 +00002368PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2
2369
2370One may use a preview window by using the "p" key when the cursor is atop the
2371desired filename to be previewed. The display will then split to show both
2372the browser (where the cursor will remain) and the file (see |:pedit|).
2373By default, the split will be taken horizontally; one may use vertical
2374splitting if one has set |g:netrw_preview| first.
2375
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002376An interesting set of netrw settings is: >
2377
2378 let g:netrw_preview = 1
2379 let g:netrw_liststyle = 3
2380 let g:netrw_winsize = 30
2381
2382These will:
2383 1. Make vertical splitting the default for previewing files
2384 2. Make the default listing style "tree"
2385 3. When a vertical preview window is opened, the directory listing
2386 will use only 30 columns; the rest of the window is used for the
2387 preview window.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002388
2389PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
2390
2391To edit a file or directory in the previously used (last accessed) window (see
2392:he |CTRL-W_p|), press a "P". If there's only one window, then the one window
2393will be horizontally split (above/below splitting is controlled by
2394|g:netrw_alto|, and its initial size is controlled by |g:netrw_winsize|).
2395
2396If there's more than one window, the previous window will be re-used on
2397the selected file/directory. If the previous window's associated buffer
2398has been modified, and there's only one window with that buffer, then
2399the user will be asked if s/he wishes to save the buffer first (yes,
2400no, or cancel).
2401
2402
2403REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2
2404
2405To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
2406hit the <cr> when atop the ./ directory entry in the listing. One may also
2407refresh a local directory by using ":e .".
2408
2409
2410RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2
2411
2412If there are no marked files: (see |netrw-mf|)
2413
2414 Renaming/moving files and directories involves moving the cursor to the
2415 file/directory to be moved (renamed) and pressing "R". You will then be
2416 queried for where you want the file/directory to be moved. You may select
2417 a range of lines with the "V" command (visual selection), and then
2418 pressing "R".
2419
2420If there are marked files: (see |netrw-mf|)
2421
2422 Marked files will be renamed (moved). You will be queried as above in
2423 order to specify where you want the file/directory to be moved.
2424
2425 WARNING:~
2426
2427 Note that moving files is a dangerous operation; copies are safer. That's
2428 because a "move" for remote files is actually a copy + delete -- and if
2429 the copy fails and the delete does not, you may lose the file.
2430
2431The g:netrw_rename_cmd variable is used to implement renaming. By default its
2432value is:
2433
2434 ssh HOSTNAME mv
2435
2436One may rename a block of files and directories by selecting them with
2437the V (|linewise-visual|).
2438
2439
2440REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2
2441
2442One may toggle between normal and reverse sorting order by pressing the
2443"r" key.
2444
2445Related topics: |netrw-s|
2446Associated setting variable: |g:netrw_sort_direction|
2447
2448
2449SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
2450
2451One may select the sorting style by name, time, or (file) size. The "s" map
2452allows one to circulate amongst the three choices; the directory listing will
2453automatically be refreshed to reflect the selected style.
2454
2455Related topics: |netrw-r| |netrw-S|
2456Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
2457
2458
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002459SETTING EDITING WINDOW *netrw-C* {{{2
2460
2461One may select a netrw window for editing with the "C" mapping, or by setting
2462g:netrw_chgwin to the selected window number. Subsequent selection of a file
2463to edit (|netrw-cr|) will use that window.
2464
2465Related topics: |netrw-cr|
2466Associated setting variables: |g:netrw_chgwin|
2467
2468
Bram Moolenaar446cb832008-06-24 21:56:24 +0000246910. Problems and Fixes *netrw-problems* {{{1
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002470
2471 (This section is likely to grow as I get feedback)
2472 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00002473 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002474 P1. I use windows 95, and my ftp dumps four blank lines at the
2475 end of every read.
2476
2477 See |netrw-fixup|, and put the following into your
2478 <.vimrc> file:
2479
2480 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002481
Bram Moolenaar488c6512005-08-11 20:09:58 +00002482 *netrw-p2*
Bram Moolenaar9964e462007-05-05 17:54:07 +00002483 P2. I use Windows, and my network browsing with ftp doesn't sort by
2484 time or size! -or- The remote system is a Windows server; why
2485 don't I get sorts by time or size?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002486
2487 Windows' ftp has a minimal support for ls (ie. it doesn't
2488 accept sorting options). It doesn't support the -F which
2489 gives an explanatory character (ABC/ for "ABC is a directory").
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002490 Netrw then uses "dir" to get both its thin and long listings.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002491 If you think your ftp does support a full-up ls, put the
2492 following into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002493
Bram Moolenaar9964e462007-05-05 17:54:07 +00002494 let g:netrw_ftp_list_cmd = "ls -lF"
2495 let g:netrw_ftp_timelist_cmd= "ls -tlF"
2496 let g:netrw_ftp_sizelist_cmd= "ls -slF"
2497<
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002498 Alternatively, if you have cygwin on your Windows box, put
Bram Moolenaar9964e462007-05-05 17:54:07 +00002499 into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002500
2501 let g:netrw_cygwin= 1
Bram Moolenaar9964e462007-05-05 17:54:07 +00002502<
2503 This problem also occurs when the remote system is Windows.
2504 In this situation, the various g:netrw_ftp_[time|size]list_cmds
2505 are as shown above, but the remote system will not correctly
2506 modify its listing behavior.
2507
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002508
Bram Moolenaar488c6512005-08-11 20:09:58 +00002509 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002510 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
2511 used ssh! That wasn't what I asked for...
2512
2513 Netrw has two methods for browsing remote directories: ssh
2514 and ftp. Unless you specify ftp specifically, ssh is used.
2515 When it comes time to do download a file (not just a directory
2516 listing), netrw will use the given protocol to do so.
2517
Bram Moolenaar488c6512005-08-11 20:09:58 +00002518 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002519 P4. I would like long listings to be the default.
2520
Bram Moolenaar446cb832008-06-24 21:56:24 +00002521 Put the following statement into your |.vimrc|: >
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002522
Bram Moolenaar446cb832008-06-24 21:56:24 +00002523 let g:netrw_liststyle= 1
2524<
2525 Check out |netrw-browser-var| for more customizations that
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002526 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002527
Bram Moolenaar488c6512005-08-11 20:09:58 +00002528 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002529 P5. My times come up oddly in local browsing
2530
2531 Does your system's strftime() accept the "%c" to yield dates
2532 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
2533 and find out what option should be used. Then put it into
Bram Moolenaar446cb832008-06-24 21:56:24 +00002534 your |.vimrc|: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002535
Bram Moolenaar446cb832008-06-24 21:56:24 +00002536 let g:netrw_timefmt= "%X" (where X is the option)
2537<
Bram Moolenaar488c6512005-08-11 20:09:58 +00002538 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002539 P6. I want my current directory to track my browsing.
2540 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002541
Bram Moolenaar446cb832008-06-24 21:56:24 +00002542 Put the following line in your |.vimrc|:
2543>
Bram Moolenaar433f7c82006-03-21 21:29:36 +00002544 let g:netrw_keepdir= 0
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002545<
Bram Moolenaar9964e462007-05-05 17:54:07 +00002546 *netrw-p7*
2547 P7. I use Chinese (or other non-ascii) characters in my filenames, and
2548 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002549
Bram Moolenaar9964e462007-05-05 17:54:07 +00002550 (taken from an answer provided by Wu Yongwei on the vim
2551 mailing list)
2552 I now see the problem. You code page is not 936, right? Vim
2553 seems only able to open files with names that are valid in the
2554 current code page, as are many other applications that do not
2555 use the Unicode version of Windows APIs. This is an OS-related
2556 issue. You should not have such problems when the system
2557 locale uses UTF-8, such as modern Linux distros.
2558
2559 (...it is one more reason to recommend that people use utf-8!)
2560
2561 *netrw-p8*
2562 P8. I'm getting "ssh is not executable on your system" -- what do I
2563 do?
2564
2565 (Dudley Fox) Most people I know use putty for windows ssh. It
2566 is a free ssh/telnet application. You can read more about it
2567 here:
2568
2569 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also:
2570
2571 (Marlin Unruh) This program also works for me. It's a single
2572 executable, so he/she can copy it into the Windows\System32
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002573 folder and create a shortcut to it.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002574
2575 (Dudley Fox) You might also wish to consider plink, as it
2576 sounds most similar to what you are looking for. plink is an
2577 application in the putty suite.
2578
2579 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink
2580
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002581 (Vissale Neang) Maybe you can try OpenSSH for windows, which
Bram Moolenaar9964e462007-05-05 17:54:07 +00002582 can be obtained from:
2583
2584 http://sshwindows.sourceforge.net/
2585
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002586 It doesn't need the full Cygwin package.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002587
2588 (Antoine Mechelynck) For individual Unix-like programs needed
2589 for work in a native-Windows environment, I recommend getting
2590 them from the GnuWin32 project on sourceforge if it has them:
2591
2592 http://gnuwin32.sourceforge.net/
2593
2594 Unlike Cygwin, which sets up a Unix-like virtual machine on
2595 top of Windows, GnuWin32 is a rewrite of Unix utilities with
2596 Windows system calls, and its programs works quite well in the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002597 cmd.exe "Dos box".
Bram Moolenaar9964e462007-05-05 17:54:07 +00002598
2599 (dave) Download WinSCP and use that to connect to the server.
2600 In Preferences > Editors, set gvim as your editor:
2601
2602 - Click "Add..."
2603 - Set External Editor (adjust path as needed, include
2604 the quotes and !.! at the end):
2605 "c:\Program Files\Vim\vim70\gvim.exe" !.!
2606 - Check that the filetype in the box below is
2607 {asterisk}.{asterisk} (all files), or whatever types
2608 you want (cec: change {asterisk} to * ; I had to
2609 write it that way because otherwise the helptags
Bram Moolenaar446cb832008-06-24 21:56:24 +00002610 system thinks it's a tag)
2611 - Make sure it's at the top of the listbox (click it,
2612 then click "Up" if it's not)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002613 If using the Norton Commander style, you just have to hit <F4>
2614 to edit a file in a local copy of gvim.
2615
2616 (Vit Gottwald) How to generate public/private key and save
2617 public key it on server: >
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002618 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready
2619 (8.3 Getting ready for public key authentication)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002620<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002621 How to use a private key with 'pscp': >
2622
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002623 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html
2624 (5.2.4 Using public key authentication with PSCP)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002625<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002626 (Ben Schmidt) I find the ssh included with cwRsync is
2627 brilliant, and install cwRsync or cwRsyncServer on most
2628 Windows systems I come across these days. I guess COPSSH,
2629 packed by the same person, is probably even better for use as
2630 just ssh on Windows, and probably includes sftp, etc. which I
2631 suspect the cwRsync doesn't, though it might
2632
Bram Moolenaar9964e462007-05-05 17:54:07 +00002633 (cec) To make proper use of these suggestions above, you will
2634 need to modify the following user-settable variables in your
2635 .vimrc:
2636
Bram Moolenaar446cb832008-06-24 21:56:24 +00002637 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd|
2638 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
Bram Moolenaar9964e462007-05-05 17:54:07 +00002639
2640 The first one (|g:netrw_ssh_cmd|) is the most important; most
2641 of the others will use the string in g:netrw_ssh_cmd by
2642 default.
2643 *netrw-p9* *netrw-ml_get*
2644 P9. I'm browsing, changing directory, and bang! ml_get errors
2645 appear and I have to kill vim. Any way around this?
2646
2647 Normally netrw attempts to avoid writing swapfiles for
2648 its temporary directory buffers. However, on some systems
2649 this attempt appears to be causing ml_get errors to
2650 appear. Please try setting |g:netrw_use_noswf| to 0
2651 in your <.vimrc>: >
2652 let g:netrw_use_noswf= 0
2653<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002654 *netrw-p10*
2655 P10. I'm being pestered with "[something] is a directory" and
2656 "Press ENTER or type command to continue" prompts...
2657
2658 The "[something] is a directory" prompt is issued by Vim,
2659 not by netrw, and there appears to be no way to work around
2660 it. Coupled with the default cmdheight of 1, this message
2661 causes the "Press ENTER..." prompt. So: read |hit-enter|;
2662 I also suggest that you set your |'cmdheight'| to 2 (or more) in
2663 your <.vimrc> file.
2664
2665 *netrw-p11*
2666 P11. I want to have two windows; a thin one on the left and my editing
Bram Moolenaar251e1912011-06-19 05:09:16 +02002667 window on the right. How may I accomplish this?
Bram Moolenaar446cb832008-06-24 21:56:24 +00002668
2669 * Put the following line in your <.vimrc>:
2670 let g:netrw_altv = 1
2671 * Edit the current directory: :e .
2672 * Select some file, press v
2673 * Resize the windows as you wish (see |CTRL-W_<| and
2674 |CTRL-W_>|). If you're using gvim, you can drag
2675 the separating bar with your mouse.
2676 * When you want a new file, use ctrl-w h to go back to the
2677 netrw browser, select a file, then press P (see |CTRL-W_h|
2678 and |netrw-P|). If you're using gvim, you can press
2679 <leftmouse> in the browser window and then press the
2680 <middlemouse> to select the file.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002681
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002682 *netrw-p12*
2683 P12. My directory isn't sorting correctly, or unwanted letters are
2684 appearing in the listed filenames, or things aren't lining
2685 up properly in the wide listing, ...
2686
2687 This may be due to an encoding problem. I myself usually use
2688 utf-8, but really only use ascii (ie. bytes from 32-126).
2689 Multibyte encodings use two (or more) bytes per character.
2690 You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
2691
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002692 *netrw-p13*
2693 P13. I'm a Windows + putty + ssh user, and when I attempt to browse,
2694 the directories are missing trailing "/"s so netrw treats them
2695 as file transfers instead of as attempts to browse
2696 subdirectories. How may I fix this?
2697
2698 (mikeyao) If you want to use vim via ssh and putty under Windows,
2699 try combining the use of pscp/psftp with plink. pscp/psftp will
2700 be used to connect and plink will be used to execute commands on
2701 the server, for example: list files and directory using 'ls'.
2702
2703 These are the settings I use to do this:
2704>
2705 " list files, it's the key setting, if you haven't set,
2706 " you will get a blank buffer
2707 let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"
2708 " if you haven't add putty directory in system path, you should
2709 " specify scp/sftp command. For examples:
2710 "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
2711 "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
2712<
Bram Moolenaar251e1912011-06-19 05:09:16 +02002713 *netrw-p14*
2714 P14. I'd would like to speed up writes using Nwrite and scp/ssh
2715 style connections. How? (Thomer M. Gil)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002716
Bram Moolenaar251e1912011-06-19 05:09:16 +02002717 Try using ssh's ControlMaster and ControlPath (see the ssh_config
2718 man page) to share multiple ssh connections over a single network
2719 connection. That cuts out the cryptographic handshake on each
2720 file write, sometimes speeding it up by an order of magnitude.
2721 (see http://thomer.com/howtos/netrw_ssh.html)
2722 (included by permission)
2723
2724 Add the following to your ~/.ssh/config: >
2725
2726 # you change "*" to the hostname you care about
2727 Host *
2728 ControlMaster auto
2729 ControlPath /tmp/%r@%h:%p
2730
2731< Then create an ssh connection to the host and leave it running: >
2732
2733 ssh -N host.domain.com
2734
2735< Now remotely open a file with Vim's Netrw and enjoy the
2736 zippiness: >
2737
2738 vim scp://host.domain.com//home/user/.bashrc
2739<
2740 *netrw-p15*
2741 P15. How may I use a double-click instead of netrw's usual single click
2742 to open a file or directory? (Ben Fritz)
2743
2744 First, disable netrw's mapping with >
2745 let g:netrw_mousemaps= 0
2746< and then create a netrw buffer only mapping in
2747 $HOME/.vim/after/ftplugin/netrw.vim: >
2748 nmap <buffer> <2-leftmouse> <CR>
2749< Note that setting g:netrw_mousemaps to zero will turn off
2750 all netrw's mouse mappings, not just the <leftmouse> one.
2751 (see |g:netrw_mousemaps|)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002752
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002753==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000275411. Debugging Netrw Itself *netrw-debug* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00002755
Bram Moolenaaradc21822011-04-01 18:03:16 +02002756The <netrw.vim> script is typically available as something like:
Bram Moolenaar488c6512005-08-11 20:09:58 +00002757>
Bram Moolenaar446cb832008-06-24 21:56:24 +00002758 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
2759 /usr/local/share/vim/vim7x/autoload/netrw.vim
Bram Moolenaaradc21822011-04-01 18:03:16 +02002760< -or- >
2761 /usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
2762 /usr/local/share/vim/vim6x/autoload/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00002763<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002764which is loaded automatically at startup (assuming :set nocp).
2765
2766 1. Get the <Decho.vim> script, available as:
2767
Bram Moolenaar446cb832008-06-24 21:56:24 +00002768 http://mysite.verizon.net/astronaut/vim/index.html#DECHO
Bram Moolenaar071d4272004-06-13 20:20:40 +00002769 or
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00002770 http://vim.sourceforge.net/scripts/script.php?script_id=120
Bram Moolenaar071d4272004-06-13 20:20:40 +00002771
Bram Moolenaar446cb832008-06-24 21:56:24 +00002772 It now comes as a "vimball"; if you're using vim 7.0 or earlier,
2773 you'll need to update vimball, too. See
2774 http://mysite.verizon.net/astronaut/vim/index.html#VIMBALL
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002775
Bram Moolenaar446cb832008-06-24 21:56:24 +00002776 2. Edit the <netrw.vim> file by typing: >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002777
2778 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00002779 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002780 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00002781<
2782 To restore to normal non-debugging behavior, re-edit <netrw.vim>
2783 and type >
Bram Moolenaar071d4272004-06-13 20:20:40 +00002784
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002785 vim netrw.vim
2786 :DechoOff
2787 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00002788<
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002789 This command, provided by <Decho.vim>, will comment out all
2790 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
2791
Bram Moolenaar446cb832008-06-24 21:56:24 +00002792 3. Then bring up vim and attempt to evoke the problem by doing a
2793 transfer or doing some browsing. A set of messages should appear
2794 concerning the steps that <netrw.vim> took in attempting to
2795 read/write your file over the network in a separate tab.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002796
Bram Moolenaar9964e462007-05-05 17:54:07 +00002797 To save the file, use >
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002798 :tabnext
Bram Moolenaar9964e462007-05-05 17:54:07 +00002799 :set bt=
2800 :w! DBG
2801< Please send that information to <netrw.vim>'s maintainer, >
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00002802 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar9964e462007-05-05 17:54:07 +00002803<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002804==============================================================================
Bram Moolenaar9964e462007-05-05 17:54:07 +0000280512. History *netrw-history* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00002806
Bram Moolenaar251e1912011-06-19 05:09:16 +02002807 v142: Apr 06, 2011 * I modified NetrwRemoteListing() to use
2808 shellescape(fnameescape(s:path),1) for
2809 the benefit of those using scp://.../
2810 with subdirectories having spaces.
2811 Problem reported by: Gilles Charron
2812 Apr 18, 2011 * s:NetrwMethod() attempts to issue an
2813 error message when given a malformed url
2814 Apr 29, 2011 * converted most mousemaps to use <Plug>s
2815 * |g:netrw_winsize|'s meaning changed
Bram Moolenaaradc21822011-04-01 18:03:16 +02002816 v141: Aug 28, 2010 * added -s:... support for Windows ftp
2817 * restored 2-leftmouse for :Rex-like return
2818 * added balloon help for banner
2819 Oct 26, 2010 * :Texplore changed to start from netrw's idea
2820 of the current directory, not pwd's
2821 Feb 10, 2011 * netrwPlugin modified to use BufReadCmd
2822 when the "filename" ends with a "/" or a "\"
2823 Avoids "... is a directory" message, works
2824 inside a try-catch-endtry clause.
2825 Feb 22, 2011 * for menus, &go =~# used to insure correct case
Bram Moolenaar251e1912011-06-19 05:09:16 +02002826 Apr 01, 2011 * changed g:netrw_cursorcolumn to g:netrw_cursor
2827 In addition, there's more supported settings for
2828 it.
Bram Moolenaar477db062010-07-28 18:17:41 +02002829 v140: Jul 27, 2010 * (Lech Lorens) unexpected change of window
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002830 v139: May 14, 2010 * when viewing remote directory listings and
2831 changing listing style, going to tree listing
2832 mode was issuing two rather useless messages
2833 about the buffer name. They have now been
2834 silenced.
2835 * (Jean Johner) with "behave mswin", clicking
2836 on a filename in wide mode opened a new file
2837 with a missing first letter
2838 * (Britton Kerin) wanted netrw listings to be
2839 buflisted; the |g:netrw_bufsettings| option
2840 permits that.
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002841 Jun 18, 2010 * (Jan Steffens) added support for xz compression
2842 Jun 23, 2010 * vimdiff dir1 dir2 now works
Bram Moolenaar477db062010-07-28 18:17:41 +02002843 Jul 27, 2010 * (John Orr) pointed out that the intended maparg
2844 test for gx was actually testing for g rather
2845 than gx. Fixed.
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002846 v138: May 01, 2010 * added the bomb setting to the Save-Set-Restore
2847 option handling (for Tony M)
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002848 May 14, 2010 * (Bram Moolenaar) netrw optionally sets cursorline
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002849 (and sometimes cursorcolumn) for its display.
2850 This option setting was leaking through with
2851 remote file handling.
2852 v137: Dec 28, 2009 * modified the preview window handling for
2853 vertically split windows. The preview
2854 window will take up all but g:netrw_winsize
Bram Moolenaaradc21822011-04-01 18:03:16 +02002855 columns of the original window; those
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002856 g:netrw_winsize columns will be used for
2857 the netrw listing.
2858 * (Simon Dambe) removed "~" from
2859 |g:netrw_glob_escape| under Windows
2860 * (Bram Moolenaar) modified test for status bar
2861 click with leftmouse. Moved code to
2862 s:NetrwLeftmouse().
2863 Feb 24, 2010 * (for Jean Johner) added insert-mode maps; one
2864 can get into insert mode with netrw via
2865 ctrl-o :e .
2866 Mar 15, 2010 * (Dominique Pellé) Directory with backslashes such
2867 as foo\bar were not being entered/left properly
2868 Mar 15, 2010 * Using :Explore .. and causing two FocusGained
2869 events caused the directory to change. Fixed.
2870 Mar 22, 2010 * Last fix caused problems for *//pat and */filepat
2871 searches.
2872 Mar 30, 2010 * With :set hidden and changing listing styles 8
2873 times, the tree listing buffer was being marked
2874 as modified upon exit. Fixed.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002875 v136: Jan 14, 2009 * extended |g:Netrw_funcref| to also handle lists
2876 of function references
2877 Jan 14, 2009 * (reported by Marvin Renich) with spell check
2878 enabled, some filenamess will still being
2879 displayed as spelling errors.
2880 Apr 13, 2009 * (Björn Winckler) writing a file using
2881 remote scp caused syntax highlighting problem.
2882 Solution: avoid syntax/syntax.vim's
2883 au Filetype * syntax setting autocommand by
2884 checking that the current buffer has the
2885 netrw filetype before attempting a doau
2886 in s:NetrwSafeOptions().
2887 Apr 14, 2009 * (asgeo1) suggested the "T" map (|netrw-T|)
2888 Apr 14, 2009 * marking wasn't working on executable and
2889 other special filenames
2890 Apr 20, 2009 * (Dennis Benzinger) files opened via http have
2891 their syntax filetype auto-detected
2892 Jun 19, 2009 * (Yukihiro Nakadaira) help document improvements
2893 Jul 22, 2009 * g:netrw_browse_split will honor the
2894 |'equalalways'| setting.
2895 Jul 29, 2009 * implemented "I" mapping to toggle banner
2896 (this is experimental and still being debugged)
2897 Sep 19, 2009 * (Mike McEwan) writes via ftp now send both
2898 g:netrw_ftpmode and g:netrw_ftpextracmd (if the
2899 latter exists)
2900 Dec 02, 2009 * netrw uses vimgrep several places; it now uses
2901 "noautocmd vimgrep" (should be speedier).
2902 Dec 03, 2009 * changed back to using -source instead of -dump
2903 for elinks-using commands. (requested by James
2904 Vega and Karsten Hopp)
2905 v135: Oct 29, 2008 * using |simplify()| on directory names
2906 (supporting handling ".."s in directory names)
2907 Oct 31, 2008 * added special file highlighting for core dumps
2908 under Unix/Linux. The default sorting sequence
2909 now also gives core dumps priority.
2910 Nov 10, 2008 * uses a call to netrw#Nread() instead of Nread
2911 to avoid having to use fnameescape()
2912 * fixed a tree redrawing problem (open directory,
2913 open subdir, close subdir, close dir)
2914 Nov 19, 2008 * sprinkled some histdel("/",-1)s through the code
2915 in an attempt to prevent netrw from changing
2916 the search history.
2917 Jan 02, 2009 * |g:Netrw_funcref| included
2918 Jan 05, 2009 * Explore */ **/ *// **// all clear explorer
2919 variables
2920 Jan 05, 2009 * (Panagiotis Louridas) extended s:WinPath()
2921 to remove cygdrive from non-cygwin Windows
2922 paths. Improved the determination as to
2923 whether or not to do so.
2924 Jan 13, 2009 * included contains=@NoSpell in every syntax
2925 group for syntax/netrw.vim .
2926 v134: Sep 30, 2008 * (Sander Marechal) provided a bugfix involving
2927 the use of the |netrw-t| command with a remote
2928 directory.
2929 Sep 30, 2008 * using "x" on a remote jpg was failing; fixed.
2930 Oct 03, 2008 * bookmarks now go on a list and are stored to
2931 the first directory on the |'runtimepath'| in
2932 the hopes of making their retention reliable.
2933 History now also goes to that directory.
2934 Oct 07, 2008 * Included check that vim 7.0 or later is in use.
2935 Oct 07, 2008 * Improved |g:netrw_retmap| handling.
2936 Oct 12, 2008 * Based upon Sébastien Migniot's suggestion, if
2937 cadaver isn't available then netrw will try to
2938 use curl for the dav://... protocol.
2939 Oct 13, 2008 * added @*/ to netrw buffers' |'iskeyword'|setting
2940 This lets mf (|netrw-mf|) mark directories, links
2941 and executables.
2942 Oct 13, 2008 * avoids a second NetrwBrowse() refresh when
2943 g:netrw_fastbrowse is <= 1 (slow, medium speed)
2944 Oct 22, 2008 * |g:netrw_http_xcmd| may now be overridden
2945 independently of |g:netrw_http_cmd|.
2946 Oct 23, 2008 * [N] added to the various Explore commands to
2947 let users specify the width/height of new
2948 explorer windows, overriding |g:netrw_winsize|.
2949 v133: Aug 10, 2008 * NetReadFixup() for win95 was missing some "a:"s
2950 Aug 12, 2008 * (Jan Minář) an error condition in NetrwMethod()
2951 wasn't being used, resulting in "b:netrw_fname
2952 undefined" errors
2953 Aug 12, 2008 * (François Ingeirest) asked that "hi link" be
2954 changed to hi default link in the netrw syntax
2955 files.
2956 Aug 12, 2008 * using s:NetrwUnmarkList() more often. Filenames
2957 were being left on the global list when removed
2958 from the buffer-local lists.
2959 Aug 14, 2008 * (Joshua Clayton) an errant extra ")" was left in
2960 the rcp-handling portion of NetRead().
2961 Sep 03, 2008 * added |'cursorline'| highlighting to thin, long,
2962 and tree displays.
Bram Moolenaared39e1d2008-08-09 17:55:22 +00002963 v132: Aug 06, 2008 * Fixed marked file-based obtain
2964 Aug 08, 2008 * sourcing a file via ftp from a netrw-generated
2965 buffer (or any buffer with |'nobl'|) left an
2966 empty no-name buffer in its wake. Fixed.
Bram Moolenaare37d50a2008-08-06 17:06:04 +00002967 v130: Jul 31, 2008 * trying out elinks/links for http://host/
2968 requests. One problem: in-page links
2969 (such as with ...#LABEL) are not supported
2970 * verified that Bram's modified netrwPlugin works
2971 Aug 01, 2008 * fixed a bug: when sourcing a file via ftp, the
2972 "filter window" was left behind.
2973 v129: Jul 31, 2008 * bug found in non-mouse enabled vim and some
2974 local maps
2975 v128: Jul 30, 2008 * much work done in using shellescape() and
2976 fnameescape()
Bram Moolenaarc236c162008-07-13 17:41:49 +00002977 v126: Jun 30, 2008 * after having gone to a remote directory,
2978 <f1> was no longer taking one to the correct
2979 entry in the help (|netrw-quickhelp|). Fixed.
2980 Jul 01, 2008 * extracting the last filename from a wide listing
2981 missed the last letter when |'virtualedit'| not
2982 enabled.
2983 Jul 01, 2008 * vim foo/bar was creating [Scratch] buffers,
2984 where bar was also a directory
2985 Jul 01, 2008 * numerous additional changes were made to netrw
2986 to use fnameescape() and shellescape() instead
2987 of escape(). Not all changes have been tested
2988 as yet...
2989 Jul 01, 2008 * (James Vega reported) some problems with
2990 :NetrwSettings (due to no longer used setting
2991 variables).
2992 Jul 07, 2008 * Additional numerous changes to support security;
2993 shellescape(arg,1), etc.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002994 v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he
2995 noted that gx was failing since its call to
2996 netrw#NetBrowseX() wasn't updated to
2997 netrw#NetrwBrowseX().
2998 * (Stanis Trendelenburg) ST provides a patch to
2999 supports davs: (dav + ssl)
3000 * (Rick Choi) noted that directory names comprised
3001 of three digits were not being displayed by
3002 the internal browser. Fixed.
3003 * (Erik Falor) provided a patch to handle problems
3004 with changing directory and |'acd'| option.
3005 * (James Vega, Teemu Likonen) noted that netrw
3006 wasn't handling multi-byte filenames/directories
3007 correctly. Fixed.
3008 * (Rick) found problem with g:netrw_maxfilenamelen
3009 being overridden.
3010 * (James Vega) pointed out that netrw was
3011 misidentifying all files in a symbolically linked
3012 directory as being symbolically linked
3013 themselves. This particular problem was fixed;
3014 however, there are now situations where
3015 symbolically linked files will not be detected.
3016 Really need an internal vim function to do this
3017 identification.
3018 Apr 17, 2008 * When g:netrw_keepdir==0, current directory
3019 doesn't necessarily equal b:netrw_curdir
3020 initially. Problem is due to the patch directly
3021 above.
3022 * Fixed qf to handle case where b:netrw_curdir
3023 isn't the same as the current directory under
3024 linux/macosx.
3025 * New: |netrw-mg| (apply vimgrep to marked files)
3026 May 05, 2008 * (Rick) pointed out that a "setlocal ts=32" was
3027 interfering with g:netrw_maxfilenamelen
3028 May 05, 2008 * (James Vega) a file inside a linked directory
3029 was showing up as a symbolic link itself.
3030 May 22, 2008 * symbolic links, fifos, and sockets are now
3031 indicated by a trailing @, |, or =, respectively.
3032 Jun 06, 2008 * Removed numerous bugs from the marked file
3033 move and copy. Tested these changes under
3034 Unix only thus far.
3035 * :Rexplore returns to the screen position in the
3036 netrw listing from whence the file was edited
3037 v124: Apr 02, 2008 * (Adrian Rollett) change the line supporting the
3038 "x" action for mac to use g:netrw_shq
3039 v123: Feb 27, 2008 * Marked files now keeps a "global" marked file
3040 list. The global marked file list is used to
3041 support tag processing and vimdiff'ing
3042 (|netrw-md| |netrw-mt|)
3043 * Been insuring that mm and mc works with various
3044 combinations of local and remote directories
3045 * (Stefan Bittner) http://.../ should always have
3046 filetype "html" -- fixed.
3047 * (Stefan Bittner) a "?" in a http://.../ request
3048 wasn't being handled correctly. Fixed by
3049 removing ? from default |g:netrw_tmpfile_escape|.
3050 * (Nico Weber) % codes in http://.../ requests
3051 weren't being handled correctly. Fixed by
3052 including % in default |g:netrw_fname_escape|.
3053 * (Stefan Bittner) attempts to update Buffers.Refresh
3054 were failing because locale use changed the menu
3055 names. I implemented a workaround.
3056 v122: Feb 12, 2008 * bugfix - first sorting sequence match now has
3057 priority
3058 Feb 14, 2008 * bugfix - sorting sequence was effectively ignoring
3059 sequencing priority of anything following '*'
3060 * toggling a marked file was showing incorrect list
3061 (list was correct, but displayed matches weren't)
3062 * |g:netrw_special_syntax| implemented
3063 v121: Feb 11, 2008 * Bram M reported that :e file ... :e . would not
3064 retain the alternate file. Fixed -- I hope!
3065 * bugfix -- apparently v120 broke an explicit
3066 :Explore dirname
3067 v120: Jan 21, 2008 * |netrw-mt| changed to allow for target selection
3068 based on whether or not word under cursor is a
3069 directory or file, or if cursor is in banner
3070 area.
3071 * |netrw-mh| included (hiding by marked-file suffix)
3072 * functions moved about a bit (improved
3073 categorization)
3074 * executable files now displayed with trailing (*)
3075 * symbolically linked files now displayed with
3076 trailing (@)
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003077 * Somewhen, s:NetrwMarkFileMove() got damaged. It
3078 * is now restored (missing an endif, for example).
Bram Moolenaar446cb832008-06-24 21:56:24 +00003079 * |netrw-mu| implemented (unmarking marked files)
3080 * many bugs have been removed from the marked file
3081 system (tnx to Mark S. for feedback)
3082 * |netrw-ms| implemented (sourcing marked files)
3083 * fixed use of P with tree listing style
3084 * multiple tree listing now supported
3085 * ./ suppressed
3086 * changed q -> qb (query bookmarks)
3087 * implemented |netrw-qf|
3088 * Explore now has four special list-generation
3089 modes: */filepat **/filepat
3090 *//pattern **//pattern
3091 * gh (|netrw-gh|) is a shortcut for toggling the
3092 hiding of files and directories beginning with a
3093 dot
3094 v119: Jan 10, 2008 * When g:netrw_keepdir is false,
3095 NetrwOptionsRestore() had a problem
3096 (Bill McCarthy)
3097 Jan 11, 2008 * Netrw now shows symbolic links with a trailing
3098 "@" and special highlighting.
3099 Jan 15, 2008 * Changed g:netrw_noretmap -> |g:netrw_retmap|.
3100 Changed: disabled by default at Bram's
3101 preference.
3102 v118: Jan 02, 2008 * Fixed a problem with Windows;
3103 :Explore c:/path/ would not work,
3104 but :Explore c:/path would.
3105 * Fixed a bug in s:NetrwOptionRestore() - lcd's
3106 argument wasn't being properly escaped so it
3107 wouldn't handle spaces in directory names.
3108 (Gary Johnson)
3109 v117: Jan 02, 2008 * Fixed a problem with P; had to include
3110 a b:netrw_curdir bypass (Bram Moolenaar)
3111 v116: Nov 27, 2007 * netrw#LocalBrowseCheck() has &ft=="netrw"
3112 check to prevent doing a directory listing
3113 (was getting unexpected directory refreshes
3114 in the middle of some function calls)
3115 * NetrwOptionRestore moved after e! filename
3116 in order to retain user options for editing
3117 in s:NetrwBrowseChgDir()
3118 Dec 12, 2007 * Bug fix -- netrw does a better job of retaining
3119 user options when editing files under the aegis
3120 of the browser
3121 v115: Oct 04, 2007 * Erik Remmelzwaal pointed out that the use of
3122 shellslash in s:GetTempfile() was incorrect
3123 Oct 11, 2007 * Tracked down and eliminated a bug with editing
3124 remote *.tar.gz and *.tar.bz2 files
3125 Oct 11, 2007 * g:netrw_localmovecmd wasn't being initialized
3126 properly, and g:netrw_localcopycmd was being
3127 overwritten.
3128 Oct 12, 2007 * Placed all :Rexplore and <2-leftmouse> setup
3129 in a new support function (s:SetRexDir()).
3130 Oct 15, 2007 * new: g:netrw_browse_split == 4; means <cr>
3131 based selection will use previous window
3132 Oct 20, 2007 * also checks on |'shellxquote'| to set g:netrw_shq
3133 Oct 24, 2007 * Explore handles path/**/filename
3134 Oct 27, 2007 * sourcing remote files often didn't work with ftp,
3135 turns out that b:netrw_method was undefined, so
3136 s:SaveBufVars and s:RestoreBufVars() fixed it.
3137 v114: Sep 28, 2007 * mT, the map that invokes tags, has been improved
3138 to support use of remote tags files.
3139 Oct 02, 2007 * changed Netrw menu to use more submenus
3140 v113: Sep 07, 2007 * worked out why the cursor position wasn't being
3141 saved and restored as intended after doing such
3142 things as deleting and renaming files.
3143 Sep 11, 2007 * Fixed bug which effectively disabled <c-l> and
3144 <c-h> maps
3145 Sep 18, 2007 * there used to be one NetrwOptionRestore() call at
3146 the end of the s:NetrwBrowseChgDir() function;
3147 they're now at the end of every if..elseif..else
3148 block. The edit-a-file one is not quite at the end
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003149 of its block; instead, it's just before the edit.
Bram Moolenaar446cb832008-06-24 21:56:24 +00003150 Restores user options, then this new placement
3151 allows ftplugins, autocmds, etc to change settings
3152 (ex. ftplugin/cpp.vim sets cindent).
3153 Sep 19, 2007 * changed all strlen() calls to use s:Strlen(), a
3154 function which handles utf-8 wide characters
3155 correctly.
3156 Sep 20, 2007 * (Nico Weber) the "x" command has been extended
3157 to Mac's OS/X (macunix); it now uses open to
3158 handle |netrw-x| browsing with special files.
3159 Sep 22, 2007 * Added g:netrw_noretmap to netrw at Tony M's
3160 request.
3161 * Included path to NetrwRemoteRmFile()
3162 v112: Aug 18, 2007 * added mx (|netrw-mx|) for executing arbitrary
3163 commands on marked files
3164 Aug 22, 2007 * more option save/restore work for
3165 s:NetrwBrowseChgDir(); s:NetrwOptionSave()
3166 and s:NetrwOptionRestore() now take a parameter
3167 specifying the type of variables to be used for
3168 saving and restoring (either "w:" or "s:")
3169 Sep 04, 2007 * added the :NetrwClean[!] command
3170 v111: Jul 25, 2007 * using Windows but not using Cygwin, netrw does a
3171 "file bufname" where the bufname uses /s
3172 instead of \s; Vim "fixes" it by changing the
3173 bufname to use \s anyway. This meant that
3174 NetrwGetBuffer() didn't find the appropriately
3175 named buffer, and so would generate a new
3176 buffer listing; hence the cursor would appear
3177 to have been moved when doing a preview.
3178 * added <2-leftmouse> map to return to netrw's
3179 browser display
3180 Aug 16, 2007 * added the mark-file system, including
3181 maps for mf mp mt mz and mu. Modifications
3182 made to maps for a D O and R to support
3183 marked files.
3184 v110: May 10, 2007 * added [ and ] maps to NetrwTreeListing
3185 May 25, 2007 * |g:netrw_preview| included
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003186 May 29, 2007 * modified netrw#NetBrowseX to consistently use
Bram Moolenaarc236c162008-07-13 17:41:49 +00003187 g:netrw_shq instead of hardcoded quotes,
Bram Moolenaar446cb832008-06-24 21:56:24 +00003188 and modified the snippet that sets up redir
3189 so Windows machines use "nul" instead of
3190 "/dev/null".
3191 Jun 01, 2007 * fixed bug -- NetGetBuffer() wasn't always
3192 recognizing a buffer name match when it should,
3193 thus resulting in [Scratch] buffers.
3194 Jun 04, 2007 * Gary Johnson found a bugfix for the "c" mapping
3195 when the directory is to be made current but
3196 the name contains spaces.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003197 v109: Mar 26, 2007 * if a directory name includes a "$" character,
3198 Explore() will use expand() in an attempt to
3199 decipher the name.
3200 May 07, 2007 * g:netrw_use_errorwindow now allows one to
Bram Moolenaar446cb832008-06-24 21:56:24 +00003201 have error messages go to a reliable window
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003202 or to use a less reliable but recallable
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003203 echoerr method
3204 May 07, 2007 * g:netrw_scpport and g:netrw_sshport support
Bram Moolenaar446cb832008-06-24 21:56:24 +00003205 use of -P and -p, respectively, to set port
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003206 for scp/ssh.
Bram Moolenaar9964e462007-05-05 17:54:07 +00003207 v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting
3208 remote browsing
3209 * netrw can now source remote files
3210 Jan 26, 2007 * Colton Jamieson noted that remote directory
3211 browsing did not support alternate port
3212 selection. This feature has now been extended
3213 to apply to all remote browsing commands via ssh.
3214 (list, remove/delete, rename)
3215 Jan 31, 2007 * Luis Florit reported that @* was an invalid
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003216 register. The @* register is now only saved and
3217 restored if |'guioptions'| contains "a".
Bram Moolenaar9964e462007-05-05 17:54:07 +00003218 Feb 02, 2007 * Fixed a bug that cropped up when writing files
3219 via scp using cygwin
3220 Feb 08, 2007 * tree listing mode managed to stop working again;
3221 fixed again!
3222 Feb 15, 2007 * Guido Van Hoecke reported that netrw didn't
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003223 handle browsing well with M$ ftp servers. He even
Bram Moolenaar9964e462007-05-05 17:54:07 +00003224 set up a temporary account for me to test with
3225 (thanks!). Netrw now can browse M$ ftp servers.
3226 v107: Oct 12, 2006 * bypassed the autowrite option
3227 Oct 24, 2006 * handles automatic decompression of *.gz and *.bz2
3228 files
3229 Nov 03, 2006 * Explore will highlight matching files when
3230 **/pattern is used (and if the |'hls'| option
3231 is set)
3232 Nov 09, 2006 * a debugging line, when enabled, was inadvertently
3233 bringing up help instead of simply reporting on
3234 list contents
3235 Nov 21, 2006 * tree listing improved (cursor remains put)
3236 Nov 27, 2006 * fixed b:netrw_curdir bug when repeated "i"s were
3237 pressed.
3238 Dec 15, 2006 * considerable qty of changes, mostly to share more
3239 code between local and remote browsing. Includes
3240 support for tree-style listing for both remote
3241 and local browsing.
3242 Dec 15, 2006 * Included Peter Bengtsson's modifications to
3243 support the Amiga.
3244 v106: Sep 21, 2006 * removed old v:version<700 code as netrw now
3245 requires vim 7.0
3246 * worked around a bug where register * was
3247 overwritten during local browsing
3248 v104: Sep 05, 2006 * as suggested by Rodolfo Borges, :Explore and
3249 variants will position the cursor on the file
3250 just having been edited
3251 * changed default |g:netrw_sort_sequence| order
3252 * changed b, Nb to simply mb (see |netrw-mb|)
3253 * changed B, NB to simply gb (see |netrw-gb|)
3254 * tree listing style (see |g:netrw_liststyle|)
3255 * attempts to retain the alternate file
3256 v103: Jul 26, 2006 * used Yakov Lerner's tip#1289 to improve netrw
3257 error message display
3258 * wide listings didn't handle files with backslashes
3259 in their names properly. A symptom was an
3260 inability to open files.
3261 Aug 09, 2006 * included "t" mapping for opening tabbed windows,
3262 both for remote and local browsing
3263 * changed netrw_longlist to netrw_liststyle
3264 Aug 15, 2006 * fixed one of the NB maps
3265 Aug 22, 2006 * changed *Explore commands to use -nargs=* instead
3266 of -nargs=?. Allows both -complete=dir _and_ the
3267 starstar arguments to work (-nargs=? seems to
3268 require one or the other).
3269 Aug 23, 2006 * copied all w:.. variables across splits to
3270 new windows
3271 Aug 25, 2006 * when g:netrw_browsex_viewer was '-'
3272 (see |g:netrw_browsex_viewer|) it wasn't causing
3273 netrwFileHandlers#Invoke() to be called as it
3274 was expected to. (tnx Steve Dugaro)
3275 Aug 29, 2006 * changed NetBrowseX() to use "setlocal ... noswf"
3276 instead of "set ... noswf" (tnx Benji Fisher)
3277 Aug 31, 2006 * tabs and fastbrowse<=1 didn't work together.
3278 v102: Jun 15, 2006 * chgd netrwPlugin to call netrw#LocalBrowseCheck()
3279 * bugfix: g:netrw_keepdir==0 had stopped working
3280 Jul 06, 2006 * bugfix: NetOptionSave/Restore now saves/restores
3281 the unnamed register (|registers|)
3282 Jul 07, 2006 * |g:netrw_menu| support included
3283 Jul 13, 2006 * :Texplore command implemented
3284 Jul 17, 2006 * NetSplit and (Local|Net)BrowseChgDir() were both
3285 splitting windows. This affected o, v, and
3286 g:netrw_browse_split.
3287 Jul 20, 2006 * works around wildignore setting (was causing
3288 netrw's local browser not to list wildignore'd
3289 files)
3290 Jul 24, 2006 * <leftmouse> acts as a <cr> for selecting a file
3291 <rightmouse> acts as a <del> for deleting a file
3292 v100: May 14, 2006 * when using Windows and shell==cmd.exe, the
3293 default for g:netrw_ignorenetrc is now 1
3294 * bugfix: unwanted ^Ms now removed
3295 (affected shell==cmd.exe - Windows)
3296 * added Bookmarks and History to the menu
3297 * an error message about non-existing
3298 w:netrw_longlist was appearing during attempts to
3299 Explore (fixed)
3300 * g:netrw_shq now available to make netrw use
3301 specified style of quotes for commands
3302 May 29, 2006 * user NFH_*() functions were inadvertently being
3303 ignored
3304 * fixed a Windows non-cygwin ftp handling problem.
3305 * hiding pattern candidate separators included some
3306 characters it shouldn't have (tnx to Osei Poku)
3307 Jun 01, 2006 * for browsing, netrw was supposed to use "dir"
3308 instead of "ls -lF" when using
3309 ftp+non-cygwin+windows. Fixed.
3310 * an inadvertently left-in-place debugging statement
3311 was preventing use of the "x" key with browsing.
3312 Jun 05, 2006 * g:netrw_nogx available to prevent making the gx
3313 map (see |g:netrw_nogx|)
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003314 * bugfix, Explore wouldn't change directory
Bram Moolenaar9964e462007-05-05 17:54:07 +00003315 properly (vim ., :Explore subdirname)
3316 Jun 06, 2006 * moved history to 2nd line in Netrw menu
3317 * fixed delete for unix-based systems
3318 Jun 07, 2006 * x key now works for windows-noncygwin-ftp
3319 Jun 08, 2006 * Explore */pat and **//pat now wraps
3320 v99: May 09, 2006 * g:netrw_browse_split=3 for opening files in new
3321 tabs implemented.
3322 May 12, 2006 * deletes temporary file at end of NetRead()
3323 * visual mode based Obtain implemented
3324 * added -complete=dir to the various Explore
3325 commands
3326 v98: May 02, 2006 * the "p" key didn't work properly when the browsing
3327 directory name had spaces in it.
3328 v97: May 01, 2006 * exists("&acd") now used to determine if
3329 the 'acd' option exists
3330 * "obtain" now works again under Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00003331 v96: * bugfix - the |'acd'| option is not always defined
3332 but is now bypassed only when it is
3333 v95: * bugfix - Hiding mode worked correctly (don't show
3334 any file matching any of the g:netrw_hide
3335 patterns), but showing mode was showing only those
3336 files that didn't match any of the g:netrw_hide
3337 patterns. Instead, it now shows all files that
3338 match any of the g:netrw_hide patterns (the
3339 difference between a logical and and logical or).
3340 v94: * bugfix - a Decho() had a missing quote; only
3341 affects things when debugging was enabled.
3342 v93: * bugfix - removed FocusGained event from causing a
3343 slow-browser refresh for Windows
3344 v92: * :Explore **//pattern implemented
3345 (**/filepattern was already taken)
3346 v91: * :Explore */pattern implemented
3347 * |'acd'| option bypassed
3348 v90: * mark ', as suggested by Yegappan Lakshmanan, used
3349 to help guarantee entry into the jump list when
3350 appropriate.
3351 * <s-down> and <s-up> are no longer defined until a
3352 :Explore **/pattern is used (if the user already
3353 has a map for them). They will be defined for new
3354 browser windows from that point forward.
3355 v89: * A <s-down>, <s-up>, :Nexplore, or a :Pexplore
3356 without having first done an :Explore **/pattern
3357 (see |netrw-starstar|) caused
3358 a lot of unhelpful error messages to appear
3359 v88: * moved DrChip.Netrw menu to Netrw. Now has
3360 priority 80 by default.
3361 g:NetrwTopLvlMenu == "Netrw" and can be changed
3362 by the user to suit. The priority is given by
3363 g:NetrwMenuPriority.
3364 * Changed filetype for browser displays from
3365 netrwlist to netrw.
3366 v87: * bug fix -- menus were partially disappearing
3367 v85: * bug fix -- missing an endif
3368 * bug fix -- handles spaces in names and directories
3369 when using ftp-based browsing
3370 v83: * disabled stop-acd handling; the change in directory
3371 handling may allow acd to be used again.
3372 * D was refusing to delete remote files/directories
3373 in wide listing mode.
3374 v81: * FocusGained also used to refresh/wipe local browser
3375 directory buffers
3376 * (bugfix) netrw was leaving [Scratch] buffers behind
3377 when the user had the "hidden" option set. The
3378 'hidden' option is now bypassed.
3379 v80: * ShellCmdPost event used in conjunction with
3380 g:netrw_fastbrowse to refresh/wipe local browser
3381 directory buffers.
3382 v79: * directories are now displayed with nowrap
3383 * (bugfix) if the column width was smaller than the
3384 largest file's name, then netrw would hang when
3385 using wide-listing mode - fixed
3386 * g:netrw_fastbrowse introduced
3387 v78: * progress has been made on allowing spaces inside
3388 directory names for remote work (reading, writing,
3389 browsing). (scp)
3390 v77: * Mikolaj Machowski fixed a bug in a substitute cmd
3391 * g:netrw_browsex_viewer implemented
3392 * Mikolaj Machowski pointed out that gnome-open is
3393 often executable under KDE systems, although it is
3394 effectively not functional. NetBrowseX now looks
3395 for "kicker" as a running process to determine if
3396 KDE is actually running.
3397 * Explorer's O functionality was inadvertently left
3398 out. Netrw now does the same thing, but with the
3399 "P" key.
3400 * added g:netrw_browse_split option
3401 * fixed a bug where the directory contained a "." but
3402 the file didn't (was treating the dirname from "."
3403 onwards as a suffix)
3404 v76: * "directory is missing" error message now restores
3405 echo highlighting
3406 v75: * file://... now conforms to RFC2396 (thanks to
3407 S. Zacchiroli)
3408 * if the binary option is set, then NetWrite() will
3409 only write the whole file (line numbers don't make
3410 sense with this). Supports writing of tar and zip
3411 files.
3412 v74: * bugfix (vim, then :Explore) now works
3413 * ctrl-L keeps cursor at same screen location (both
3414 local and remote browsing)
3415 * netrw now can read remote zip and tar files
3416 * Obtain now uses WinXP ftp+.netrc successfully
3417 v73: * bugfix -- scp://host/path/file was getting named
3418 incorrectly
3419 * netrw detects use of earlier-than-7.0 version of
3420 vim and issues a pertinent error message.
3421 * netrwSettings.vim is now uses autoloading. Only
3422 <netrwPlugin.vim> is needed as a pure plugin
3423 (ie. always loaded).
3424 v72: * bugfix -- formerly, one could prevent the loading
3425 of netrw by "let g:loaded_netrw=1"; when
3426 autoloading became supported, this feature was
3427 lost. It is now restored.
3428 v71: * bugfix -- made some "set nomodifiable"s into
3429 setlocal variants (allows :e somenewfile to be
3430 modifiable as usual)
3431 * NetrwSettings calls a netrw function, thereby
3432 assuring that netrw has loaded. However, if netrw
3433 does not load for whatever reason, then
3434 NetrwSettings will now issue a warning message.
3435 * For what reason I don't recall, when wget and fetch
3436 are both not present, and an attempt to read a
3437 http://... url is made, netrw exited. It now only
3438 returns.
3439 * When ch=1, on the second and subsequent uses of
3440 browsing Netrw would issue a blank line to clear
3441 the echo'd messages. This caused an annoying
3442 "Hit-Enter" prompt; now a blank line message
3443 is echo'd only if &ch>1.
3444 v70: * when using |netrw-O|, the "Obtaining filename"
3445 message is now shown using |hl-User9|. If User9
3446 has not been defined, netrw itself will define it.
3447 v69: * Bugfix: win95/98 machines were experiencing a
3448 "E121: Undefined variable: g:netrw_win95ftp"
3449 message
3450 v68: * double-click-leftmouse selects word under mouse
3451 v67: * Passwords which contain blanks will now be
3452 surrounded by double-quotes automatically (Yongwei)
3453 v66: * Netrw now seems to work with a few more Windows
3454 situations
3455 * O now obtains a file: remote browsing
3456 file -> local copy, locally browsing
3457 file -> current directory (see :pwd)
3458 * i now cycles between thin, long, and wide listing
3459 styles
3460 * NB and Nb are maps that are always available;
3461 corresponding B and b maps are only available when
3462 not using wide listing in order to allow them to
3463 be used for motions
3464 v65: * Browser functions now use NetOptionSave/Restore; in
3465 particular, netrw now works around the report
3466 setting
3467 v64: * Bugfix - browsing a "/" directory (Unix) yielded
3468 buffers named "[Scratch]" instead of "/"
3469 * Bugfix - remote browsing with ftp was omitting
3470 the ./ and ../
3471 v63: * netrw now takes advantage of autoload (needs 7.0)
3472 * Bugfix - using r (to reverse sort) working again
3473 v62: * Bugfix - spaces allowed again in directory names
3474 with g:netrw_keepdir=0. In fact, I've tested netrw
3475 with most ANSI punctuation marks for directory
3476 names.
3477 * Bugfix - NetrwSettings gave errors when
3478 g:netrw_silent had not be set.
3479 v61: * Document upgrade -- netrw variable-based settings
3480 all should have tags. Supports NetrwSettings cmd.
3481 * Several important variables are window-oriented.
3482 Netrw has to transfer these across a window split.
3483 See s:BufWinVars() and s:UseBufWinVars().
3484 v60: * When using the i map to switch between long and
3485 short listings, netrw will now keep cursor on same
3486 line
3487 * "Match # of #" now uses status line
3488 * :Explore **/*.c will now work from a
3489 non-netrw-browser window
3490 * :Explore **/patterns can now be run in separate
3491 browser windows
3492 * active banner (hit <cr> will cause various things
3493 to happen)
3494 v59: * bugfix -- another keepalt work-around installed
3495 (for vim6.3)
3496 * "Match # of #" for Explore **/pattern matches
3497 v58: * Explore and relatives can now handle
3498 **/somefilepattern (v7)
3499 * Nexplore and Pexplore introduced (v7). shift-down
3500 and shift-up cursor keys will invoke Nexplore and
3501 Pexplore, respectively.
3502 * bug fixed with o and v
3503 * autochdir only worked around for vim when it has
3504 been compiled with either
3505 |+netbeans_intg| or |+sun_workshop|
3506 * Under Windows, all directories and files were
3507 being preceded with a "/" when local browsing.
3508 Fixed.
3509 * When: syntax highlighting is off, laststatus=2, and
3510 remote browsing is used, sometimes the laststatus
3511 highlighting bleeds into the entire display. Work
3512 around - do an extra redraw in that case.
3513 * Bugfix: when g:netrw_keepdir=0, due to re-use of
3514 buffers, netrw didn't change the directory when it
3515 should've
3516 * Bugfix: D and R commands work again
3517 v57: * Explore and relatives can now handle RO files
3518 * reverse sort restored with vim7's sort command
3519 * g:netrw_keepdir now being used to keep the current
3520 directory unchanged as intended (sense change)
3521 * vim 6.3 still supported
3522 v56: * LocalBrowse now saves autochdir setting, unsets it,
3523 and restores it before returning.
3524 * using vim's rename() instead of system +
3525 local_rename variable
3526 * avoids changing directory when g:netrw_keepdir is
3527 false
3528 v55: * -bar used with :Explore :Sexplore etc to allow
3529 multiple commands to be separated by |s
3530 * browser listings now use the "nowrap" option
3531 * browser: some unuseful error messages now
3532 suppressed
3533 v54: * For backwards compatibility, Explore and Sexplore
3534 have been implemented. In addition, Hexplore and
3535 Vexplore commands are available, too.
3536 * <amatch> used instead of <afile> in the
3537 transparency support (BufReadCmd, FileReadCmd,
3538 FileWriteCmd)
3539 * ***netrw*** prepended to various error messages
3540 netrw may emit
3541 * g:netrw_port used instead of b:netrw_port for scp
3542 * any leading [:#] is removed from port numbers
3543 v53: * backslashes as well as slashes placed in various
3544 patterns (ex. g:netrw_sort_sequence) to better
3545 support Windows
3546 v52: * nonumber'ing now set for browsing buffers
3547 * when the hiding list hid all files, error messages
3548 ensued. Fixed
3549 * when browsing, swf is set, but directory is not
3550 set, when netrw was attempting to restore options,
3551 vim wanted to save a swapfile to a local directory
3552 using an url-style path. Fixed
3553 v51: * cygwin detection now automated
3554 (using windows and &shell is bash)
3555 * customizable browser "file" rejection patterns
3556 * directory history
3557 * :[range]w url now supported (ie. netrw uses a
3558 FileWriteCmd event)
3559 * error messages have a "Press <cr> to continue" to
3560 allow them to be seen
3561 * directory browser displays no longer bother the
3562 swapfile
3563 * u/U commands to go up and down the history stack
3564 * history stack may be saved with viminfo with it's
3565 "!" option
3566 * bugfixes associated with unwanted [No Files]
3567 entries
3568 v50: * directories now displayed using buftype=nofile;
3569 should keep the directory names as-is
3570 * attempts to remove empty "[No File]" buffers
3571 leftover from :file ..name.. commands
3572 * bugfix: a "caps-lock" editing difficulty left in
3573 v49 was fixed
3574 * syntax highlighting for "Showing:" the hiding list
3575 included
3576 * bookmarks can now be retained if "!" is in the
3577 viminfo option
3578 v49: * will use ftp for http://.../ browsing
3579 v48: * One may use ftp to do remote host file browsing
3580 * (windows and !cygwin) remote browsing with ftp can
3581 now use the "dir" command internally to provide
3582 listings
3583 * g:netrw_keepdir now allows one to keep the initial
3584 current directory as the current directory
3585 (normally the local file browser makes the
3586 currently viewed directory the current directory)
3587 * g:netrw_alto and g:netrw_altv now support
3588 alternate placement of windows started with o or v
3589 * Nread ? and Nwrite ? now uses echomsg (instead of
3590 echo) so :messages can repeat showing the help
3591 * bugfix: avoids problems with partial matches of
3592 directory names to prior buffers with longer names
3593 * one can suppress error messages with g:netrw_quiet
3594 ctrl-h used
3595 * instead of <Leader>h for editing hiding list one
3596 may edit the sorting sequence with the S map, which
3597 now allows confirmation of deletion with
3598 [y(es) n(o) a(ll) q(uit)]
3599 * the "x" map now handles special file viewing with:
3600 (windows) rundll32 url.dll (gnome) gnome-open (kde)
3601 kfmclient If none of these are on the executable
3602 path, then netrwFileHandlers.vim is used.
3603 * directory bookmarking during both local and remote
3604 browsing implemented
3605 * one may view all, use the hiding list to suppress,
3606 or use the hiding list to show-only remote and
3607 local file/directory listings
3608 * improved unusual file and directory name handling
3609 preview window support
3610 v47: * now handles local browsing.
3611 v46: * now handles remote browsing
3612 * g:netrw_silent (if 1) will cause all transfers to
3613 be silent
3614 v45: * made the [user@]hostname:path form a bit more
3615 restrictive to better handle errors in using
3616 protocols (e.g. scp:usr@host:file was being
3617 recognized as an rcp request)
3618 v44: * changed from "rsync -a" to just "rsync"
3619 * somehow an editing error messed up the test to
3620 recognize use of the fetch method for NetRead.
3621 * more debugging statements included
3622 v43: * moved "Explanation" comments to <pi_netrw.txt> help
3623 file as "Network Reference" (|netrw-ref|)
3624 * <netrw.vim> now uses Dfunc() Decho() and Dret() for
3625 debugging
3626 * removed superfluous NetRestorePosn() calls
3627 v42: * now does BufReadPre and BufReadPost events on
3628 file:///* and file://localhost/*
3629 v41: * installed file:///* and file://localhost/* handling
3630 v40: * prevents redraw when a protocol error occurs so
3631 that the user may see it
3632 v39: * sftp support
3633 v38: * Now uses NetRestorePosn() calls with Nread/Nwrite
3634 commands
3635 * Temporary files now removed via bwipe! instead of
3636 bwipe (thanks to Dave Roberts)
3637 v37: * Claar's modifications which test if ftp is
3638 successful, otherwise give an error message
3639 * After a read, the alternate file was pointing to
3640 the temp file. The temp file buffer is now wiped
3641 out.
3642 * removed silent from transfer methods so user can
3643 see what's happening
Bram Moolenaar071d4272004-06-13 20:20:40 +00003644
3645
3646==============================================================================
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100364713. Todo *netrw-todo* {{{1
3648
364907/29/09 : banner :|g:netrw_banner| can be used to suppress the
3650 suppression banner. This feature is new and experimental,
3651 so its in the process of being debugged.
365209/04/09 : "gp" : See if it can be made to work for remote systems.
3653 : See if it can be made to work with marked files.
3654
3655==============================================================================
365614. Credits *netrw-credits* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00003657
3658 Vim editor by Bram Moolenaar (Thanks, Bram!)
3659 dav support by C Campbell
3660 fetch support by Bram Moolenaar and C Campbell
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003661 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
Bram Moolenaar071d4272004-06-13 20:20:40 +00003662 http support by Bram Moolenaar <bram@moolenaar.net>
3663 rcp
3664 rsync support by C Campbell (suggested by Erik Warendorph)
3665 scp support by raf <raf@comdyn.com.au>
3666 sftp support by C Campbell
3667
3668 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
3669
3670 Jérôme Augé -- also using new buffer method with ftp+.netrc
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003671 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003672 fetch,...
Bram Moolenaar071d4272004-06-13 20:20:40 +00003673 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
3674 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
3675 variables, rsync etc)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003676 Doug Claar -- modifications to test for success with ftp
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003677 operation
Bram Moolenaar071d4272004-06-13 20:20:40 +00003678
3679==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00003680Modelines: {{{1
Bram Moolenaar83bab712005-08-01 21:58:57 +00003681 vim:tw=78:ts=8:ft=help:norl:fdm=marker