blob: 1879dd8ed1361221ef0115e7f0d711e60b00dccc [file] [log] [blame]
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001*pi_netrw.txt* For Vim version 7.2c. Last change: 2008 Aug 01
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 Moolenaar071d4272004-06-13 20:20:40 +00006
Bram Moolenaar1afcace2005-11-25 19:54:28 +00007
Bram Moolenaar446cb832008-06-24 21:56:24 +00008*dav* *ftp* *netrw-file* *Nread* *rcp* *scp*
9*davs* *http* *netrw.vim* *Nsource* *rsync* *sftp*
10*fetch* *netrw* *network* *Nwrite*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011
12==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000131. Contents *netrw-contents* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +000014
Bram Moolenaar9964e462007-05-05 17:54:07 +0000151. Contents.............................................|netrw-contents|
162. Starting With Netrw..................................|netrw-start|
173. Netrw Reference......................................|netrw-ref|
Bram Moolenaar446cb832008-06-24 21:56:24 +000018 EXTERNAL APPLICATIONS AND PROTOCOLS................|netrw-externapp|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000019 READING............................................|netrw-read|
20 WRITING............................................|netrw-write|
21 DIRECTORY LISTING..................................|netrw-dirlist|
22 CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
Bram Moolenaar446cb832008-06-24 21:56:24 +000023 VARIABLES AND SETTINGS.............................|netrw-variables|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000024 PATHS..............................................|netrw-path|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000254. Network-Oriented File Transfer.......................|netrw-xfer|
Bram Moolenaar83bab712005-08-01 21:58:57 +000026 NETRC..............................................|netrw-netrc|
27 PASSWORD...........................................|netrw-passwd|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000285. Activation...........................................|netrw-activate|
Bram Moolenaar446cb832008-06-24 21:56:24 +0000296. Transparent File Editing.............................|netrw-transparent|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000307. Ex Commands..........................................|netrw-ex|
318. Variables and Options................................|netrw-var|
Bram Moolenaar446cb832008-06-24 21:56:24 +0000329. Browsing.............................................|netrw-browse|
33 Introduction To Browsing...........................|netrw-intro-browse|
34 Quick Reference: Maps..............................|netrw-browse-maps|
35 Quick Reference: Commands..........................|netrw-browse-cmds|
36 Bookmarking A Directory............................|netrw-mb|
Bram Moolenaar83bab712005-08-01 21:58:57 +000037 Browsing...........................................|netrw-cr|
Bram Moolenaar83bab712005-08-01 21:58:57 +000038 Browsing With A Horizontally Split Window..........|netrw-o|
Bram Moolenaar9964e462007-05-05 17:54:07 +000039 Browsing With A New Tab............................|netrw-t|
Bram Moolenaar446cb832008-06-24 21:56:24 +000040 Browsing With A Vertically Split Window............|netrw-v|
41 Change Listing Style...............................|netrw-i|
42 Changing To A Bookmarked Directory.................|netrw-gb|
Bram Moolenaar83bab712005-08-01 21:58:57 +000043 Changing To A Predecessor Directory................|netrw-u|
44 Changing To A Successor Directory..................|netrw-U|
Bram Moolenaar83bab712005-08-01 21:58:57 +000045 Customizing Browsing With A User Function..........|netrw-x|
Bram Moolenaar446cb832008-06-24 21:56:24 +000046 Deleting Files Or Directories......................|netrw-D|
47 Directory Exploring Commands.......................|netrw-explore|
48 Exploring With Stars and Patterns..................|netrw-star|
49 Displaying Information About File..................|netrw-qf|
50 Edit File Or Directory Hiding List.................|netrw-ctrl-h|
51 Editing The Sorting Sequence.......................|netrw-S|
52 Going Up...........................................|netrw--|
53 Hiding Files Or Directories........................|netrw-a|
54 Improving Browsing.................................|netrw-ssh-hack|
55 Listing Bookmarks And History......................|netrw-qb|
56 Making A New Directory.............................|netrw-d|
Bram Moolenaar83bab712005-08-01 21:58:57 +000057 Making The Browsing Directory The Current Directory|netrw-c|
Bram Moolenaar446cb832008-06-24 21:56:24 +000058 Marking Files......................................|netrw-mf|
59 Marking Files By Regular Expression................|netrw-mr|
60 Marked Files: Arbitrary Command....................|netrw-mx|
61 Marked Files: Compression And Decompression........|netrw-mz|
62 Marked Files: Copying..............................|netrw-mc|
63 Marked Files: Diff.................................|netrw-md|
64 Marked Files: Editing..............................|netrw-me|
65 Marked Files: Grep.................................|netrw-mg|
66 Marked Files: Hiding and Unhiding by Suffix........|netrw-mh|
67 Marked Files: Moving...............................|netrw-mm|
68 Marked Files: Printing.............................|netrw-mp|
69 Marked Files: Sourcing.............................|netrw-ms|
70 Marked Files: Tagging..............................|netrw-mT|
71 Marked Files: Setting the Target Directory.........|netrw-mt|
72 Marked Files: Unmarking............................|netrw-mu|
73 Netrw Browser Variables............................|netrw-browser-var|
74 Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
75 Netrw Settings.....................................|netrw-settings|
76 Obtaining A File...................................|netrw-O|
77 Preview Window.....................................|netrw-p|
78 Previous Window....................................|netrw-P|
79 Refreshing The Listing.............................|netrw-ctrl-l|
80 Renaming Files Or Directories......................|netrw-move|
81 Reversing Sorting Order............................|netrw-r|
82 Selecting Sorting Style............................|netrw-s|
Bram Moolenaar9964e462007-05-05 17:54:07 +00008310. Problems and Fixes...................................|netrw-problems|
Bram Moolenaar446cb832008-06-24 21:56:24 +00008411. Debugging Netrw Itself...............................|netrw-debug|
Bram Moolenaar9964e462007-05-05 17:54:07 +00008512. History..............................................|netrw-history|
8613. Credits..............................................|netrw-credits|
Bram Moolenaar071d4272004-06-13 20:20:40 +000087
Bram Moolenaar071d4272004-06-13 20:20:40 +000088{Vi does not have any of this}
89
90==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000912. Starting With Netrw *netrw-start* {{{1
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +000092
Bram Moolenaar446cb832008-06-24 21:56:24 +000093Netrw makes reading files, writing files, browsing over a network, and
94browsing locally easy! First, make sure that you have plugins enabled, so
95you'll need to have at least the following in your <.vimrc>:
96(or see |netrw-activate|) >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +000097
Bram Moolenaar9964e462007-05-05 17:54:07 +000098 set nocp " 'compatible' is not set
99 filetype plugin on " plugins are enabled
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000100<
101(see |'cp'| and |:filetype-plugin-on|)
102
103Netrw supports "transparent" editing of files on other machines using urls
104(see |netrw-transparent|). As an example of this, let's assume you have an
Bram Moolenaar446cb832008-06-24 21:56:24 +0000105account on some other machine; if you can use scp, try: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000106
107 vim scp://hostname/path/to/file
108<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000109Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000110
Bram Moolenaar446cb832008-06-24 21:56:24 +0000111So, what if you have ftp, not ssh/scp? That's easy, too; try >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000112
113 vim ftp://hostname/path/to/file
114<
115Want to make ftp simpler to use? See if your ftp supports a file called
116<.netrc> -- typically it goes in your home directory, has read/write
117permissions for only the user to read (ie. not group, world, other, etc),
118and has lines resembling >
119
120 machine HOSTNAME login USERID password "PASSWORD"
121 machine HOSTNAME login USERID password "PASSWORD"
122 ...
Bram Moolenaar9964e462007-05-05 17:54:07 +0000123 default login USERID password "PASSWORD"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000124<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000125Now about browsing -- when you just want to look around before editing a
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000126file. For browsing on your current host, just "edit" a directory: >
127
128 vim .
129 vim /home/userid/path
130<
131For browsing on a remote host, "edit" a directory (but make sure that
132the directory name is followed by a "/"): >
133
134 vim scp://hostname/
135 vim ftp://hostname/path/to/dir/
136<
137See |netrw-browse| for more!
138
Bram Moolenaar446cb832008-06-24 21:56:24 +0000139There are more protocols supported by netrw just than scp and ftp, too: see the
140next section, |netrw-externapp|, for how to use these external applications.
141
142If you want to use plugins, but for some reason don't wish to use netrw, then
143you need to avoid loading both the plugin and the autoload portions of netrw.
144You may do so by placing the following two lines in your <.vimrc>: >
145
146 :let g:loaded_netrw = 1
147 :let g:loaded_netrwPlugin = 1
148<
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000149
150==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00001513. Netrw Reference *netrw-ref* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000152
Bram Moolenaar446cb832008-06-24 21:56:24 +0000153 Netrw supports several protocols in addition to scp and ftp mentioned
154 in |netrw-start|. These include dav, fetch, http,... well, just look
155 at the list in |netrw-externapp|. Each protocol is associated with a
156 variable which holds the default command supporting that protocol.
157
158EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000159
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000160 Protocol Variable Default Value
161 -------- ---------------- -------------
162 dav: *g:netrw_dav_cmd* = "cadaver"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000163 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000164 ftp: *g:netrw_ftp_cmd* = "ftp"
Bram Moolenaar446cb832008-06-24 21:56:24 +0000165 http: *g:netrw_http_cmd* = "curl -o" if curl is available
166 http: g:netrw_http_cmd = "wget -q -O" elseif wget is available
167 http: g:netrw_http_cmd = "fetch -o" elseif fetch is available
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000168 rcp: *g:netrw_rcp_cmd* = "rcp"
169 rsync: *g:netrw_rsync_cmd* = "rsync -a"
170 scp: *g:netrw_scp_cmd* = "scp -q"
171 sftp: *g:netrw_sftp_cmd* = "sftp"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172
Bram Moolenaar446cb832008-06-24 21:56:24 +0000173READING *netrw-read* *netrw-nread* {{{2
174
175 Generally, one may just use the url notation with a normal editing
176 command, such as >
177
178 :e ftp://[user@]machine/path
179<
180 Netrw also provides the Nread command:
181
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182 :Nread ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000183 :Nread "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000184 :Nread "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000185 :Nread "machine id password path" uses ftp
186 :Nread "dav://machine[:port]/path" uses cadaver
187 :Nread "fetch://[user@]machine/path" uses fetch
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000188 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000189 :Nread "http://[user@]machine/path" uses http uses wget
190 :Nread "rcp://[user@]machine/path" uses rcp
191 :Nread "rsync://[user@]machine[:port]/path" uses rsync
192 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
193 :Nread "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000194
Bram Moolenaar446cb832008-06-24 21:56:24 +0000195WRITING *netrw-write* *netrw-nwrite* {{{2
196
197 One may just use the url notation with a normal file writing
198 command, such as >
199
200 :w ftp://[user@]machine/path
201<
202 Netrw also provides the Nwrite command:
203
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000204 :Nwrite ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000205 :Nwrite "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000206 :Nwrite "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000207 :Nwrite "machine id password path" uses ftp
208 :Nwrite "dav://machine[:port]/path" uses cadaver
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000209 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000210 :Nwrite "rcp://[user@]machine/path" uses rcp
211 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
212 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
213 :Nwrite "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000214 http: not supported!
215
Bram Moolenaar446cb832008-06-24 21:56:24 +0000216SOURCING *netrw-source* {{{2
217
218 One may just use the url notation with the normal file sourcing
219 command, such as >
220
221 :so ftp://[user@]machine/path
222<
223 Netrw also provides the Nsource command:
224
Bram Moolenaar9964e462007-05-05 17:54:07 +0000225 :Nsource ? give help
226 :Nsource "dav://machine[:port]/path" uses cadaver
227 :Nsource "fetch://[user@]machine/path" uses fetch
228 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
229 :Nsource "http://[user@]machine/path" uses http uses wget
230 :Nsource "rcp://[user@]machine/path" uses rcp
231 :Nsource "rsync://[user@]machine[:port]/path" uses rsync
232 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp
233 :Nsource "sftp://[user@]machine/path" uses sftp
234
Bram Moolenaar446cb832008-06-24 21:56:24 +0000235DIRECTORY LISTING *netrw-dirlist* {{{2
236
237 One may browse a directory to get a listing by simply attempting to
238 edit the directory: >
239
240 :e scp://[user]@hostname/path/
241 :e ftp://[user]@hostname/path/
242<
243 For remote directories (ie. those using scp or ftp), that trailing
244 "/" is necessary (it tells netrw that its to treat it as a directory
245 to browse instead of a file to download).
246
247 However, the Nread command can also be used to accomplish this:
248
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000249 :Nread [protocol]://[user]@hostname/path/
250
Bram Moolenaar446cb832008-06-24 21:56:24 +0000251 *netrw-login* *netrw-password*
252CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000253
Bram Moolenaar071d4272004-06-13 20:20:40 +0000254 Attempts to use ftp will prompt you for a user-id and a password.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000255 These will be saved in global variables g:netrw_uid and
Bram Moolenaar446cb832008-06-24 21:56:24 +0000256 s:netrw_passwd; subsequent uses of ftp will re-use those two items to
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000257 simplify the further use of ftp. However, if you need to use a
258 different user id and/or password, you'll want to call NetUserPass()
259 first. To work around the need to enter passwords, check if your ftp
260 supports a <.netrc> file in your home directory. Also see
261 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how
Bram Moolenaar446cb832008-06-24 21:56:24 +0000262 to not need to use passwords, look at |netrw-ssh-hack|).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000263
264 :NetUserPass [uid [password]] -- prompts as needed
265 :call NetUserPass() -- prompts for uid and password
266 :call NetUserPass("uid") -- prompts for password
267 :call NetUserPass("uid","password") -- sets global uid and password
268
Bram Moolenaar446cb832008-06-24 21:56:24 +0000269NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
270(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-var|)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000271
Bram Moolenaar446cb832008-06-24 21:56:24 +0000272Netrw provides a lot of variables which allow you to customize netrw to your
273preferences. One way to look at them is via the command :NetrwSettings (see
274|netrw-settings|) which will display your current netrw settings. Most such
275settings are described below, in |netrw-browser-options|, and in
276|netrw-externapp|:
Bram Moolenaar9964e462007-05-05 17:54:07 +0000277
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000278 *b:netrw_lastfile* last file Network-read/written retained on a per-buffer
279 basis (supports plain :Nw )
Bram Moolenaar071d4272004-06-13 20:20:40 +0000280
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000281 *g:netrw_ftp* if it doesn't exist, use default ftp
282 =0 use default ftp (uid password)
283 =1 use alternate ftp method (user uid password)
284 If you're having trouble with ftp, try changing the
285 value of this variable to see if the alternate ftp
286 method works for your setup.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000287
Bram Moolenaar9964e462007-05-05 17:54:07 +0000288 *g:netrw_extracmd* default: doesn't exist
289 If this variable exists, then any string it contains
290 will be placed into the commands set to your ftp
291 client. As an example:
292 ="passive"
293
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000294 *g:netrw_ftpmode* ="binary" (default)
295 ="ascii"
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000296
Bram Moolenaar9964e462007-05-05 17:54:07 +0000297 *g:netrw_ignorenetrc* =0 (default for linux, cygwin)
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000298 =1 If you have a <.netrc> file but it doesn't work and
Bram Moolenaar446cb832008-06-24 21:56:24 +0000299 you want it ignored, then set this variable as
300 shown. (default for Windows + cmd.exe)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000301
302 *g:netrw_menu* =0 disable netrw's menu
303 =1 (default) netrw's menu enabled
304
305 *g:netrw_nogx* if this variable exists, then the "gx" map will not
306 be available (see |netrw-gx|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000307
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000308 *g:netrw_uid* (ftp) user-id, retained on a per-session basis
Bram Moolenaar446cb832008-06-24 21:56:24 +0000309 *s:netrw_passwd* (ftp) password, retained on a per-session basis
310
311 *g:netrw_preview* =0 (default) preview window shown in a horizontally
312 split window
313 =1 preview window shown in a vertically split window.
314 Also affects the "previous window" (see |netrw-P|) in
315 the same way.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000316
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000317 *g:netrw_scpport* = "-P" : option to use to set port for scp
318 *g:netrw_sshport* = "-p" : option to use to set port for ssh
319
Bram Moolenaar446cb832008-06-24 21:56:24 +0000320 *g:netrw_silent* =0 : transfers done normally
321 =1 : transfers done silently
322
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000323 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
324 line window. This window provides reliable
325 delivery of messages. (default)
326 =0 : messages from netrw will use echoerr ;
327 messages don't always seem to show up this
328 way, but one doesn't have to quit the window.
329
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000330 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
331 lines that o/s's ftp "provides" on transfers
332 =0 force normal ftp behavior (no trailing line removal)
333
334 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
335 permits network browsing to use ls with time and
336 size sorting (default if windows)
337 =0 assume Windows' scp accepts windows-style paths
338 Network browsing uses dir instead of ls
339 This option is ignored if you're using unix
340
341 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
Bram Moolenaar9964e462007-05-05 17:54:07 +0000342 =1 use WinNT's rcp in binary mode (default)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000343
Bram Moolenaar446cb832008-06-24 21:56:24 +0000344PATHS *netrw-path* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000345
346Paths to files are generally user-directory relative for most protocols.
347It is possible that some protocol will make paths relative to some
348associated directory, however.
349>
350 example: vim scp://user@host/somefile
351 example: vim scp://user@host/subdir1/subdir2/somefile
352<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000353where "somefile" is in the "user"'s home directory. If you wish to get a
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000354file using root-relative paths, use the full path:
355>
356 example: vim scp://user@host//somefile
357 example: vim scp://user@host//subdir1/subdir2/somefile
358<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000359
360==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00003614. Network-Oriented File Transfer *netrw-xfer* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000362
363Network-oriented file transfer under Vim is implemented by a VimL-based script
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000364(<netrw.vim>) using plugin techniques. It currently supports both reading and
365writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000366dav/cadaver, rsync, or sftp.
367
368http is currently supported read-only via use of wget or fetch.
369
370<netrw.vim> is a standard plugin which acts as glue between Vim and the
371various file transfer programs. It uses autocommand events (BufReadCmd,
372FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
373
374 ex. vim ftp://hostname/path/to/file
375<
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000376The characters preceding the colon specify the protocol to use; in the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000377example, it's ftp. The <netrw.vim> script then formulates a command or a
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000378series of commands (typically ftp) which it issues to an external program
379(ftp, scp, etc) which does the actual file transfer/protocol. Files are read
380from/written to a temporary file (under Unix/Linux, /tmp/...) which the
381<netrw.vim> script will clean up.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000382
Bram Moolenaar9964e462007-05-05 17:54:07 +0000383 *netrw-putty* *netrw-pscp* *netrw-psftp*
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000384One may modify any protocol's implementing external application by setting a
385variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000386"scp -q"). As an example, consider using PuTTY: >
Bram Moolenaar9964e462007-05-05 17:54:07 +0000387
388 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch'
389 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000390<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000391See |netrw-p8| for more about putty, pscp, psftp, etc.
392
Bram Moolenaar071d4272004-06-13 20:20:40 +0000393Ftp, an old protocol, seems to be blessed by numerous implementations.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000394Unfortunately, some implementations are noisy (ie., add junk to the end of the
395file). Thus, concerned users may decide to write a NetReadFixup() function
396that will clean up after reading with their ftp. Some Unix systems (ie.,
397FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
398not noisy and more convenient, actually, for <netrw.vim> to use.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000399Consequently, if "fetch" is executable, it will be used to do reads for
400ftp://... (and http://...) . See |netrw-var| for more about this.
401
402For rcp, scp, sftp, and http, one may use network-oriented file transfers
Bram Moolenaar83bab712005-08-01 21:58:57 +0000403transparently; ie.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000404>
405 vim rcp://[user@]machine/path
406 vim scp://[user@]machine/path
407<
408If your ftp supports <.netrc>, then it too can be just as transparently used
409if the needed triad of machine name, user id, and password are present in
410that file. Your ftp must be able to use the <.netrc> file on its own, however.
411>
412 vim ftp://[user@]machine[[:#]portnumber]/path
413<
414However, ftp will often need to query the user for the userid and password.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000415The latter will be done "silently"; ie. asterisks will show up instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000416the actually-typed-in password. Netrw will retain the userid and password
417for subsequent read/writes from the most recent transfer so subsequent
418transfers (read/write) to or from that machine will take place without
419additional prompting.
420
421 *netrw-urls*
422 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000423 | Reading | Writing | Uses |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000425 | DAV: | | |
426 | dav://host/path | | cadaver |
427 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000428 +---------------------------------+----------------------------+------------+
Bram Moolenaar446cb832008-06-24 21:56:24 +0000429 | DAV + SSL: | | |
430 | davs://host/path | | cadaver |
431 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver |
432 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000433 | FETCH: | | |
434 | fetch://[user@]host/path | | |
435 | fetch://[user@]host:http/path | Not Available | fetch |
436 | :Nread fetch://[user@]host/path| | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000437 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000438 | FILE: | | |
439 | file:///* | file:///* | |
440 | file://localhost/* | file://localhost/* | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000441 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000442 | FTP: (*3) | (*3) | |
443 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
444 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
445 | :Nread host path | :Nwrite host path | ftp+.netrc |
446 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000447 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000448 | HTTP: wget is executable: (*4) | | |
449 | http://[user@]host/path | Not Available | wget |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000450 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000451 | HTTP: fetch is executable (*4) | | |
452 | http://[user@]host/path | Not Available | fetch |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000453 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000454 | RCP: | | |
455 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000456 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000457 | RSYNC: | | |
458 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
459 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
460 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000461 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000462 | SCP: | | |
463 | scp://[user@]host/path | scp://[user@]host/path | scp |
464 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000465 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000466 | SFTP: | | |
467 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
468 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000469 +=================================+============================+============+
470
471 (*1) For an absolute path use scp://machine//path.
472
473 (*2) if <.netrc> is present, it is assumed that it will
474 work with your ftp client. Otherwise the script will
Bram Moolenaar9964e462007-05-05 17:54:07 +0000475 prompt for user-id and password.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000476
Bram Moolenaar9964e462007-05-05 17:54:07 +0000477 (*3) for ftp, "machine" may be machine#port or machine:port
Bram Moolenaar071d4272004-06-13 20:20:40 +0000478 if a different port is needed than the standard ftp port
479
480 (*4) for http:..., if wget is available it will be used. Otherwise,
481 if fetch is available it will be used.
482
483Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
484
485
486NETRC *netrw-netrc*
487
Bram Moolenaar446cb832008-06-24 21:56:24 +0000488The <.netrc> file, typically located in your home directory, contains lines
489therein which map a hostname (machine name) to the user id and password you
490prefer to use with it.
491
Bram Moolenaar071d4272004-06-13 20:20:40 +0000492The typical syntax for lines in a <.netrc> file is given as shown below.
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000493Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000494>
495 machine {full machine name} login {user-id} password "{password}"
496 default login {user-id} password "{password}"
497
498Your ftp client must handle the use of <.netrc> on its own, but if the
499<.netrc> file exists, an ftp transfer will not ask for the user-id or
500password.
501
502 Note:
503 Since this file contains passwords, make very sure nobody else can
504 read this file! Most programs will refuse to use a .netrc that is
505 readable for others. Don't forget that the system administrator can
Bram Moolenaar446cb832008-06-24 21:56:24 +0000506 still read the file! Ie. for Linux/Unix: chmod 600 .netrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000507
508
509PASSWORD *netrw-passwd*
510
511The script attempts to get passwords for ftp invisibly using |inputsecret()|,
512a built-in Vim function. See |netrw-uidpass| for how to change the password
513after one has set it.
514
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000515Unfortunately there doesn't appear to be a way for netrw to feed a password to
516scp. Thus every transfer via scp will require re-entry of the password.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000517However, |netrw-ssh-hack| can help with this problem.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000518
519
520==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00005215. Activation *netrw-activate* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000522
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000523Network-oriented file transfers are available by default whenever Vim's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000524|'nocompatible'| mode is enabled. Netrw's script files reside in your
525system's plugin, autoload, and syntax directories; just the
526plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
527vim. The main script in autoload/netrw.vim is only loaded when you actually
528use netrw. I suggest that, at a minimum, you have at least the following in
529your <.vimrc> customization file: >
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000530
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000531 set nocp
532 if version >= 600
533 filetype plugin indent on
534 endif
535<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000536
537==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00005386. Transparent File Editing *netrw-transparent* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000539
540Transparent file transfers occur whenever a regular file read or write
Bram Moolenaar446cb832008-06-24 21:56:24 +0000541(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
542events) is made. Thus one may read, write, or source files across networks
543just as easily as if they were local files! >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000544
545 vim ftp://[user@]machine/path
546 ...
547 :wq
548
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000549See |netrw-activate| for more on how to encourage your vim to use plugins
550such as netrw.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000551
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000552
Bram Moolenaar071d4272004-06-13 20:20:40 +0000553==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00005547. Ex Commands *netrw-ex* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000555
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000556The usual read/write commands are supported. There are also a few
Bram Moolenaar446cb832008-06-24 21:56:24 +0000557additional commands available. Often you won't need to use Nwrite or
Bram Moolenaar9964e462007-05-05 17:54:07 +0000558Nread as shown in |netrw-transparent| (ie. simply use >
559 :e url
560 :r url
561 :w url
562instead, as appropriate) -- see |netrw-urls|. In the explanations
563below, a {netfile} is an url to a remote file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000564
Bram Moolenaar446cb832008-06-24 21:56:24 +0000565:[range]Nw[rite] Write the specified lines to the current
Bram Moolenaar071d4272004-06-13 20:20:40 +0000566 file as specified in b:netrw_lastfile.
567
Bram Moolenaar446cb832008-06-24 21:56:24 +0000568:[range]Nw[rite] {netfile} [{netfile}]...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000569 Write the specified lines to the {netfile}.
570
Bram Moolenaar446cb832008-06-24 21:56:24 +0000571:Nr[ead] Read the specified lines into the current
Bram Moolenaar071d4272004-06-13 20:20:40 +0000572 buffer from the file specified in
573 b:netrw_lastfile.
574
Bram Moolenaar446cb832008-06-24 21:56:24 +0000575:Nr[ead] {netfile} {netfile}...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000576 Read the {netfile} after the current line.
577
Bram Moolenaar446cb832008-06-24 21:56:24 +0000578:Ns[ource] {netfile}
Bram Moolenaar9964e462007-05-05 17:54:07 +0000579 Source the {netfile}.
580 To start up vim using a remote .vimrc, one may use
581 the following (all on one line) (tnx to Antoine Mechelynck) >
582 vim -u NORC -N
583 --cmd "runtime plugin/netrwPlugin.vim"
584 --cmd "source scp://HOSTNAME/.vimrc"
585< *netrw-uidpass*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000586:call NetUserPass()
Bram Moolenaar446cb832008-06-24 21:56:24 +0000587 If g:netrw_uid and s:netrw_passwd don't exist,
588 this function will query the user for them.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000589
590:call NetUserPass("userid")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000591 This call will set the g:netrw_uid and, if
Bram Moolenaar071d4272004-06-13 20:20:40 +0000592 the password doesn't exist, will query the user for it.
593
594:call NetUserPass("userid","passwd")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000595 This call will set both the g:netrw_uid and s:netrw_passwd.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000596 The user-id and password are used by ftp transfers. One may
Bram Moolenaar446cb832008-06-24 21:56:24 +0000597 effectively remove the user-id and password by using empty
598 strings (ie. "").
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599
Bram Moolenaar9964e462007-05-05 17:54:07 +0000600:NetrwSettings This command is described in |netrw-settings| -- used to
601 display netrw settings and change netrw behavior.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000602
Bram Moolenaar071d4272004-06-13 20:20:40 +0000603
604==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00006058. Variables and Options *netrw-options* *netrw-var* {{{1
606
607(if you're interested in the netrw browser settings, see: |netrw-browser-var|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000608
Bram Moolenaar9964e462007-05-05 17:54:07 +0000609The <netrw.vim> script provides several variables which act as options to
Bram Moolenaar446cb832008-06-24 21:56:24 +0000610affect <netrw.vim>'s file transfer behavior. These variables typically may be
611set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
612
613>
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000614
Bram Moolenaar9964e462007-05-05 17:54:07 +0000615 -------------
616 Netrw Options
617 -------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000618 Option Meaning
619 -------------- -----------------------------------------------
620<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000621 b:netrw_col Holds current cursor position (during NetWrite)
622 g:netrw_cygwin =1 assume scp under windows is from cygwin
623 (default/windows)
624 =0 assume scp under windows accepts windows
625 style paths (default/else)
626 g:netrw_ftp =0 use default ftp (uid password)
627 g:netrw_ftpmode ="binary" (default)
628 ="ascii" (your choice)
629 g:netrw_ignorenetrc =1 (default)
630 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000631 want it used, then set this variable. Its
632 mere existence is enough to cause <.netrc>
633 to be ignored.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000634 b:netrw_lastfile Holds latest method/machine/path.
635 b:netrw_line Holds current line number (during NetWrite)
636 g:netrw_passwd Holds current password for ftp.
637 g:netrw_silent =0 transfers done normally
638 =1 transfers done silently
639 g:netrw_uid Holds current user-id for ftp.
640 =1 use alternate ftp (user uid password)
641 (see |netrw-options|)
642 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
643 =1 use WinNT/2K/XP's rcp, binary mode
644 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
645 =1 use default method to do ftp >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000646 -----------------------------------------------------------------------
647<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000648The script will also make use of the following variables internally, albeit
649temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000650>
651 -------------------
652 Temporary Variables
653 -------------------
654 Variable Meaning
655 -------- ------------------------------------
656<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000657 g:netrw_method Index indicating rcp/ftp+.netrc/ftp
658 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000659 g:netrw_fname Holds filename being accessed >
660 ------------------------------------------------------------
661<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000662 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000663
664Netrw supports a number of protocols. These protocols are invoked using the
665variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000666>
667 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000668 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000669 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000670 Option Type Setting Meaning
671 --------- -------- -------------- ---------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000672<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000673 netrw_ftp variable =doesn't exist userid set by "user userid"
674 =0 userid set by "user userid"
675 =1 userid set by "userid"
676 NetReadFixup function =doesn't exist no change
677 =exists Allows user to have files
678 read via ftp automatically
679 transformed however they wish
680 by NetReadFixup()
Bram Moolenaar071d4272004-06-13 20:20:40 +0000681 g:netrw_dav_cmd variable ="cadaver"
Bram Moolenaar9964e462007-05-05 17:54:07 +0000682 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
Bram Moolenaar071d4272004-06-13 20:20:40 +0000683 g:netrw_ftp_cmd variable ="ftp"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000684 g:netrw_http_cmd variable ="fetch -o" if fetch is available
685 g:netrw_http_cmd variable ="wget -O" else if wget is available
Bram Moolenaar9964e462007-05-05 17:54:07 +0000686 g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000687 g:netrw_rcp_cmd variable ="rcp"
688 g:netrw_rsync_cmd variable ="rsync -a"
689 g:netrw_scp_cmd variable ="scp -q"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000690 g:netrw_sftp_cmd variable ="sftp" >
691 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000692<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000693 *netrw-ftp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000694
Bram Moolenaar9964e462007-05-05 17:54:07 +0000695The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|)
696specify the external program to use handle the ftp protocol. They may
697include command line options (such as -p for passive mode).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000698
Bram Moolenaar9964e462007-05-05 17:54:07 +0000699Browsing is supported by using the |g:netrw_list_cmd|; the substring
700"HOSTNAME" will be changed via substitution with whatever the current request
701is for a hostname.
702
703Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's
704that give trouble . In order to best understand how to use these options if
705ftp is giving you troubles, a bit of discussion is provided on how netrw does
706ftp reads.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000707
708For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000709temporary file:
710>
711 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
712 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000713<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000714 open machine [port] open machine [port]
715 user userid password userid password
716 [g:netrw_ftpmode] password
717 [g:netrw_extracmd] [g:netrw_ftpmode]
718 get filename tempfile [g:netrw_extracmd]
719 get filename tempfile >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000720 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000721<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000722The |g:netrw_ftpmode| and |g:netrw_extracmd| are optional.
723
Bram Moolenaar071d4272004-06-13 20:20:40 +0000724Netrw then executes the lines above by use of a filter:
725>
726 :%! {g:netrw_ftp_cmd} -i [-n]
727<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000728where
729 g:netrw_ftp_cmd is usually "ftp",
730 -i tells ftp not to be interactive
731 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
732
733If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000734userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000735The temporary file is then read into the main editing session window that
736requested it and the temporary file deleted.
737
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000738If your ftp doesn't accept the "user" command and immediately just demands a
739userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000740
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000741 *netrw-cadaver*
742To handle the SSL certificate dialog for untrusted servers, one may pull
743down the certificate and place it into /usr/ssl/cert.pem. This operation
744renders the server treatment as "trusted".
745
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000746 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000747If your ftp for whatever reason generates unwanted lines (such as AUTH
748messages) you may write a NetReadFixup(tmpfile) function:
749>
750 function! NetReadFixup(method,line1,line2)
751 " a:line1: first new line in current file
752 " a:line2: last new line in current file
753 if a:method == 1 "rcp
754 elseif a:method == 2 "ftp + <.netrc>
755 elseif a:method == 3 "ftp + machine,uid,password,filename
756 elseif a:method == 4 "scp
757 elseif a:method == 5 "http/wget
758 elseif a:method == 6 "dav/cadaver
759 elseif a:method == 7 "rsync
760 elseif a:method == 8 "fetch
761 elseif a:method == 9 "sftp
Bram Moolenaar9964e462007-05-05 17:54:07 +0000762 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000763 endif
764 endfunction
765>
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000766The NetReadFixup() function will be called if it exists and thus allows you to
767customize your reading process. As a further example, <netrw.vim> contains
768just such a function to handle Windows 95 ftp. For whatever reason, Windows
76995's ftp dumps four blank lines at the end of a transfer, and so it is
770desirable to automate their removal. Here's some code taken from <netrw.vim>
771itself:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000772>
773 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000774 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000775 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000776 let fourblanklines= line2 - 3
777 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000778 endif
779 endfunction
780 endif
781>
782
783==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00007849. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1
785 *netrw-browser* *netrw-dir* *netrw-list*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000786
Bram Moolenaar446cb832008-06-24 21:56:24 +0000787INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2
788 (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000789
Bram Moolenaar446cb832008-06-24 21:56:24 +0000790Netrw supports the browsing of directories on your local system and on remote
791hosts; browsing includes listing files and directories, entering directories,
792editing files therein, deleting files/directories, making new directories,
793moving (renaming) files and directories, copying files and directories, etc.
794One may mark files and execute any system command on them! The Netrw browser
795generally implements the previous explorer's maps and commands for remote
796directories, although details (such as pertinent global variable names)
797necessarily differ. To browse a directory, simply "edit" it! >
Bram Moolenaar269ec652004-07-29 08:43:53 +0000798
Bram Moolenaar446cb832008-06-24 21:56:24 +0000799 vim /your/directory/
800 vim .
801 vim c:\your\directory\
802<
803(Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t|
804 |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| )
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000805
806The Netrw remote file and directory browser handles two protocols: ssh and
Bram Moolenaar446cb832008-06-24 21:56:24 +0000807ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp
808in its remote browsing. Specifying any other protocol will cause it to be
809used for file transfers; but the ssh protocol will be used to do remote
810browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000811
Bram Moolenaar446cb832008-06-24 21:56:24 +0000812To use Netrw's remote directory browser, simply attempt to read a "file" with
813a trailing slash and it will be interpreted as a request to list a directory:
814>
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000815 vim [protocol]://[user@]hostname/path/
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000816<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000817where [protocol] is typically scp or ftp. As an example, try: >
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000818
Bram Moolenaar446cb832008-06-24 21:56:24 +0000819 vim ftp://ftp.home.vim.org/pub/vim/
820<
821For local directories, the trailing slash is not required. Again, because its
822easy to miss: to browse remote directories, the url must terminate with a
823slash!
Bram Moolenaar83bab712005-08-01 21:58:57 +0000824
Bram Moolenaar446cb832008-06-24 21:56:24 +0000825If you'd like to avoid entering the password repeatedly for remote directory
826listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with
827ftp, see |netrw-netrc| (if your ftp supports it).
Bram Moolenaar83bab712005-08-01 21:58:57 +0000828
Bram Moolenaar446cb832008-06-24 21:56:24 +0000829There are several things you can do to affect the browser's display of files:
Bram Moolenaar83bab712005-08-01 21:58:57 +0000830
Bram Moolenaar446cb832008-06-24 21:56:24 +0000831 * To change the listing style, press the "i" key (|netrw-i|).
832 Currently there are four styles: thin, long, wide, and tree.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000833
Bram Moolenaar446cb832008-06-24 21:56:24 +0000834 * To hide files (don't want to see those xyz~ files anymore?) see
835 |netrw-ctrl-h|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000836
Bram Moolenaar446cb832008-06-24 21:56:24 +0000837 * Press s to sort files by name, time, or size.
838
839See |netrw-browse-cmds| for all the things you can do with netrw!
840
841
842QUICK HELP *netrw-quickhelp* {{{2
843 (Use ctrl-] to select a topic)~
844 Intro to Browsing...............................|netrw-intro-browse|
845 Quick Reference: Maps.........................|netrw-quickmap|
846 Quick Reference: Commands.....................|netrw-browse-cmds|
847 Hiding
848 Edit hiding list..............................|netrw-ctrl-h|
849 Hiding Files or Directories...................|netrw-a|
850 Hiding/Unhiding by suffix.....................|netrw-mh|
851 Hiding dot-files.............................|netrw-gh|
852 Listing Style
853 Select listing style (thin/long/wide/tree)....|netrw-i|
854 Associated setting variable...................|g:netrw_liststyle|
855 Shell command used to perform listing.........|g:netrw_list_cmd|
856 Quick file info...............................|netrw-qf|
857 Sorted by
858 Select sorting style (name/time/size).........|netrw-s|
859 Editing the sorting sequence..................|netrw-S|
Bram Moolenaarc236c162008-07-13 17:41:49 +0000860 Sorting options...............................|g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +0000861 Associated setting variable...................|g:netrw_sort_sequence|
862 Reverse sorting order.........................|netrw-r|
863
864
865 *netrw-quickmap* *netrw-quickmaps*
866QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000867>
Bram Moolenaar446cb832008-06-24 21:56:24 +0000868 --- ----------------- ----
869 Map Quick Explanation Link
870 --- ----------------- ----
871< <F1> Causes Netrw to issue help
872 <cr> Netrw will enter the directory or read the file |netrw-cr|
873 <del> Netrw will attempt to remove the file/directory |netrw-del|
874 - Makes Netrw go up one directory |netrw--|
875 a Toggles between normal display, |netrw-a|
876 hiding (suppress display of files matching g:netrw_list_hide)
877 showing (display only files which match g:netrw_list_hide)
878 c Make browsing directory the current directory |netrw-c|
879 d Make a directory |netrw-d|
880 D Attempt to remove the file(s)/directory(ies) |netrw-D|
881 gb Go to previous bookmarked directory |netrw-gb|
882 gh Quick hide/unhide of dot-files |netrw-gh|
883 gi Display information on file |netrw-qf|
884 <c-h> Edit file hiding list |netrw-ctrl-h|
885 i Cycle between thin, long, wide, and tree listings |netrw-i|
886 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
887 mb Bookmark current directory |netrw-mb|
888 mc Copy marked files to marked-file target directory |netrw-mc|
889 md Apply diff to marked files (up to 3) |netrw-md|
890 me Place marked files on arg list and edit them |netrw-me|
891 mf Mark a file |netrw-mf|
892 mh Toggle marked file suffices' presence on hiding list |netrw-mh|
893 mm Move marked files to marked-file target directory |netrw-mm|
894 mp Print marked files |netrw-mp|
895 mr Mark files satisfying a |regexp| |netrw-mr|
896 mt Current browsing directory becomes markfile target |netrw-mt|
897 mT Apply ctags to marked files |netrw-mT|
898 mu Unmark all marked files |netrw-mu|
899 mx Apply arbitrary shell command to marked files |netrw-mx|
900 mz Compress/decompress marked files |netrw-mz|
901 o Enter the file/directory under the cursor in a new |netrw-o|
902 browser window. A horizontal split is used.
903 O Obtain a file specified by cursor |netrw-O|
904 p Preview the file |netrw-p|
905 P Browse in the previously used window |netrw-P|
906 q List bookmarked directories and history |netrw-qb|
907 r Reverse sorting order |netrw-r|
908 R Rename the designed file(s)/directory(ies) |netrw-R|
909 s Select sorting style: by name, time, or file size |netrw-s|
910 S Specify suffix priority for name-sorting |netrw-S|
911 t Enter the file/directory under the cursor in a new tab|netrw-t|
912 u Change to recently-visited directory |netrw-u|
913 U Change to subsequently-visited directory |netrw-U|
914 v Enter the file/directory under the cursor in a new |netrw-v|
915 browser window. A vertical split is used.
916 x View file with an associated program |netrw-x|
917
Bram Moolenaarc236c162008-07-13 17:41:49 +0000918 % Open a new file in netrw's current directory |netrw-%|
919
Bram Moolenaar446cb832008-06-24 21:56:24 +0000920 <leftmouse> (gvim only) selects word under mouse as if a <cr>
921 had been pressed (ie. edit file, change directory)
922 <middlemouse> (gvim only) same as P selecting word under mouse;
923 see |netrw-P|
924 <rightmouse> (gvim only) delete file/directory using word under
925 mouse
926 <2-leftmouse> (gvim only) when:
927 * in a netrw-selected file, AND
928 * |g:netrw_retmap| == 1 AND
929 * the user doesn't already have a <2-leftmouse> mapping
930 defined before netrw is autoloaded,
931 then a double clicked leftmouse button will return
932 to the netrw browser window.
933 <s-leftmouse> (gvim only) like mf, will mark files
934
935 *netrw-quickcom* *netrw-quickcoms*
936QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
937 :NetrwClean[!] ...........................................|netrw-clean|
938 :NetrwSettings ...........................................|netrw-settings|
939 :Explore[!] [dir] Explore directory of current file......|netrw-explore|
940 :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
941 :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
942 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
943 :Rexplore Return to Explorer.....................|netrw-explore|
944 :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore|
945 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
946 :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
947
948BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
949One may easily "bookmark" a directory by using >
950
951 {cnt}mb
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000952<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000953Any count may be used. One may use viminfo's "!" option (|'viminfo'|) to
954retain bookmarks between vim sessions. See |netrw-gb| for how to return
955to a bookmark and |netrw-qb| for how to list them.
Bram Moolenaar4a85b412006-04-23 22:40:29 +0000956
957
Bram Moolenaar446cb832008-06-24 21:56:24 +0000958BROWSING *netrw-cr* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000959
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000960Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +0000961Hitting the <cr> (the return key) will select the file or directory.
962Directories will themselves be listed, and files will be opened using the
Bram Moolenaar9964e462007-05-05 17:54:07 +0000963protocol given in the original read request.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000964
Bram Moolenaar446cb832008-06-24 21:56:24 +0000965 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that
966 two or more spaces delimit filenames and directory names for the long and
967 wide listing formats. Thus, if your filename or directory name has two or
968 more sequential spaces embedded in it, or any trailing spaces, then you'll
969 need to use the "thin" format to select it.
Bram Moolenaar843ee412004-06-30 16:16:41 +0000970
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000971The |g:netrw_browse_split| option, which is zero by default, may be used to
Bram Moolenaar446cb832008-06-24 21:56:24 +0000972cause the opening of files to be done in a new window or tab instead of the
973default. When the option is one or two, the splitting will be taken
974horizontally or vertically, respectively. When the option is set to three, a
975<cr> will cause the file to appear in a new tab.
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000976
Bram Moolenaar83bab712005-08-01 21:58:57 +0000977
Bram Moolenaar446cb832008-06-24 21:56:24 +0000978When using the gui (gvim) one may select a file by pressing the <leftmouse>
979button. In addtion, if
Bram Moolenaar578b49e2005-09-10 19:22:57 +0000980
Bram Moolenaar446cb832008-06-24 21:56:24 +0000981 *|g:netrw_retmap| == 1 AND (its default value is 0)
982 * in a netrw-selected file, AND
983 * the user doesn't already have a <2-leftmouse> mapping defined before
984 netrw is loaded
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000985
Bram Moolenaar446cb832008-06-24 21:56:24 +0000986then a doubly-clicked leftmouse button will return to the netrw browser
987window.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000988
Bram Moolenaar446cb832008-06-24 21:56:24 +0000989Netrw attempts to speed up browsing, especially for remote browsing where one
990may have to enter passwords, by keeping and re-using previously obtained
991directory listing buffers. The |g:netrw_fastbrowse| variable is used to
992control this behavior; one may have slow browsing (no buffer re-use), medium
993speed browsing (re-use directory buffer listings only for remote directories),
994and fast browsing (re-use directory buffer listings as often as possible).
995The price for such re-use is that when changes are made (such as new files
996are introduced into a directory), the listing may become out-of-date. One may
997always refresh directory listing buffers by pressing ctrl-L (see
998|netrw-ctrl-l|).
Bram Moolenaar578b49e2005-09-10 19:22:57 +0000999
1000
Bram Moolenaar446cb832008-06-24 21:56:24 +00001001Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
1002Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse|
1003 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1004 |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd|
1005 |g:netrw_ssh_browse_reject| |g:netrw_use_noswf|
1006
1007
1008BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2
1009
1010Normally one enters a file or directory using the <cr>. However, the "o" map
1011allows one to open a new window to hold the new directory listing or file. A
1012horizontal split is used. (for vertical splitting, see |netrw-v|)
1013
1014Normally, the o key splits the window horizontally with the new window and
1015cursor at the top. To change to splitting the window horizontally with the
1016new window and cursor at the bottom, have
1017
1018 let g:netrw_alto = 1
1019
1020in your <.vimrc>. (also see |netrw-t| |netrw-v|)
1021
1022There is only one tree listing buffer; using "o" on a displayed subdirectory
1023will split the screen, but the same buffer will be shown twice.
1024
1025Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
1026
1027
1028BROWSING WITH A NEW TAB *netrw-t* {{{2
1029
1030Normally one enters a file or directory using the <cr>. The "t" map
1031allows one to open a new window hold the new directory listing or file in a
1032new tab. (also see: |netrw-o| |netrw-v|)
1033
1034
1035BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2
1036
1037Normally one enters a file or directory using the <cr>. However, the "v" map
1038allows one to open a new window to hold the new directory listing or file. A
1039vertical split is used. (for horizontal splitting, see |netrw-o|)
1040
1041Normally, the v key splits the window vertically with the new window and
1042cursor at the left. To change to splitting the window vertically with the new
1043window and cursor at the right, have
1044
1045 let g:netrw_altv = 1
1046
1047in your <.vimrc>. (also see: |netrw-o| |netrw-t|)
1048
1049There is only one tree listing buffer; using "v" on a displayed subdirectory
1050will split the screen, but the same buffer will be shown twice.
1051
1052Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
1053
1054CHANGE LISTING STYLE *netrw-i* {{{2
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001055
Bram Moolenaar9964e462007-05-05 17:54:07 +00001056The "i" map cycles between the thin, long, wide, and tree listing formats.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001057
Bram Moolenaar8299df92004-07-10 09:47:34 +00001058The short listing format gives just the files' and directories' names.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001059
Bram Moolenaar8299df92004-07-10 09:47:34 +00001060The long listing is either based on the "ls" command via ssh for remote
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001061directories or displays the filename, file size (in bytes), and the time and
1062date of last modification for local directories. With the long listing
1063format, netrw is not able to recognize filenames which have trailing spaces.
1064Use the thin listing format for such files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001065
Bram Moolenaar9964e462007-05-05 17:54:07 +00001066The wide listing format uses two or more contiguous spaces to delineate
1067filenames; when using that format, netrw won't be able to recognize or use
1068filenames which have two or more contiguous spaces embedded in the name or any
1069trailing spaces. The thin listing format will, however, work with such files.
1070This listing format is the most compact.
1071
1072The tree listing format has a top directory followed by files and directories
1073preceded by a "|". One may open and close directories by pressing the <cr>
1074key while atop the directory name. There is only one tree listing buffer;
1075hence, using "v" or "o" on a subdirectory will only show the same buffer,
1076twice.
Bram Moolenaar8299df92004-07-10 09:47:34 +00001077
Bram Moolenaar446cb832008-06-24 21:56:24 +00001078Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
1079 |g:netrw_timefmt| |g:netrw_list_cmd|
Bram Moolenaar8299df92004-07-10 09:47:34 +00001080
Bram Moolenaar83bab712005-08-01 21:58:57 +00001081
Bram Moolenaar446cb832008-06-24 21:56:24 +00001082CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2
Bram Moolenaar843ee412004-06-30 16:16:41 +00001083
Bram Moolenaar446cb832008-06-24 21:56:24 +00001084To change directory back to a bookmarked directory, use
Bram Moolenaar843ee412004-06-30 16:16:41 +00001085
Bram Moolenaar446cb832008-06-24 21:56:24 +00001086 {cnt}gb
Bram Moolenaar843ee412004-06-30 16:16:41 +00001087
Bram Moolenaar446cb832008-06-24 21:56:24 +00001088Any count may be used to reference any of the bookmarks. See |netrw-mb| on
1089how to bookmark a directory and |netrw-qb| on how to list bookmarks.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001090
Bram Moolenaar843ee412004-06-30 16:16:41 +00001091
Bram Moolenaar446cb832008-06-24 21:56:24 +00001092CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001093
1094Every time you change to a new directory (new for the current session),
1095netrw will save the directory in a recently-visited directory history
Bram Moolenaar446cb832008-06-24 21:56:24 +00001096list (unless g:netrw_dirhistmax is zero; by default, it's ten). With the
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001097"u" map, one can change to an earlier directory (predecessor). To do
1098the opposite, see |netrw-U|.
1099
1100
Bram Moolenaar446cb832008-06-24 21:56:24 +00001101CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001102
1103With the "U" map, one can change to a later directory (successor).
1104This map is the opposite of the "u" map. (see |netrw-u|) Use the
Bram Moolenaar446cb832008-06-24 21:56:24 +00001105q map to list both the bookmarks and history. (see |netrw-qb|)
1106
1107
1108NETRW CLEAN *netrw-clean* *:NetrwClean*
1109
1110With :NetrwClean one may easily remove netrw from one's home directory;
1111more precisely, from the first directory on your |'runtimepath'|.
1112
1113With :NetrwClean!, netrw will remove netrw from all directories on your
1114|'runtimepath'|.
1115
1116With either form of the command, netrw will first ask for confirmation
1117that the removal is in fact what you want to do. If netrw doesn't have
1118permission to remove a file, it will issue an error message.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001119
Bram Moolenaar9964e462007-05-05 17:54:07 +00001120 *netrw-gx*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001121CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2
Bram Moolenaar9964e462007-05-05 17:54:07 +00001122 (also see |netrw_filehandler|)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001123
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001124Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
1125best seen with a special handler (ie. a tool provided with your computer).
1126Netrw allows one to invoke such special handlers by: >
1127
1128 * when Exploring, hit the "x" key
1129 * when editing, hit gx with the cursor atop the special filename
Bram Moolenaar9964e462007-05-05 17:54:07 +00001130< (not available if the |g:netrw_nogx| variable exists)
1131
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001132Netrw determines which special handler by the following method:
1133
1134 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
1135 view files. Examples of useful settings (place into your <.vimrc>): >
1136
1137 :let g:netrw_browsex_viewer= "kfmclient exec"
1138< or >
1139 :let g:netrw_browsex_viewer= "gnome-open"
1140<
1141 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
1142 invoked first (see |netrw_filehandler|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001143
Bram Moolenaar9964e462007-05-05 17:54:07 +00001144 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001145 * for Gnome (with gnome-open): gnome-open is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001146 * for KDE (with kfmclient) : kfmclient is used.
1147 * for Mac OS X : open is used.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001148 * otherwise the netrwFileHandler plugin is used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001149
1150The file's suffix is used by these various approaches to determine an
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001151appropriate application to use to "handle" these files. Such things as
1152OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
1153*.eps) can be handled.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001154
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001155 *netrw_filehandler*
Bram Moolenaar9964e462007-05-05 17:54:07 +00001156
1157The "x" map applies a function to a file, based on its extension. Of course,
1158the handler function must exist for it to be called!
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001159>
1160 Ex. mypgm.html x ->
Bram Moolenaar9964e462007-05-05 17:54:07 +00001161 NFH_html("scp://user@host/some/path/mypgm.html")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001162<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001163Users may write their own netrw File Handler functions to support more
1164suffixes with special handling. See <plugin/netrwFileHandlers.vim> for
1165examples on how to make file handler functions. As an example: >
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001166
Bram Moolenaar9964e462007-05-05 17:54:07 +00001167 " NFH_suffix(filename)
1168 fun! NFH_suffix(filename)
1169 ..do something special with filename..
1170 endfun
1171<
1172These functions need to be defined in some file in your .vim/plugin
1173(vimfiles\plugin) directory. Vim's function names may not have punctuation
1174characters (except for the underscore) in them. To support suffices that
1175contain such characters, netrw will first convert the suffix using the
1176following table: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001177
Bram Moolenaar9964e462007-05-05 17:54:07 +00001178 @ -> AT ! -> EXCLAMATION % -> PERCENT
1179 : -> COLON = -> EQUAL ? -> QUESTION
1180 , -> COMMA - -> MINUS ; -> SEMICOLON
1181 $ -> DOLLAR + -> PLUS ~ -> TILDE
1182<
1183So, for example: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001184
Bram Moolenaar9964e462007-05-05 17:54:07 +00001185 file.rcs,v -> NFH_rcsCOMMAv()
1186<
1187If more such translations are necessary, please send me email: >
1188 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
1189with a request.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001190
Bram Moolenaar446cb832008-06-24 21:56:24 +00001191Associated setting variable: |g:netrw_browsex_viewer|
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001192
Bram Moolenaar446cb832008-06-24 21:56:24 +00001193 *netrw-curdir*
1194DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001195
Bram Moolenaar446cb832008-06-24 21:56:24 +00001196If files have not been marked with |netrw-mf|: (local marked file list)
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001197
Bram Moolenaar446cb832008-06-24 21:56:24 +00001198 Deleting/removing files and directories involves moving the cursor to the
1199 file/directory to be deleted and pressing "D". Directories must be empty
1200 first before they can be successfully removed. If the directory is a
1201 softlink to a directory, then netrw will make two requests to remove the
1202 directory before succeeding. Netrw will ask for confirmation before doing
1203 the removal(s). You may select a range of lines with the "V" command
1204 (visual selection), and then pressing "D".
Bram Moolenaar9964e462007-05-05 17:54:07 +00001205
Bram Moolenaar446cb832008-06-24 21:56:24 +00001206If files have been marked with |netrw-mf|: (local marked file list)
1207
1208 Marked files (and empty directories) will be deleted; again, you'll be
1209 asked to confirm the deletion before it actually takes place.
1210
1211The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
1212used to control the attempts to remove files and directories. The
1213g:netrw_rm_cmd is used with files, and its default value is:
1214
1215 g:netrw_rm_cmd: ssh HOSTNAME rm
1216
1217The g:netrw_rmdir_cmd variable is used to support the removal of directories.
1218Its default value is:
1219
1220 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
1221
1222If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
1223to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
1224
1225 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
1226
1227Associated setting variable: |g:netrw_local_rmdir| |g:netrw_rm_cmd|
1228 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001229
1230
Bram Moolenaar446cb832008-06-24 21:56:24 +00001231*netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
1232*netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
1233DIRECTORY EXPLORATION COMMANDS {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001234
Bram Moolenaar446cb832008-06-24 21:56:24 +00001235 :Explore[!] [dir]... Explore directory of current file *:Explore*
1236 :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
1237 :Rexplore ... Return to Explorer *:Rexplore*
1238 :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore*
1239 :Texplore [dir]... Tab & Explore *:Texplore*
1240 :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
1241
1242 Used with :Explore **/pattern : (also see |netrw-starstar|)
1243 :Nexplore............. go to next matching file *:Nexplore*
1244 :Pexplore............. go to previous matching file *:Pexplore*
1245
1246:Explore will open the local-directory browser on the current file's
1247 directory (or on directory [dir] if specified). The window will be
1248 split only if the file has been modified, otherwise the browsing
1249 window will take over that window. Normally the splitting is taken
1250 horizontally.
1251:Explore! is like :Explore, but will use vertical splitting.
1252:Sexplore will always split the window before invoking the local-directory
1253 browser. As with Explore, the splitting is normally done
1254 horizontally.
1255:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
1256:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
1257:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
1258:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
1259:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
1260:Texplore [dir] does a tabnew before generating the browser window
1261
1262By default, these commands use the current file's directory. However, one
1263may explicitly provide a directory (path) to use.
1264
1265The |g:netrw_winsize| variable also is used, if specified by the user, to
1266size Hexplore and Vexplore windows.
1267
1268:Rexplore This command is a little different from the others. When one
1269 edits a file, for example by pressing <cr> when atop a file in
1270 a netrw browser window, :Rexplore will return the display to
1271 that of the last netrw browser window. Its a command version
1272 of <2-leftmouse> (which is only available under gvim and
1273 cooperative terms).
1274
1275
1276*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
1277EXPLORING WITH STARS AND PATTERNS
1278
1279When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
1280following four styles, Explore generates a list of files which satisfy
1281the request. >
1282
1283 */filepat files in current directory which satisfy filepat
1284 **/filepat files in current directory or below which satisfy the
1285 file pattern
1286 *//pattern files in the current directory which contain the
1287 pattern (vimgrep is used)
1288 **//pattern files in the current directory or below which contain
1289 the pattern (vimgrep is used)
Bram Moolenaar572cb562005-08-05 21:35:02 +00001290<
Bram Moolenaar446cb832008-06-24 21:56:24 +00001291The cursor will be placed on the first file in the list. One may then
1292continue to go to subsequent files on that list via |:Nexplore| or to
1293preceding files on that list with |:Pexplore|. Explore will update the
1294directory and place the cursor appropriately.
1295
1296A plain >
1297 :Explore
1298will clear the explore list.
1299
1300If your console or gui produces recognizable shift-up or shift-down sequences,
1301then you'll likely find using shift-downarrow and shift-uparrow convenient.
1302They're mapped by netrw:
1303
1304 <s-down> == Nexplore, and
1305 <s-up> == Pexplore.
1306
1307As an example, consider
1308>
1309 :Explore */*.c
1310 :Nexplore
1311 :Nexplore
1312 :Pexplore
1313<
1314The status line will show, on the right hand side of the status line, a
1315message like "Match 3 of 20".
1316
1317Associated setting variables: |g:netrw_keepdir| |g:netrw_browse_split|
1318 |g:netrw_fastbrowse| |g:netrw_ftp_browse_reject|
1319 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1320 |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
1321 |g:netrw_liststyle|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001322
1323
Bram Moolenaar446cb832008-06-24 21:56:24 +00001324DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001325
Bram Moolenaar446cb832008-06-24 21:56:24 +00001326With the cursor atop a filename, pressing "qf" will reveal the file's size
1327and last modification timestamp. Currently this capability is only available
1328for local files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001329
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001330
Bram Moolenaar446cb832008-06-24 21:56:24 +00001331EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001332
Bram Moolenaar446cb832008-06-24 21:56:24 +00001333The "<ctrl-h>" map brings up a requestor allowing the user to change the
1334file/directory hiding list contained in |g:netrw_list_hide|. The hiding list
1335consists of one or more patterns delimited by commas. Files and/or
1336directories satisfying these patterns will either be hidden (ie. not shown) or
1337be the only ones displayed (see |netrw-a|).
1338
1339The "gh" mapping (see |netrw-gh|) quickly alternates between the usual
1340hiding list and the hiding of files or directories that begin with ".".
1341
1342Associated setting variables: |g:netrw_hide| |g:netrw_list_hide|
1343Associated topics: |netrw-a| |netrw-gh| |netrw-mh|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001344
1345
Bram Moolenaar446cb832008-06-24 21:56:24 +00001346EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2
1347
1348When "Sorted by" is name, one may specify priority via the sorting sequence
1349(g:netrw_sort_sequence). The sorting sequence typically prioritizes the
1350name-listing by suffix, although any pattern will do. Patterns are delimited
1351by commas. The default sorting sequence is (all one line):
1352>
1353 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
1354 \.swp$,\.bak$,\~$'
1355<
1356The lone * is where all filenames not covered by one of the other patterns
1357will end up. One may change the sorting sequence by modifying the
1358g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
1359using the "S" map.
1360
Bram Moolenaarc236c162008-07-13 17:41:49 +00001361Related topics: |netrw-s| |netrw-S|
1362Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001363
1364
1365GOING UP *netrw--* {{{2
1366
1367To go up a directory, press "-" or press the <cr> when atop the ../ directory
1368entry in the listing.
1369
1370Netrw will use the command in |g:netrw_list_cmd| to perform the directory
1371listing operation after changing HOSTNAME to the host specified by the
1372user-provided url. By default netrw provides the command as:
1373
1374 ssh HOSTNAME ls -FLa
1375
1376where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
1377read. Naturally, the user may override this command with whatever is
1378preferred. The NetList function which implements remote browsing
1379expects that directories will be flagged by a trailing slash.
1380
1381
1382HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2
1383
1384Netrw's browsing facility allows one to use the hiding list in one of three
1385ways: ignore it, hide files which match, and show only those files which
1386match.
1387
1388If no files have been marked via |netrw-mf|:
1389
1390The "a" map allows the user to cycle through the three hiding modes.
1391
1392The |g:netrw_list_hide| variable holds a comma delimited list of patterns
1393based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list.
1394(also see |netrw-ctrl-h|) To set the hiding list, use the <c-h> map. As an
1395example, to hide files which begin with a ".", one may use the <c-h> map to
1396set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*'
1397in one's <.vimrc>). One may then use the "a" key to show all files, hide
1398matching files, or to show only the matching files.
1399
1400 Example: \.[ch]$
1401 This hiding list command will hide/show all *.c and *.h files.
1402
1403 Example: \.c$,\.h$
1404 This hiding list command will also hide/show all *.c and *.h
1405 files.
1406
1407Don't forget to use the "a" map to select the mode (normal/hiding/show) you
1408want!
1409
1410If files have been marked using |netrw-mf|, then this command will:
1411
1412 if showing all files or non-hidden files:
1413 modify the g:netrw_list_hide list by appending the marked files to it
1414 and showing only non-hidden files.
1415
1416 else if showing hidden files only:
1417 modify the g:netrw_list_hide list by removing the marked files from it
1418 and showing only non-hidden files.
1419 endif
1420
1421 *netrw-gh* *netrw-hide*
1422As a quick shortcut, one may press >
1423 gh
1424to toggle between hiding files which begin with a period (dot) and not hiding
1425them.
1426
1427Associated setting variable: |g:netrw_list_hide|
1428Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
1429
1430IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001431
1432Especially with the remote directory browser, constantly entering the password
1433is tedious.
1434
Bram Moolenaar9964e462007-05-05 17:54:07 +00001435For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00001436tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
1437for setting up no-password ssh and scp and discusses associated security
Bram Moolenaar9964e462007-05-05 17:54:07 +00001438issues. It used to be available at http://hacks.oreilly.com/pub/h/66 ,
1439but apparently that address is now being redirected to some "hackzine".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001440I'll attempt a summary based on that article and on a communication from
1441Ben Schmidt:
Bram Moolenaar843ee412004-06-30 16:16:41 +00001442
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001443 1. Generate a public/private key pair on the local machine
1444 (ssh client): >
1445 ssh-keygen -t rsa
1446 (saving the file in ~/.ssh/id_rsa as prompted)
1447<
1448 2. Just hit the <CR> when asked for passphrase (twice) for no
1449 passphrase. If you do use a passphrase, you will also need to use
1450 ssh-agent so you only have to type the passphrase once per session.
1451 If you don't use a passphrase, simply logging onto your local
1452 computer or getting access to the keyfile in any way will suffice
1453 to access any ssh servers which have that key authorized for login.
1454
1455 3. This creates two files: >
1456 ~/.ssh/id_rsa
1457 ~/.ssh/id_rsa.pub
1458<
1459 4. On the target machine (ssh server): >
1460 cd
1461 mkdir -p .ssh
1462 chmod 0700 .ssh
1463<
1464 5. On your local machine (ssh client): (one line) >
1465 ssh {serverhostname}
1466 cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub
1467<
1468 or, for OpenSSH, (one line) >
1469 ssh {serverhostname}
1470 cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
1471<
1472You can test it out with >
1473 ssh {serverhostname}
1474and you should be log onto the server machine without further need to type
1475anything.
1476
1477If you decided to use a passphrase, do: >
1478 ssh-agent $SHELL
1479 ssh-add
1480 ssh {serverhostname}
1481You will be prompted for your key passphrase when you use ssh-add, but not
1482subsequently when you use ssh. For use with vim, you can use >
1483 ssh-agent vim
1484and, when next within vim, use >
1485 :!ssh-add
1486Alternatively, you can apply ssh-agent to the terminal you're planning on
1487running vim in: >
1488 ssh-agent xterm &
1489and do ssh-add whenever you need.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001490
Bram Moolenaar9964e462007-05-05 17:54:07 +00001491For Windows, folks on the vim mailing list have mentioned that Pageant helps
1492with avoiding the constant need to enter the password.
Bram Moolenaar433f7c82006-03-21 21:29:36 +00001493
Bram Moolenaar446cb832008-06-24 21:56:24 +00001494Kingston Fung wrote about another way to avoid constantly needing to enter
1495passwords:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001496
Bram Moolenaar446cb832008-06-24 21:56:24 +00001497 In order to avoid the need to type in the password for scp each time, you
1498 provide a hack in the docs to set up a non password ssh account. I found a
1499 better way to do that: I can use a regular ssh account which uses a
1500 password to access the material without the need to key-in the password
1501 each time. It's good for security and convenience. I tried ssh public key
1502 authorization + ssh-agent, implementing this, and it works! Here are two
1503 links with instructions:
1504
1505 http://www.ibm.com/developerworks/library/l-keyc2/
1506 http://sial.org/howto/openssh/publickey-auth/
1507
1508
1509LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2
1510
1511Pressing "qb" (query bookmarks) will list the bookmarked directories and
1512directory traversal history (query).
1513
1514(see |netrw-mb|, |netrw-gb|, |netrw-u|, and |netrw-U|)
1515
1516
1517MAKING A NEW DIRECTORY *netrw-d* {{{2
1518
1519With the "d" map one may make a new directory either remotely (which depends
1520on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
1521global variable g:netrw_local_mkdir). Netrw will issue a request for the new
1522directory's name. A bare <CR> at that point will abort the making of the
1523directory. Attempts to make a local directory that already exists (as either
1524a file or a directory) will be detected, reported on, and ignored.
1525
1526Currently, making a directory via ftp is not supported.
1527
1528Associated setting variable: |g:netrw_local_mkdir| |g:netrw_mkdir_cmd|
1529
1530
1531MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
1532
1533By default, |g:netrw_keepdir| is 1. This setting means that the current
1534directory will not track the browsing directory.
1535
1536Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to
1537track netrw's browsing directory.
1538
1539However, given the default setting for g:netrw_keepdir of 1 where netrw
1540maintains its own separate notion of the current directory, in order to make
1541the two directories the same, use the "c" map (just type c). That map will
1542set Vim's notion of the current directory to netrw's current browsing
1543directory.
1544
1545Associated setting variable: |g:netrw_keepdir|
1546
1547MARKING FILES *netrw-mf* {{{2
1548 (also see |netrw-mr|)
1549
1550One may mark files with the cursor atop a filename and then pressing "mf".
1551With gvim, one may also mark files with <s-leftmouse>. The following netrw
1552maps make use of marked files:
1553
1554 |netrw-a| Hide marked files/directories
1555 |netrw-D| Delete marked files/directories
1556 |netrw-mc| Copy marked files to target
1557 |netrw-md| Apply vimdiff to marked files
1558 |netrw-me| Edit marked files
1559 |netrw-mg| Apply vimgrep to marked files
1560 |netrw-mm| Move marked files
1561 |netrw-mp| Print marked files
1562 |netrw-mt| Set target for |netrw-mm| and |netrw-mc|
1563 |netrw-mT| Generate tags using marked files
1564 |netrw-mx| Apply shell command to marked files
1565 |netrw-mz| Compress/Decompress marked files
1566 |netrw-O| Obtain marked files
1567 |netrw-R| Rename marked files
1568
1569One may unmark files one at a time the same way one marks them; ie. place
1570the cursor atop a marked file and press "mf". This process also works
1571with <s-leftmouse> using gvim. One may unmark all files by pressing
1572"mu" (see |netrw-mu|).
1573
1574*markfilelist* *global_markfilelist* *local_markfilelist*
1575All marked files are entered onto the global marked file list; there is only
1576one such list. In addition, every netrw buffer also has its own local marked
1577file list; since netrw buffers are associated with specific directories, this
1578means that each directory has its own local marked file list. The various
1579commands which operate on marked files use one or the other of the marked file
1580lists.
1581
1582
1583MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2
1584 (also see |netrw-mf|)
1585
1586One may also mark files by pressing "mr"; netrw will then issue a prompt,
1587"Enter regexp: ". You may then enter a regular expression such as \.c$ .
1588All files in the current directory will then be marked. Note that the
1589regular expressions are vim-style |regexp| ones, not shell ones. So
1590entering *.c probably isn't what you want!
1591
1592
1593MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2
1594 (See |netrw-mf| and |netrw-mr| for how to mark files)
1595 (uses the local marked-file list)
1596
1597Upon activation of the "mx" map, netrw will query the user for some (external)
1598command to be applied to all marked files. All "%"s in the command will be
1599substituted with the name of each marked file in turn. If no "%"s are in the
1600command, then the command will be followed by a space and a marked filename.
1601
1602
1603MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
1604 (See |netrw-mf| and |netrw-mr| for how to mark files)
1605 (uses the local marked file list)
1606
1607If any marked files are compressed, then "mz" will decompress them.
1608If any marked files are decompressed, then "mz" will compress them
1609using the command specified by |g:netrw_compress|; by default,
1610that's "gzip".
1611
1612For decompression, netrw provides a |Dictionary| of suffices and their
1613associated decompressing utilities; see |g:netrw_decompress|.
1614
1615Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
1616
1617MARKED FILES: COPYING *netrw-mc* {{{2
1618 (See |netrw-mf| and |netrw-mr| for how to mark files)
1619 (Uses the global marked file list)
1620
1621Select a target directory with mt (|netrw-mt|). Then change directory,
1622select file(s) (see |netrw-mf|), and press "mc".
1623
1624Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
1625
1626MARKED FILES: DIFF *netrw-md* {{{2
1627 (See |netrw-mf| and |netrw-mr| for how to mark files)
1628 (uses the global marked file list)
1629
1630Use |vimdiff| to visualize difference between selected files (two or
1631three may be selected for this). Uses the global marked file list.
1632
1633MARKED FILES: EDITING *netrw-me* {{{2
1634 (See |netrw-mf| and |netrw-mr| for how to mark files)
1635 (uses the global marked file list)
1636
1637This command will place the marked files on the |arglist| and commence
1638editing them. One may return the to explorer window with |:Rexplore|.
1639
1640MARKED FILES: GREP *netrw-mg* {{{2
1641 (See |netrw-mf| and |netrw-mr| for how to mark files)
1642 (uses the global marked file list)
1643
1644This command will apply |:vimgrep| to the marked files. The command will ask
1645for the requested pattern; one may enter: >
1646 /pattern/[g][j]
1647 ! /pattern/[g][j]
1648 pattern
1649<
1650MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2
1651 (See |netrw-mf| and |netrw-mr| for how to mark files)
1652 (uses the local marked file list)
1653
1654This command extracts the suffices of the marked files and toggles their
1655presence on the hiding list. Please note that marking the same suffix
1656this way multiple times will result in the suffix's presence being toggled
1657for each file (so an even quantity of marked files having the same suffix
1658is the same as not having bothered to select them at all).
1659
1660Related topics: |netrw-a| |g:netrw_list_hide|
1661
1662MARKED FILES: MOVING *netrw-mm* {{{2
1663 (See |netrw-mf| and |netrw-mr| for how to mark files)
1664 (uses the global marked file list)
1665
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001666 WARNING: moving files is more dangerous than copying them.
1667 A file being moved is first copied and then deleted; if the
1668 copy operation fails and the delete succeeds, you will lose
1669 the file. Either try things out with unimportant files
1670 first or do the copy and then delete yourself using mc and D.
1671 Use at your own risk!
1672
Bram Moolenaar446cb832008-06-24 21:56:24 +00001673Select a target directory with mT (|netrw-mt|). Then change directory,
1674select file(s) (see |netrw-mf|), and press "mm".
1675
1676Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
1677
1678MARKED FILES: PRINTING *netrw-mp* {{{2
1679 (See |netrw-mf| and |netrw-mr| for how to mark files)
1680 (uses the local marked file list)
1681
1682Netrw will apply the |:hardcopy| command to marked files. What it does
1683is open each file in a one-line window, execute hardcopy, then close the
1684one-line window.
1685
1686
1687MARKED FILES: SOURCING *netrw-ms* {{{2
1688 (See |netrw-mf| and |netrw-mr| for how to mark files)
1689 (uses the local marked file list)
1690
1691Netrw will source the marked files (using vim's |:source| command)
1692
1693
1694MARKED FILES: TAGGING *netrw-mT* {{{2
1695 (See |netrw-mf| and |netrw-mr| for how to mark files)
1696 (uses the global marked file list)
1697
Bram Moolenaarc236c162008-07-13 17:41:49 +00001698The "mt" mapping will apply the command in |g:netrw_ctags| (by default, its
Bram Moolenaar446cb832008-06-24 21:56:24 +00001699"ctags") to marked files. For remote browsing, in order to create a tags file
1700netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for
1701this to work on remote systems. For your local system, see |ctags| on how to
1702get a version. I myself use hdrtags, currently available at
1703http://mysite.verizon.net/astronaut/src/index.html , and have >
1704
1705 let g:netrw_ctags= "hdrtag"
1706<
1707in my <.vimrc>.
1708
1709When a remote set of files are tagged, the resulting tags file is "obtained";
1710ie. a copy is transferred to the local system's directory. The local tags
1711file is then modified so that one may use it through the network. The
1712modification is concerns the names of the files in the tags; each filename is
1713preceded by the netrw-compatible url used to obtain it. When one subsequently
1714uses one of the go to tag actions (|tags|), the url will be used by netrw to
1715edit the desired file and go to the tag.
1716
Bram Moolenaarc236c162008-07-13 17:41:49 +00001717Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001718
1719
1720MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2
1721 (See |netrw-mf| and |netrw-mr| for how to mark files)
1722
1723Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
1724
1725 * if the cursor is atop a file name, then the netrw window's currently
1726 displayed directory is used for the copy/move-to target.
1727
1728 * also, if the cursor is in the banner, then the netrw window's currently
1729 displayed directory is used for the copy/move-to target.
1730
1731 * however, if the cursor is atop a directory name, then that directory is
1732 used for the copy/move-to target
1733
1734There is only one copy/move-to target per vim session; ie. the target is a
1735script variable (see |s:var|) and is shared between all netrw windows (in an
1736instance of vim).
1737
1738MARKED FILES: UNMARKING *netrw-mu* {{{2
1739 (See |netrw-mf| and |netrw-mr| for how to mark files)
1740
1741The "mu" mapping will unmark all currently marked files.
1742
1743
1744NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2
1745
1746(if you're interestd in the netrw file transfer settings, see |netrw-options|)
1747
1748The <netrw.vim> browser provides settings in the form of variables which
1749you may modify; by placing these settings in your <.vimrc>, you may customize
1750your browsing preferences. (see also: |netrw-settings|)
1751>
1752 --- -----------
1753 Var Explanation
1754 --- -----------
1755< *g:netrw_alto* change from above splitting to below splitting
1756 by setting this variable (see |netrw-o|)
1757 default: =&sb (see |'sb'|)
1758
1759 *g:netrw_altv* change from left splitting to right splitting
1760 by setting this variable (see |netrw-v|)
1761 default: =&spr (see |'spr'|)
1762
1763 *g:netrw_browse_split* when browsing, <cr> will open the file by:
1764 =0: re-using the same window
1765 =1: horizontally splitting the window first
1766 =2: vertically splitting the window first
1767 =3: open file in new tab
1768 =4: act like "P" (ie. open previous window)
1769
1770 *g:netrw_browsex_viewer* specify user's preference for a viewer: >
1771 "kfmclient exec"
1772 "gnome-open"
1773< If >
1774 "-"
1775< is used, then netrwFileHandler() will look for
1776 a script/function to handle the given
1777 extension. (see |netrw_filehandler|).
1778
Bram Moolenaar446cb832008-06-24 21:56:24 +00001779 *g:netrw_compress* ="gzip"
1780 Will compress marked files with this
1781 command
1782
Bram Moolenaarc236c162008-07-13 17:41:49 +00001783 *g:netrw_ctags* ="ctags"
1784 The default external program used to create tags
1785
Bram Moolenaar446cb832008-06-24 21:56:24 +00001786 *g:netrw_decompress* = { ".gz" : "gunzip" ,
1787 ".bz2" : "bunzip2" ,
1788 ".zip" : "unzip" ,
1789 ".tar" : "tar -xf"}
1790 A dictionary mapping suffices to
1791 decompression programs.
1792
1793 *g:netrw_fastbrowse* =0: slow speed directory browsing;
1794 never re-uses directory listings,
1795 always obtains directory listings.
1796 =1: medium speed directory browsing;
1797 re-use directory listings only
1798 when remote directory browsing.
1799 (default value)
1800 =2: fast directory browsing;
1801 only obtains directory listings when the
1802 directory hasn't been seen before
1803 (or |netrw-ctrl-l| is used).
1804
1805 Fast browsing retains old directory listing
1806 buffers so that they don't need to be
1807 re-acquired. This feature is especially
1808 important for remote browsing. However, if
1809 a file is introduced or deleted into or from
1810 such directories, the old directory buffer
1811 becomes out-of-date. One may always refresh
1812 such a directory listing with |netrw-ctrl-l|.
1813 This option gives the user the choice of
1814 trading off accuracy (ie. up-to-date listing)
1815 versus speed.
1816
1817 *g:netrw_fname_escape* =' ?&;%'
1818 Used on filenames before remote reading/writing
1819
1820 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
1821 that can show up as "directories" and "files"
1822 in the listing. This pattern is used to
1823 remove such embedded messages. By default its
1824 value is:
1825 '^total\s\+\d\+$\|
1826 ^Trying\s\+\d\+.*$\|
1827 ^KERBEROS_V\d rejected\|
1828 ^Security extensions not\|
1829 No such file\|
1830 : connect to address [0-9a-fA-F:]*
1831 : No route to host$'
1832
1833 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
1834 listing. Defaults:
1835 unix or g:netrw_cygwin set: : "ls -lF"
1836 otherwise "dir"
1837
1838
1839 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
1840 listing, sorted by size of file.
1841 Defaults:
1842 unix or g:netrw_cygwin set: : "ls -slF"
1843 otherwise "dir"
1844
1845 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
1846 listing, sorted by time of last modification.
1847 Defaults:
1848 unix or g:netrw_cygwin set: : "ls -tlF"
1849 otherwise "dir"
1850
1851 *g:netrw_glob_escape* ='[]*?`{~$'
1852 These characters in directory names are
1853 escaped before applying glob()
1854
1855 *g:netrw_hide* if true, the hiding list is used
1856 default: =0
1857
1858 *g:netrw_keepdir* =1 (default) keep current directory immune from
1859 the browsing directory.
1860 =0 keep the current directory the same as the
1861 browsing directory.
1862 The current browsing directory is contained in
1863 b:netrw_curdir (also see |netrw-c|)
1864
1865 *g:netrw_list_cmd* command for listing remote directories
1866 default: (if ssh is executable)
1867 "ssh HOSTNAME ls -FLa"
1868
1869 *g:netrw_liststyle* Set the default listing style:
1870 = 0: thin listing (one file per line)
1871 = 1: long listing (one file per line with time
1872 stamp information and file size)
1873 = 2: wide listing (multiple files in columns)
1874 = 3: tree style listing
1875 *g:netrw_list_hide* comma separated pattern list for hiding files
1876 Patterns are regular expressions (see |regexp|)
1877 Example: let g:netrw_list_hide= '.*\.swp$'
1878 default: ""
1879
1880 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
1881 ="copy" Windows
1882 Copies marked files (|netrw-mf|) to target
1883 directory (|netrw-mt|, |netrw-mc|)
1884
1885 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
1886 ="move" Windows
1887 Moves marked files (|netrw-mf|) to target
1888 directory (|netrw-mt|, |netrw-mm|)
1889
1890 *g:netrw_local_mkdir* command for making a local directory
1891 default: "mkdir"
1892
1893 *g:netrw_local_rmdir* remove directory command (rmdir)
1894 default: "rmdir"
1895
1896 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
1897 listings fit on 80 column displays.
1898 If your screen is wider, and you have file
1899 or directory names longer than 32 bytes,
1900 you may set this option to keep listings
1901 columnar.
1902
1903 *g:netrw_mkdir_cmd* command for making a remote directory
1904 default: "ssh USEPORT HOSTNAME mkdir"
1905
1906 *g:netrw_retmap* if it exists and is set to one, then
1907 <2-leftmouse> will be mapped for easy
1908 return to the netrw browser window.
1909 (example: click once to select and open
1910 a file, double-click to return)
1911 default: =0
1912
1913 *g:netrw_rm_cmd* command for removing files
1914 default: "ssh USEPORT HOSTNAME rm"
1915
1916 *g:netrw_rmdir_cmd* command for removing directories
1917 default: "ssh USEPORT HOSTNAME rmdir"
1918
1919 *g:netrw_rmf_cmd* command for removing softlinks
1920 default: "ssh USEPORT HOSTNAME rm -f"
1921
1922 *g:netrw_sort_by* sort by "name", "time", or "size"
1923 default: "name"
1924
1925 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
1926 default: "normal"
1927
Bram Moolenaarc236c162008-07-13 17:41:49 +00001928 *g:netrw_sort_options* sorting is done using |:sort|; this
1929 variable's value is appended to the
1930 sort command. Thus one may ignore case,
1931 for example, with the following in your
1932 .vimrc: >
1933 let g:netrw_sort_options="i"
1934< default: ""
1935
Bram Moolenaar446cb832008-06-24 21:56:24 +00001936 *g:netrw_sort_sequence* when sorting by name, first sort by the
1937 comma-separated pattern sequence
1938 default: '[\/]$,*,\.bak$,\.o$,\.h$,
1939 \.info$,\.swp$,\.obj$'
1940
1941 *g:netrw_special_syntax* If true, then certain files will be shown
1942 in special syntax in the browser:
1943
1944 netrwBak : *.bak
1945 netrwCompress: *.gz *.bz2 *.Z *.zip
1946 netrwData : *.dat
1947 netrwHdr : *.h
1948 netrwLib : *.a *.so *.lib *.dll
1949 netrwMakefile: [mM]akefile *.mak
1950 netrwObj : *.o *.obj
1951 netrwTags : tags ANmenu ANtags
1952 netrwTilde : *~
1953 netrwTmp : tmp* *tmp
1954
1955 These syntax highlighting groups are linked
1956 to Folded or DiffChange by default
1957 (see |hl-Folded| and |hl-DiffChange|), but
1958 one may put lines like >
1959 hi link netrwCompress Visual
1960< into one's <.vimrc> to use one's own
1961 preferences.
1962
1963 *g:netrw_ssh_cmd* One may specify an executable command
1964 to use instead of ssh for remote actions
1965 such as listing, file removal, etc.
1966 default: ssh
1967
1968 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
1969 messages, banners, and whatnot that one doesn't
1970 want masquerading as "directories" and "files".
1971 Use this pattern to remove such embedded
1972 messages. By default its value is:
1973 '^total\s\+\d\+$'
1974
1975
1976 *g:netrw_tmpfile_escape* =' &;'
1977 escape() is applied to all temporary files
1978 to escape these characters.
1979
1980 *g:netrw_timefmt* specify format string to vim's strftime().
1981 The default, "%c", is "the preferred date
1982 and time representation for the current
1983 locale" according to my manpage entry for
1984 strftime(); however, not all are satisfied
1985 with it. Some alternatives:
1986 "%a %d %b %Y %T",
1987 " %a %Y-%m-%d %I-%M-%S %p"
1988 default: "%c"
1989
1990 *g:netrw_use_noswf* netrw normally avoids writing swapfiles
1991 for browser buffers. However, under some
1992 systems this apparently is causing nasty
1993 ml_get errors to appear; if you're getting
1994 ml_get errors, try putting
1995 let g:netrw_use_noswf= 0
1996 in your .vimrc.
1997
1998 *g:netrw_winsize* specify initial size of new windows made with
1999 "o" (see |netrw-o|), "v" (see |netrw-v|),
2000 |:Hexplore| or |:Vexplore|.
2001 default: ""
2002
2003 *g:netrw_xstrlen* Controls how netrw computes a string
2004 including multi-byte characters' string
2005 length. (thanks to N Weibull, T Mechelynck)
2006 =0: uses Vim's built-in strlen()
2007 =1: number of codepoints (Latin + a combining
2008 circumflex is two codepoints) (DEFAULT)
2009 =2: number of spacing codepoints (Latin a +
2010 combining circumflex is one spacing
2011 codepoint; a hard tab is one; wide and
2012 narrow CJK are one each; etc.)
2013 =3: virtual length (counting tabs as anything
2014 between 1 and |'tabstop'|, wide CJJK as 2
2015 rather than 1, Arabic alif as zero when
2016 immediately preceded by lam, one
2017 otherwise, etc)
2018
2019 *g:NetrwTopLvlMenu* This variable specifies the top level
2020 menu name; by default, it's "Netrw.". If
2021 you wish to change this, do so in your
2022 .vimrc.
2023
2024NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2
2025
2026Netrw has been designed to handle user options by saving them, setting the
2027options to something that's compatible with netrw's needs, and then restoring
2028them. However, the autochdir option: >
2029 :set acd
2030is problematical. Autochdir sets the current directory to that containing the
2031file you edit; this apparently also applies to directories. In other words,
2032autochdir sets the current directory to that containing the "file" (even if
2033that "file" is itself a directory).
2034
2035NETRW SETTINGS *netrw-settings* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002036
2037With the NetrwSettings.vim plugin, >
2038 :NetrwSettings
2039will bring up a window with the many variables that netrw uses for its
Bram Moolenaar1afcace2005-11-25 19:54:28 +00002040settings. You may change any of their values; when you save the file, the
2041settings therein will be used. One may also press "?" on any of the lines for
2042help on what each of the variables do.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002043
Bram Moolenaar446cb832008-06-24 21:56:24 +00002044(also see: |netrw-browser-var| |netrw-protocol| |netrw-var| |netrw-variables|)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002045
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002046
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00002047==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00002048OBTAINING A FILE *netrw-O* {{{2
2049
2050If there are no marked files:
2051
2052 When browsing a remote directory, one may obtain a file under the cursor
2053 (ie. get a copy on your local machine, but not edit it) by pressing the O
2054 key.
2055
2056If there are marked files:
2057
2058 The marked files will be obtained (ie. a copy will be transferred to your
2059 local machine, but not set up for editing).
2060
2061Only ftp and scp are supported for this operation (but since these two are
2062available for browsing, that shouldn't be a problem). The status bar will
2063then show, on its right hand side, a message like "Obtaining filename". The
2064statusline will be restored after the transfer is complete.
2065
2066Netrw can also "obtain" a file using the local browser. Netrw's display
2067of a directory is not necessarily the same as Vim's "current directory",
2068unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
2069a file using the local browser (by putting the cursor on it) and pressing
2070"O" will then "obtain" the file; ie. copy it to Vim's current directory.
2071
2072Related topics:
2073 * To see what the current directory is, use |:pwd|
2074 * To make the currently browsed directory the current directory, see |netrw-c|
2075 * To automatically make the currently browsed directory the current
2076 directory, see |g:netrw_keepdir|.
2077
2078
Bram Moolenaarc236c162008-07-13 17:41:49 +00002079OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
2080
2081To open a file in netrw's current directory, press "%". This map will
2082query the user for a new filename; an empty file by that name will be
2083placed in the netrw's current directory (ie. b:netrw_curdir).
2084
2085
Bram Moolenaar446cb832008-06-24 21:56:24 +00002086PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2
2087
2088One may use a preview window by using the "p" key when the cursor is atop the
2089desired filename to be previewed. The display will then split to show both
2090the browser (where the cursor will remain) and the file (see |:pedit|).
2091By default, the split will be taken horizontally; one may use vertical
2092splitting if one has set |g:netrw_preview| first.
2093
2094
2095PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
2096
2097To edit a file or directory in the previously used (last accessed) window (see
2098:he |CTRL-W_p|), press a "P". If there's only one window, then the one window
2099will be horizontally split (above/below splitting is controlled by
2100|g:netrw_alto|, and its initial size is controlled by |g:netrw_winsize|).
2101
2102If there's more than one window, the previous window will be re-used on
2103the selected file/directory. If the previous window's associated buffer
2104has been modified, and there's only one window with that buffer, then
2105the user will be asked if s/he wishes to save the buffer first (yes,
2106no, or cancel).
2107
2108
2109REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2
2110
2111To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
2112hit the <cr> when atop the ./ directory entry in the listing. One may also
2113refresh a local directory by using ":e .".
2114
2115
2116RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2
2117
2118If there are no marked files: (see |netrw-mf|)
2119
2120 Renaming/moving files and directories involves moving the cursor to the
2121 file/directory to be moved (renamed) and pressing "R". You will then be
2122 queried for where you want the file/directory to be moved. You may select
2123 a range of lines with the "V" command (visual selection), and then
2124 pressing "R".
2125
2126If there are marked files: (see |netrw-mf|)
2127
2128 Marked files will be renamed (moved). You will be queried as above in
2129 order to specify where you want the file/directory to be moved.
2130
2131 WARNING:~
2132
2133 Note that moving files is a dangerous operation; copies are safer. That's
2134 because a "move" for remote files is actually a copy + delete -- and if
2135 the copy fails and the delete does not, you may lose the file.
2136
2137The g:netrw_rename_cmd variable is used to implement renaming. By default its
2138value is:
2139
2140 ssh HOSTNAME mv
2141
2142One may rename a block of files and directories by selecting them with
2143the V (|linewise-visual|).
2144
2145
2146REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2
2147
2148One may toggle between normal and reverse sorting order by pressing the
2149"r" key.
2150
2151Related topics: |netrw-s|
2152Associated setting variable: |g:netrw_sort_direction|
2153
2154
2155SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
2156
2157One may select the sorting style by name, time, or (file) size. The "s" map
2158allows one to circulate amongst the three choices; the directory listing will
2159automatically be refreshed to reflect the selected style.
2160
2161Related topics: |netrw-r| |netrw-S|
2162Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
2163
2164
216510. Problems and Fixes *netrw-problems* {{{1
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002166
2167 (This section is likely to grow as I get feedback)
2168 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00002169 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002170 P1. I use windows 95, and my ftp dumps four blank lines at the
2171 end of every read.
2172
2173 See |netrw-fixup|, and put the following into your
2174 <.vimrc> file:
2175
2176 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002177
Bram Moolenaar488c6512005-08-11 20:09:58 +00002178 *netrw-p2*
Bram Moolenaar9964e462007-05-05 17:54:07 +00002179 P2. I use Windows, and my network browsing with ftp doesn't sort by
2180 time or size! -or- The remote system is a Windows server; why
2181 don't I get sorts by time or size?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002182
2183 Windows' ftp has a minimal support for ls (ie. it doesn't
2184 accept sorting options). It doesn't support the -F which
2185 gives an explanatory character (ABC/ for "ABC is a directory").
Bram Moolenaar9964e462007-05-05 17:54:07 +00002186 Netrw then uses "dir" to get both its short and long listings.
2187 If you think your ftp does support a full-up ls, put the
2188 following into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002189
Bram Moolenaar9964e462007-05-05 17:54:07 +00002190 let g:netrw_ftp_list_cmd = "ls -lF"
2191 let g:netrw_ftp_timelist_cmd= "ls -tlF"
2192 let g:netrw_ftp_sizelist_cmd= "ls -slF"
2193<
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002194 Alternatively, if you have cygwin on your Windows box, put
Bram Moolenaar9964e462007-05-05 17:54:07 +00002195 into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002196
2197 let g:netrw_cygwin= 1
Bram Moolenaar9964e462007-05-05 17:54:07 +00002198<
2199 This problem also occurs when the remote system is Windows.
2200 In this situation, the various g:netrw_ftp_[time|size]list_cmds
2201 are as shown above, but the remote system will not correctly
2202 modify its listing behavior.
2203
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002204
Bram Moolenaar488c6512005-08-11 20:09:58 +00002205 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002206 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
2207 used ssh! That wasn't what I asked for...
2208
2209 Netrw has two methods for browsing remote directories: ssh
2210 and ftp. Unless you specify ftp specifically, ssh is used.
2211 When it comes time to do download a file (not just a directory
2212 listing), netrw will use the given protocol to do so.
2213
Bram Moolenaar488c6512005-08-11 20:09:58 +00002214 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002215 P4. I would like long listings to be the default.
2216
Bram Moolenaar446cb832008-06-24 21:56:24 +00002217 Put the following statement into your |.vimrc|: >
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002218
Bram Moolenaar446cb832008-06-24 21:56:24 +00002219 let g:netrw_liststyle= 1
2220<
2221 Check out |netrw-browser-var| for more customizations that
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002222 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002223
Bram Moolenaar488c6512005-08-11 20:09:58 +00002224 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002225 P5. My times come up oddly in local browsing
2226
2227 Does your system's strftime() accept the "%c" to yield dates
2228 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
2229 and find out what option should be used. Then put it into
Bram Moolenaar446cb832008-06-24 21:56:24 +00002230 your |.vimrc|: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002231
Bram Moolenaar446cb832008-06-24 21:56:24 +00002232 let g:netrw_timefmt= "%X" (where X is the option)
2233<
Bram Moolenaar488c6512005-08-11 20:09:58 +00002234 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002235 P6. I want my current directory to track my browsing.
2236 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002237
Bram Moolenaar446cb832008-06-24 21:56:24 +00002238 Put the following line in your |.vimrc|:
2239>
Bram Moolenaar433f7c82006-03-21 21:29:36 +00002240 let g:netrw_keepdir= 0
Bram Moolenaar446cb832008-06-24 21:56:24 +00002241<
Bram Moolenaar9964e462007-05-05 17:54:07 +00002242 *netrw-p7*
2243 P7. I use Chinese (or other non-ascii) characters in my filenames, and
2244 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002245
Bram Moolenaar9964e462007-05-05 17:54:07 +00002246 (taken from an answer provided by Wu Yongwei on the vim
2247 mailing list)
2248 I now see the problem. You code page is not 936, right? Vim
2249 seems only able to open files with names that are valid in the
2250 current code page, as are many other applications that do not
2251 use the Unicode version of Windows APIs. This is an OS-related
2252 issue. You should not have such problems when the system
2253 locale uses UTF-8, such as modern Linux distros.
2254
2255 (...it is one more reason to recommend that people use utf-8!)
2256
2257 *netrw-p8*
2258 P8. I'm getting "ssh is not executable on your system" -- what do I
2259 do?
2260
2261 (Dudley Fox) Most people I know use putty for windows ssh. It
2262 is a free ssh/telnet application. You can read more about it
2263 here:
2264
2265 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also:
2266
2267 (Marlin Unruh) This program also works for me. It's a single
2268 executable, so he/she can copy it into the Windows\System32
2269 folder and create a shortcut to it.
2270
2271 (Dudley Fox) You might also wish to consider plink, as it
2272 sounds most similar to what you are looking for. plink is an
2273 application in the putty suite.
2274
2275 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink
2276
2277 (Vissale Neang) Maybe you can try OpenSSH for windows, which
2278 can be obtained from:
2279
2280 http://sshwindows.sourceforge.net/
2281
2282 It doesn't need the full Cygwin package.
2283
2284 (Antoine Mechelynck) For individual Unix-like programs needed
2285 for work in a native-Windows environment, I recommend getting
2286 them from the GnuWin32 project on sourceforge if it has them:
2287
2288 http://gnuwin32.sourceforge.net/
2289
2290 Unlike Cygwin, which sets up a Unix-like virtual machine on
2291 top of Windows, GnuWin32 is a rewrite of Unix utilities with
2292 Windows system calls, and its programs works quite well in the
2293 cmd.exe "Dos box".
2294
2295 (dave) Download WinSCP and use that to connect to the server.
2296 In Preferences > Editors, set gvim as your editor:
2297
2298 - Click "Add..."
2299 - Set External Editor (adjust path as needed, include
2300 the quotes and !.! at the end):
2301 "c:\Program Files\Vim\vim70\gvim.exe" !.!
2302 - Check that the filetype in the box below is
2303 {asterisk}.{asterisk} (all files), or whatever types
2304 you want (cec: change {asterisk} to * ; I had to
2305 write it that way because otherwise the helptags
Bram Moolenaar446cb832008-06-24 21:56:24 +00002306 system thinks it's a tag)
2307 - Make sure it's at the top of the listbox (click it,
2308 then click "Up" if it's not)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002309 If using the Norton Commander style, you just have to hit <F4>
2310 to edit a file in a local copy of gvim.
2311
2312 (Vit Gottwald) How to generate public/private key and save
2313 public key it on server: >
2314 http://www.tartarus.org/~simon/puttydoc/Chapter8.html#pubkey-gettingready
2315 8.3 Getting ready for public key authentication
2316<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002317 How to use a private key with 'pscp': >
2318
Bram Moolenaar9964e462007-05-05 17:54:07 +00002319 http://www.tartarus.org/~simon/puttydoc/Chapter5.html
2320 5.2.4 Using public key authentication with PSCP
2321<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002322 (Ben Schmidt) I find the ssh included with cwRsync is
2323 brilliant, and install cwRsync or cwRsyncServer on most
2324 Windows systems I come across these days. I guess COPSSH,
2325 packed by the same person, is probably even better for use as
2326 just ssh on Windows, and probably includes sftp, etc. which I
2327 suspect the cwRsync doesn't, though it might
2328
Bram Moolenaar9964e462007-05-05 17:54:07 +00002329 (cec) To make proper use of these suggestions above, you will
2330 need to modify the following user-settable variables in your
2331 .vimrc:
2332
Bram Moolenaar446cb832008-06-24 21:56:24 +00002333 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd|
2334 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
Bram Moolenaar9964e462007-05-05 17:54:07 +00002335
2336 The first one (|g:netrw_ssh_cmd|) is the most important; most
2337 of the others will use the string in g:netrw_ssh_cmd by
2338 default.
2339 *netrw-p9* *netrw-ml_get*
2340 P9. I'm browsing, changing directory, and bang! ml_get errors
2341 appear and I have to kill vim. Any way around this?
2342
2343 Normally netrw attempts to avoid writing swapfiles for
2344 its temporary directory buffers. However, on some systems
2345 this attempt appears to be causing ml_get errors to
2346 appear. Please try setting |g:netrw_use_noswf| to 0
2347 in your <.vimrc>: >
2348 let g:netrw_use_noswf= 0
2349<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002350 *netrw-p10*
2351 P10. I'm being pestered with "[something] is a directory" and
2352 "Press ENTER or type command to continue" prompts...
2353
2354 The "[something] is a directory" prompt is issued by Vim,
2355 not by netrw, and there appears to be no way to work around
2356 it. Coupled with the default cmdheight of 1, this message
2357 causes the "Press ENTER..." prompt. So: read |hit-enter|;
2358 I also suggest that you set your |'cmdheight'| to 2 (or more) in
2359 your <.vimrc> file.
2360
2361 *netrw-p11*
2362 P11. I want to have two windows; a thin one on the left and my editing
2363 window on the right. How can I do this?
2364
2365 * Put the following line in your <.vimrc>:
2366 let g:netrw_altv = 1
2367 * Edit the current directory: :e .
2368 * Select some file, press v
2369 * Resize the windows as you wish (see |CTRL-W_<| and
2370 |CTRL-W_>|). If you're using gvim, you can drag
2371 the separating bar with your mouse.
2372 * When you want a new file, use ctrl-w h to go back to the
2373 netrw browser, select a file, then press P (see |CTRL-W_h|
2374 and |netrw-P|). If you're using gvim, you can press
2375 <leftmouse> in the browser window and then press the
2376 <middlemouse> to select the file.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002377
2378==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000237911. Debugging Netrw Itself *netrw-debug* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00002380
2381The <netrw.vim> script is typically available as:
Bram Moolenaar488c6512005-08-11 20:09:58 +00002382>
Bram Moolenaar446cb832008-06-24 21:56:24 +00002383 /usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
2384 /usr/local/share/vim/vim6x/autoload/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00002385< -or- >
Bram Moolenaar446cb832008-06-24 21:56:24 +00002386 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
2387 /usr/local/share/vim/vim7x/autoload/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00002388<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002389which is loaded automatically at startup (assuming :set nocp).
2390
2391 1. Get the <Decho.vim> script, available as:
2392
Bram Moolenaar446cb832008-06-24 21:56:24 +00002393 http://mysite.verizon.net/astronaut/vim/index.html#DECHO
Bram Moolenaar071d4272004-06-13 20:20:40 +00002394 or
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00002395 http://vim.sourceforge.net/scripts/script.php?script_id=120
Bram Moolenaar071d4272004-06-13 20:20:40 +00002396
Bram Moolenaar446cb832008-06-24 21:56:24 +00002397 It now comes as a "vimball"; if you're using vim 7.0 or earlier,
2398 you'll need to update vimball, too. See
2399 http://mysite.verizon.net/astronaut/vim/index.html#VIMBALL
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002400
Bram Moolenaar446cb832008-06-24 21:56:24 +00002401 2. Edit the <netrw.vim> file by typing: >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002402
2403 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00002404 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002405 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00002406<
2407 To restore to normal non-debugging behavior, re-edit <netrw.vim>
2408 and type >
Bram Moolenaar071d4272004-06-13 20:20:40 +00002409
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002410 vim netrw.vim
2411 :DechoOff
2412 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00002413<
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002414 This command, provided by <Decho.vim>, will comment out all
2415 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
2416
Bram Moolenaar446cb832008-06-24 21:56:24 +00002417 3. Then bring up vim and attempt to evoke the problem by doing a
2418 transfer or doing some browsing. A set of messages should appear
2419 concerning the steps that <netrw.vim> took in attempting to
2420 read/write your file over the network in a separate tab.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002421
Bram Moolenaar9964e462007-05-05 17:54:07 +00002422 To save the file, use >
2423 :wincmd j
2424 :set bt=
2425 :w! DBG
2426< Please send that information to <netrw.vim>'s maintainer, >
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00002427 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar9964e462007-05-05 17:54:07 +00002428<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002429==============================================================================
Bram Moolenaar9964e462007-05-05 17:54:07 +0000243012. History *netrw-history* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00002431
Bram Moolenaare37d50a2008-08-06 17:06:04 +00002432 v130: Jul 31, 2008 * trying out elinks/links for http://host/
2433 requests. One problem: in-page links
2434 (such as with ...#LABEL) are not supported
2435 * verified that Bram's modified netrwPlugin works
2436 Aug 01, 2008 * fixed a bug: when sourcing a file via ftp, the
2437 "filter window" was left behind.
2438 v129: Jul 31, 2008 * bug found in non-mouse enabled vim and some
2439 local maps
2440 v128: Jul 30, 2008 * much work done in using shellescape() and
2441 fnameescape()
Bram Moolenaarc236c162008-07-13 17:41:49 +00002442 v126: Jun 30, 2008 * after having gone to a remote directory,
2443 <f1> was no longer taking one to the correct
2444 entry in the help (|netrw-quickhelp|). Fixed.
2445 Jul 01, 2008 * extracting the last filename from a wide listing
2446 missed the last letter when |'virtualedit'| not
2447 enabled.
2448 Jul 01, 2008 * vim foo/bar was creating [Scratch] buffers,
2449 where bar was also a directory
2450 Jul 01, 2008 * numerous additional changes were made to netrw
2451 to use fnameescape() and shellescape() instead
2452 of escape(). Not all changes have been tested
2453 as yet...
2454 Jul 01, 2008 * (James Vega reported) some problems with
2455 :NetrwSettings (due to no longer used setting
2456 variables).
2457 Jul 07, 2008 * Additional numerous changes to support security;
2458 shellescape(arg,1), etc.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002459 v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he
2460 noted that gx was failing since its call to
2461 netrw#NetBrowseX() wasn't updated to
2462 netrw#NetrwBrowseX().
2463 * (Stanis Trendelenburg) ST provides a patch to
2464 supports davs: (dav + ssl)
2465 * (Rick Choi) noted that directory names comprised
2466 of three digits were not being displayed by
2467 the internal browser. Fixed.
2468 * (Erik Falor) provided a patch to handle problems
2469 with changing directory and |'acd'| option.
2470 * (James Vega, Teemu Likonen) noted that netrw
2471 wasn't handling multi-byte filenames/directories
2472 correctly. Fixed.
2473 * (Rick) found problem with g:netrw_maxfilenamelen
2474 being overridden.
2475 * (James Vega) pointed out that netrw was
2476 misidentifying all files in a symbolically linked
2477 directory as being symbolically linked
2478 themselves. This particular problem was fixed;
2479 however, there are now situations where
2480 symbolically linked files will not be detected.
2481 Really need an internal vim function to do this
2482 identification.
2483 Apr 17, 2008 * When g:netrw_keepdir==0, current directory
2484 doesn't necessarily equal b:netrw_curdir
2485 initially. Problem is due to the patch directly
2486 above.
2487 * Fixed qf to handle case where b:netrw_curdir
2488 isn't the same as the current directory under
2489 linux/macosx.
2490 * New: |netrw-mg| (apply vimgrep to marked files)
2491 May 05, 2008 * (Rick) pointed out that a "setlocal ts=32" was
2492 interfering with g:netrw_maxfilenamelen
2493 May 05, 2008 * (James Vega) a file inside a linked directory
2494 was showing up as a symbolic link itself.
2495 May 22, 2008 * symbolic links, fifos, and sockets are now
2496 indicated by a trailing @, |, or =, respectively.
2497 Jun 06, 2008 * Removed numerous bugs from the marked file
2498 move and copy. Tested these changes under
2499 Unix only thus far.
2500 * :Rexplore returns to the screen position in the
2501 netrw listing from whence the file was edited
2502 v124: Apr 02, 2008 * (Adrian Rollett) change the line supporting the
2503 "x" action for mac to use g:netrw_shq
2504 v123: Feb 27, 2008 * Marked files now keeps a "global" marked file
2505 list. The global marked file list is used to
2506 support tag processing and vimdiff'ing
2507 (|netrw-md| |netrw-mt|)
2508 * Been insuring that mm and mc works with various
2509 combinations of local and remote directories
2510 * (Stefan Bittner) http://.../ should always have
2511 filetype "html" -- fixed.
2512 * (Stefan Bittner) a "?" in a http://.../ request
2513 wasn't being handled correctly. Fixed by
2514 removing ? from default |g:netrw_tmpfile_escape|.
2515 * (Nico Weber) % codes in http://.../ requests
2516 weren't being handled correctly. Fixed by
2517 including % in default |g:netrw_fname_escape|.
2518 * (Stefan Bittner) attempts to update Buffers.Refresh
2519 were failing because locale use changed the menu
2520 names. I implemented a workaround.
2521 v122: Feb 12, 2008 * bugfix - first sorting sequence match now has
2522 priority
2523 Feb 14, 2008 * bugfix - sorting sequence was effectively ignoring
2524 sequencing priority of anything following '*'
2525 * toggling a marked file was showing incorrect list
2526 (list was correct, but displayed matches weren't)
2527 * |g:netrw_special_syntax| implemented
2528 v121: Feb 11, 2008 * Bram M reported that :e file ... :e . would not
2529 retain the alternate file. Fixed -- I hope!
2530 * bugfix -- apparently v120 broke an explicit
2531 :Explore dirname
2532 v120: Jan 21, 2008 * |netrw-mt| changed to allow for target selection
2533 based on whether or not word under cursor is a
2534 directory or file, or if cursor is in banner
2535 area.
2536 * |netrw-mh| included (hiding by marked-file suffix)
2537 * functions moved about a bit (improved
2538 categorization)
2539 * executable files now displayed with trailing (*)
2540 * symbolically linked files now displayed with
2541 trailing (@)
2542 * Somewhen, s:NetrwMarkFileMove() got damaged. Its
2543 now restored (missing an endif, for example).
2544 * |netrw-mu| implemented (unmarking marked files)
2545 * many bugs have been removed from the marked file
2546 system (tnx to Mark S. for feedback)
2547 * |netrw-ms| implemented (sourcing marked files)
2548 * fixed use of P with tree listing style
2549 * multiple tree listing now supported
2550 * ./ suppressed
2551 * changed q -> qb (query bookmarks)
2552 * implemented |netrw-qf|
2553 * Explore now has four special list-generation
2554 modes: */filepat **/filepat
2555 *//pattern **//pattern
2556 * gh (|netrw-gh|) is a shortcut for toggling the
2557 hiding of files and directories beginning with a
2558 dot
2559 v119: Jan 10, 2008 * When g:netrw_keepdir is false,
2560 NetrwOptionsRestore() had a problem
2561 (Bill McCarthy)
2562 Jan 11, 2008 * Netrw now shows symbolic links with a trailing
2563 "@" and special highlighting.
2564 Jan 15, 2008 * Changed g:netrw_noretmap -> |g:netrw_retmap|.
2565 Changed: disabled by default at Bram's
2566 preference.
2567 v118: Jan 02, 2008 * Fixed a problem with Windows;
2568 :Explore c:/path/ would not work,
2569 but :Explore c:/path would.
2570 * Fixed a bug in s:NetrwOptionRestore() - lcd's
2571 argument wasn't being properly escaped so it
2572 wouldn't handle spaces in directory names.
2573 (Gary Johnson)
2574 v117: Jan 02, 2008 * Fixed a problem with P; had to include
2575 a b:netrw_curdir bypass (Bram Moolenaar)
2576 v116: Nov 27, 2007 * netrw#LocalBrowseCheck() has &ft=="netrw"
2577 check to prevent doing a directory listing
2578 (was getting unexpected directory refreshes
2579 in the middle of some function calls)
2580 * NetrwOptionRestore moved after e! filename
2581 in order to retain user options for editing
2582 in s:NetrwBrowseChgDir()
2583 Dec 12, 2007 * Bug fix -- netrw does a better job of retaining
2584 user options when editing files under the aegis
2585 of the browser
2586 v115: Oct 04, 2007 * Erik Remmelzwaal pointed out that the use of
2587 shellslash in s:GetTempfile() was incorrect
2588 Oct 11, 2007 * Tracked down and eliminated a bug with editing
2589 remote *.tar.gz and *.tar.bz2 files
2590 Oct 11, 2007 * g:netrw_localmovecmd wasn't being initialized
2591 properly, and g:netrw_localcopycmd was being
2592 overwritten.
2593 Oct 12, 2007 * Placed all :Rexplore and <2-leftmouse> setup
2594 in a new support function (s:SetRexDir()).
2595 Oct 15, 2007 * new: g:netrw_browse_split == 4; means <cr>
2596 based selection will use previous window
2597 Oct 20, 2007 * also checks on |'shellxquote'| to set g:netrw_shq
2598 Oct 24, 2007 * Explore handles path/**/filename
2599 Oct 27, 2007 * sourcing remote files often didn't work with ftp,
2600 turns out that b:netrw_method was undefined, so
2601 s:SaveBufVars and s:RestoreBufVars() fixed it.
2602 v114: Sep 28, 2007 * mT, the map that invokes tags, has been improved
2603 to support use of remote tags files.
2604 Oct 02, 2007 * changed Netrw menu to use more submenus
2605 v113: Sep 07, 2007 * worked out why the cursor position wasn't being
2606 saved and restored as intended after doing such
2607 things as deleting and renaming files.
2608 Sep 11, 2007 * Fixed bug which effectively disabled <c-l> and
2609 <c-h> maps
2610 Sep 18, 2007 * there used to be one NetrwOptionRestore() call at
2611 the end of the s:NetrwBrowseChgDir() function;
2612 they're now at the end of every if..elseif..else
2613 block. The edit-a-file one is not quite at the end
2614 of its block; instead, its just before the edit.
2615 Restores user options, then this new placement
2616 allows ftplugins, autocmds, etc to change settings
2617 (ex. ftplugin/cpp.vim sets cindent).
2618 Sep 19, 2007 * changed all strlen() calls to use s:Strlen(), a
2619 function which handles utf-8 wide characters
2620 correctly.
2621 Sep 20, 2007 * (Nico Weber) the "x" command has been extended
2622 to Mac's OS/X (macunix); it now uses open to
2623 handle |netrw-x| browsing with special files.
2624 Sep 22, 2007 * Added g:netrw_noretmap to netrw at Tony M's
2625 request.
2626 * Included path to NetrwRemoteRmFile()
2627 v112: Aug 18, 2007 * added mx (|netrw-mx|) for executing arbitrary
2628 commands on marked files
2629 Aug 22, 2007 * more option save/restore work for
2630 s:NetrwBrowseChgDir(); s:NetrwOptionSave()
2631 and s:NetrwOptionRestore() now take a parameter
2632 specifying the type of variables to be used for
2633 saving and restoring (either "w:" or "s:")
2634 Sep 04, 2007 * added the :NetrwClean[!] command
2635 v111: Jul 25, 2007 * using Windows but not using Cygwin, netrw does a
2636 "file bufname" where the bufname uses /s
2637 instead of \s; Vim "fixes" it by changing the
2638 bufname to use \s anyway. This meant that
2639 NetrwGetBuffer() didn't find the appropriately
2640 named buffer, and so would generate a new
2641 buffer listing; hence the cursor would appear
2642 to have been moved when doing a preview.
2643 * added <2-leftmouse> map to return to netrw's
2644 browser display
2645 Aug 16, 2007 * added the mark-file system, including
2646 maps for mf mp mt mz and mu. Modifications
2647 made to maps for a D O and R to support
2648 marked files.
2649 v110: May 10, 2007 * added [ and ] maps to NetrwTreeListing
2650 May 25, 2007 * |g:netrw_preview| included
2651 May 29, 2007 * modifed netrw#NetBrowseX to consistently use
Bram Moolenaarc236c162008-07-13 17:41:49 +00002652 g:netrw_shq instead of hardcoded quotes,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002653 and modified the snippet that sets up redir
2654 so Windows machines use "nul" instead of
2655 "/dev/null".
2656 Jun 01, 2007 * fixed bug -- NetGetBuffer() wasn't always
2657 recognizing a buffer name match when it should,
2658 thus resulting in [Scratch] buffers.
2659 Jun 04, 2007 * Gary Johnson found a bugfix for the "c" mapping
2660 when the directory is to be made current but
2661 the name contains spaces.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00002662 v109: Mar 26, 2007 * if a directory name includes a "$" character,
2663 Explore() will use expand() in an attempt to
2664 decipher the name.
2665 May 07, 2007 * g:netrw_use_errorwindow now allows one to
Bram Moolenaar446cb832008-06-24 21:56:24 +00002666 have error messages go to a reliable window
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00002667 or to use a less reliable but recallable
2668 echoerr method
2669 May 07, 2007 * g:netrw_scpport and g:netrw_sshport support
Bram Moolenaar446cb832008-06-24 21:56:24 +00002670 use of -P and -p, respectively, to set port
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00002671 for scp/ssh.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002672 v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting
2673 remote browsing
2674 * netrw can now source remote files
2675 Jan 26, 2007 * Colton Jamieson noted that remote directory
2676 browsing did not support alternate port
2677 selection. This feature has now been extended
2678 to apply to all remote browsing commands via ssh.
2679 (list, remove/delete, rename)
2680 Jan 31, 2007 * Luis Florit reported that @* was an invalid
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00002681 register. The @* register is now only saved and
2682 restored if |'guioptions'| contains "a".
Bram Moolenaar9964e462007-05-05 17:54:07 +00002683 Feb 02, 2007 * Fixed a bug that cropped up when writing files
2684 via scp using cygwin
2685 Feb 08, 2007 * tree listing mode managed to stop working again;
2686 fixed again!
2687 Feb 15, 2007 * Guido Van Hoecke reported that netrw didn't
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00002688 handle browsing well with M$ ftp servers. He even
Bram Moolenaar9964e462007-05-05 17:54:07 +00002689 set up a temporary account for me to test with
2690 (thanks!). Netrw now can browse M$ ftp servers.
2691 v107: Oct 12, 2006 * bypassed the autowrite option
2692 Oct 24, 2006 * handles automatic decompression of *.gz and *.bz2
2693 files
2694 Nov 03, 2006 * Explore will highlight matching files when
2695 **/pattern is used (and if the |'hls'| option
2696 is set)
2697 Nov 09, 2006 * a debugging line, when enabled, was inadvertently
2698 bringing up help instead of simply reporting on
2699 list contents
2700 Nov 21, 2006 * tree listing improved (cursor remains put)
2701 Nov 27, 2006 * fixed b:netrw_curdir bug when repeated "i"s were
2702 pressed.
2703 Dec 15, 2006 * considerable qty of changes, mostly to share more
2704 code between local and remote browsing. Includes
2705 support for tree-style listing for both remote
2706 and local browsing.
2707 Dec 15, 2006 * Included Peter Bengtsson's modifications to
2708 support the Amiga.
2709 v106: Sep 21, 2006 * removed old v:version<700 code as netrw now
2710 requires vim 7.0
2711 * worked around a bug where register * was
2712 overwritten during local browsing
2713 v104: Sep 05, 2006 * as suggested by Rodolfo Borges, :Explore and
2714 variants will position the cursor on the file
2715 just having been edited
2716 * changed default |g:netrw_sort_sequence| order
2717 * changed b, Nb to simply mb (see |netrw-mb|)
2718 * changed B, NB to simply gb (see |netrw-gb|)
2719 * tree listing style (see |g:netrw_liststyle|)
2720 * attempts to retain the alternate file
2721 v103: Jul 26, 2006 * used Yakov Lerner's tip#1289 to improve netrw
2722 error message display
2723 * wide listings didn't handle files with backslashes
2724 in their names properly. A symptom was an
2725 inability to open files.
2726 Aug 09, 2006 * included "t" mapping for opening tabbed windows,
2727 both for remote and local browsing
2728 * changed netrw_longlist to netrw_liststyle
2729 Aug 15, 2006 * fixed one of the NB maps
2730 Aug 22, 2006 * changed *Explore commands to use -nargs=* instead
2731 of -nargs=?. Allows both -complete=dir _and_ the
2732 starstar arguments to work (-nargs=? seems to
2733 require one or the other).
2734 Aug 23, 2006 * copied all w:.. variables across splits to
2735 new windows
2736 Aug 25, 2006 * when g:netrw_browsex_viewer was '-'
2737 (see |g:netrw_browsex_viewer|) it wasn't causing
2738 netrwFileHandlers#Invoke() to be called as it
2739 was expected to. (tnx Steve Dugaro)
2740 Aug 29, 2006 * changed NetBrowseX() to use "setlocal ... noswf"
2741 instead of "set ... noswf" (tnx Benji Fisher)
2742 Aug 31, 2006 * tabs and fastbrowse<=1 didn't work together.
2743 v102: Jun 15, 2006 * chgd netrwPlugin to call netrw#LocalBrowseCheck()
2744 * bugfix: g:netrw_keepdir==0 had stopped working
2745 Jul 06, 2006 * bugfix: NetOptionSave/Restore now saves/restores
2746 the unnamed register (|registers|)
2747 Jul 07, 2006 * |g:netrw_menu| support included
2748 Jul 13, 2006 * :Texplore command implemented
2749 Jul 17, 2006 * NetSplit and (Local|Net)BrowseChgDir() were both
2750 splitting windows. This affected o, v, and
2751 g:netrw_browse_split.
2752 Jul 20, 2006 * works around wildignore setting (was causing
2753 netrw's local browser not to list wildignore'd
2754 files)
2755 Jul 24, 2006 * <leftmouse> acts as a <cr> for selecting a file
2756 <rightmouse> acts as a <del> for deleting a file
2757 v100: May 14, 2006 * when using Windows and shell==cmd.exe, the
2758 default for g:netrw_ignorenetrc is now 1
2759 * bugfix: unwanted ^Ms now removed
2760 (affected shell==cmd.exe - Windows)
2761 * added Bookmarks and History to the menu
2762 * an error message about non-existing
2763 w:netrw_longlist was appearing during attempts to
2764 Explore (fixed)
2765 * g:netrw_shq now available to make netrw use
2766 specified style of quotes for commands
2767 May 29, 2006 * user NFH_*() functions were inadvertently being
2768 ignored
2769 * fixed a Windows non-cygwin ftp handling problem.
2770 * hiding pattern candidate separators included some
2771 characters it shouldn't have (tnx to Osei Poku)
2772 Jun 01, 2006 * for browsing, netrw was supposed to use "dir"
2773 instead of "ls -lF" when using
2774 ftp+non-cygwin+windows. Fixed.
2775 * an inadvertently left-in-place debugging statement
2776 was preventing use of the "x" key with browsing.
2777 Jun 05, 2006 * g:netrw_nogx available to prevent making the gx
2778 map (see |g:netrw_nogx|)
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00002779 * bugfix, Explore wouldn't change directory
Bram Moolenaar9964e462007-05-05 17:54:07 +00002780 properly (vim ., :Explore subdirname)
2781 Jun 06, 2006 * moved history to 2nd line in Netrw menu
2782 * fixed delete for unix-based systems
2783 Jun 07, 2006 * x key now works for windows-noncygwin-ftp
2784 Jun 08, 2006 * Explore */pat and **//pat now wraps
2785 v99: May 09, 2006 * g:netrw_browse_split=3 for opening files in new
2786 tabs implemented.
2787 May 12, 2006 * deletes temporary file at end of NetRead()
2788 * visual mode based Obtain implemented
2789 * added -complete=dir to the various Explore
2790 commands
2791 v98: May 02, 2006 * the "p" key didn't work properly when the browsing
2792 directory name had spaces in it.
2793 v97: May 01, 2006 * exists("&acd") now used to determine if
2794 the 'acd' option exists
2795 * "obtain" now works again under Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002796 v96: * bugfix - the |'acd'| option is not always defined
2797 but is now bypassed only when it is
2798 v95: * bugfix - Hiding mode worked correctly (don't show
2799 any file matching any of the g:netrw_hide
2800 patterns), but showing mode was showing only those
2801 files that didn't match any of the g:netrw_hide
2802 patterns. Instead, it now shows all files that
2803 match any of the g:netrw_hide patterns (the
2804 difference between a logical and and logical or).
2805 v94: * bugfix - a Decho() had a missing quote; only
2806 affects things when debugging was enabled.
2807 v93: * bugfix - removed FocusGained event from causing a
2808 slow-browser refresh for Windows
2809 v92: * :Explore **//pattern implemented
2810 (**/filepattern was already taken)
2811 v91: * :Explore */pattern implemented
2812 * |'acd'| option bypassed
2813 v90: * mark ', as suggested by Yegappan Lakshmanan, used
2814 to help guarantee entry into the jump list when
2815 appropriate.
2816 * <s-down> and <s-up> are no longer defined until a
2817 :Explore **/pattern is used (if the user already
2818 has a map for them). They will be defined for new
2819 browser windows from that point forward.
2820 v89: * A <s-down>, <s-up>, :Nexplore, or a :Pexplore
2821 without having first done an :Explore **/pattern
2822 (see |netrw-starstar|) caused
2823 a lot of unhelpful error messages to appear
2824 v88: * moved DrChip.Netrw menu to Netrw. Now has
2825 priority 80 by default.
2826 g:NetrwTopLvlMenu == "Netrw" and can be changed
2827 by the user to suit. The priority is given by
2828 g:NetrwMenuPriority.
2829 * Changed filetype for browser displays from
2830 netrwlist to netrw.
2831 v87: * bug fix -- menus were partially disappearing
2832 v85: * bug fix -- missing an endif
2833 * bug fix -- handles spaces in names and directories
2834 when using ftp-based browsing
2835 v83: * disabled stop-acd handling; the change in directory
2836 handling may allow acd to be used again.
2837 * D was refusing to delete remote files/directories
2838 in wide listing mode.
2839 v81: * FocusGained also used to refresh/wipe local browser
2840 directory buffers
2841 * (bugfix) netrw was leaving [Scratch] buffers behind
2842 when the user had the "hidden" option set. The
2843 'hidden' option is now bypassed.
2844 v80: * ShellCmdPost event used in conjunction with
2845 g:netrw_fastbrowse to refresh/wipe local browser
2846 directory buffers.
2847 v79: * directories are now displayed with nowrap
2848 * (bugfix) if the column width was smaller than the
2849 largest file's name, then netrw would hang when
2850 using wide-listing mode - fixed
2851 * g:netrw_fastbrowse introduced
2852 v78: * progress has been made on allowing spaces inside
2853 directory names for remote work (reading, writing,
2854 browsing). (scp)
2855 v77: * Mikolaj Machowski fixed a bug in a substitute cmd
2856 * g:netrw_browsex_viewer implemented
2857 * Mikolaj Machowski pointed out that gnome-open is
2858 often executable under KDE systems, although it is
2859 effectively not functional. NetBrowseX now looks
2860 for "kicker" as a running process to determine if
2861 KDE is actually running.
2862 * Explorer's O functionality was inadvertently left
2863 out. Netrw now does the same thing, but with the
2864 "P" key.
2865 * added g:netrw_browse_split option
2866 * fixed a bug where the directory contained a "." but
2867 the file didn't (was treating the dirname from "."
2868 onwards as a suffix)
2869 v76: * "directory is missing" error message now restores
2870 echo highlighting
2871 v75: * file://... now conforms to RFC2396 (thanks to
2872 S. Zacchiroli)
2873 * if the binary option is set, then NetWrite() will
2874 only write the whole file (line numbers don't make
2875 sense with this). Supports writing of tar and zip
2876 files.
2877 v74: * bugfix (vim, then :Explore) now works
2878 * ctrl-L keeps cursor at same screen location (both
2879 local and remote browsing)
2880 * netrw now can read remote zip and tar files
2881 * Obtain now uses WinXP ftp+.netrc successfully
2882 v73: * bugfix -- scp://host/path/file was getting named
2883 incorrectly
2884 * netrw detects use of earlier-than-7.0 version of
2885 vim and issues a pertinent error message.
2886 * netrwSettings.vim is now uses autoloading. Only
2887 <netrwPlugin.vim> is needed as a pure plugin
2888 (ie. always loaded).
2889 v72: * bugfix -- formerly, one could prevent the loading
2890 of netrw by "let g:loaded_netrw=1"; when
2891 autoloading became supported, this feature was
2892 lost. It is now restored.
2893 v71: * bugfix -- made some "set nomodifiable"s into
2894 setlocal variants (allows :e somenewfile to be
2895 modifiable as usual)
2896 * NetrwSettings calls a netrw function, thereby
2897 assuring that netrw has loaded. However, if netrw
2898 does not load for whatever reason, then
2899 NetrwSettings will now issue a warning message.
2900 * For what reason I don't recall, when wget and fetch
2901 are both not present, and an attempt to read a
2902 http://... url is made, netrw exited. It now only
2903 returns.
2904 * When ch=1, on the second and subsequent uses of
2905 browsing Netrw would issue a blank line to clear
2906 the echo'd messages. This caused an annoying
2907 "Hit-Enter" prompt; now a blank line message
2908 is echo'd only if &ch>1.
2909 v70: * when using |netrw-O|, the "Obtaining filename"
2910 message is now shown using |hl-User9|. If User9
2911 has not been defined, netrw itself will define it.
2912 v69: * Bugfix: win95/98 machines were experiencing a
2913 "E121: Undefined variable: g:netrw_win95ftp"
2914 message
2915 v68: * double-click-leftmouse selects word under mouse
2916 v67: * Passwords which contain blanks will now be
2917 surrounded by double-quotes automatically (Yongwei)
2918 v66: * Netrw now seems to work with a few more Windows
2919 situations
2920 * O now obtains a file: remote browsing
2921 file -> local copy, locally browsing
2922 file -> current directory (see :pwd)
2923 * i now cycles between thin, long, and wide listing
2924 styles
2925 * NB and Nb are maps that are always available;
2926 corresponding B and b maps are only available when
2927 not using wide listing in order to allow them to
2928 be used for motions
2929 v65: * Browser functions now use NetOptionSave/Restore; in
2930 particular, netrw now works around the report
2931 setting
2932 v64: * Bugfix - browsing a "/" directory (Unix) yielded
2933 buffers named "[Scratch]" instead of "/"
2934 * Bugfix - remote browsing with ftp was omitting
2935 the ./ and ../
2936 v63: * netrw now takes advantage of autoload (needs 7.0)
2937 * Bugfix - using r (to reverse sort) working again
2938 v62: * Bugfix - spaces allowed again in directory names
2939 with g:netrw_keepdir=0. In fact, I've tested netrw
2940 with most ANSI punctuation marks for directory
2941 names.
2942 * Bugfix - NetrwSettings gave errors when
2943 g:netrw_silent had not be set.
2944 v61: * Document upgrade -- netrw variable-based settings
2945 all should have tags. Supports NetrwSettings cmd.
2946 * Several important variables are window-oriented.
2947 Netrw has to transfer these across a window split.
2948 See s:BufWinVars() and s:UseBufWinVars().
2949 v60: * When using the i map to switch between long and
2950 short listings, netrw will now keep cursor on same
2951 line
2952 * "Match # of #" now uses status line
2953 * :Explore **/*.c will now work from a
2954 non-netrw-browser window
2955 * :Explore **/patterns can now be run in separate
2956 browser windows
2957 * active banner (hit <cr> will cause various things
2958 to happen)
2959 v59: * bugfix -- another keepalt work-around installed
2960 (for vim6.3)
2961 * "Match # of #" for Explore **/pattern matches
2962 v58: * Explore and relatives can now handle
2963 **/somefilepattern (v7)
2964 * Nexplore and Pexplore introduced (v7). shift-down
2965 and shift-up cursor keys will invoke Nexplore and
2966 Pexplore, respectively.
2967 * bug fixed with o and v
2968 * autochdir only worked around for vim when it has
2969 been compiled with either
2970 |+netbeans_intg| or |+sun_workshop|
2971 * Under Windows, all directories and files were
2972 being preceded with a "/" when local browsing.
2973 Fixed.
2974 * When: syntax highlighting is off, laststatus=2, and
2975 remote browsing is used, sometimes the laststatus
2976 highlighting bleeds into the entire display. Work
2977 around - do an extra redraw in that case.
2978 * Bugfix: when g:netrw_keepdir=0, due to re-use of
2979 buffers, netrw didn't change the directory when it
2980 should've
2981 * Bugfix: D and R commands work again
2982 v57: * Explore and relatives can now handle RO files
2983 * reverse sort restored with vim7's sort command
2984 * g:netrw_keepdir now being used to keep the current
2985 directory unchanged as intended (sense change)
2986 * vim 6.3 still supported
2987 v56: * LocalBrowse now saves autochdir setting, unsets it,
2988 and restores it before returning.
2989 * using vim's rename() instead of system +
2990 local_rename variable
2991 * avoids changing directory when g:netrw_keepdir is
2992 false
2993 v55: * -bar used with :Explore :Sexplore etc to allow
2994 multiple commands to be separated by |s
2995 * browser listings now use the "nowrap" option
2996 * browser: some unuseful error messages now
2997 suppressed
2998 v54: * For backwards compatibility, Explore and Sexplore
2999 have been implemented. In addition, Hexplore and
3000 Vexplore commands are available, too.
3001 * <amatch> used instead of <afile> in the
3002 transparency support (BufReadCmd, FileReadCmd,
3003 FileWriteCmd)
3004 * ***netrw*** prepended to various error messages
3005 netrw may emit
3006 * g:netrw_port used instead of b:netrw_port for scp
3007 * any leading [:#] is removed from port numbers
3008 v53: * backslashes as well as slashes placed in various
3009 patterns (ex. g:netrw_sort_sequence) to better
3010 support Windows
3011 v52: * nonumber'ing now set for browsing buffers
3012 * when the hiding list hid all files, error messages
3013 ensued. Fixed
3014 * when browsing, swf is set, but directory is not
3015 set, when netrw was attempting to restore options,
3016 vim wanted to save a swapfile to a local directory
3017 using an url-style path. Fixed
3018 v51: * cygwin detection now automated
3019 (using windows and &shell is bash)
3020 * customizable browser "file" rejection patterns
3021 * directory history
3022 * :[range]w url now supported (ie. netrw uses a
3023 FileWriteCmd event)
3024 * error messages have a "Press <cr> to continue" to
3025 allow them to be seen
3026 * directory browser displays no longer bother the
3027 swapfile
3028 * u/U commands to go up and down the history stack
3029 * history stack may be saved with viminfo with it's
3030 "!" option
3031 * bugfixes associated with unwanted [No Files]
3032 entries
3033 v50: * directories now displayed using buftype=nofile;
3034 should keep the directory names as-is
3035 * attempts to remove empty "[No File]" buffers
3036 leftover from :file ..name.. commands
3037 * bugfix: a "caps-lock" editing difficulty left in
3038 v49 was fixed
3039 * syntax highlighting for "Showing:" the hiding list
3040 included
3041 * bookmarks can now be retained if "!" is in the
3042 viminfo option
3043 v49: * will use ftp for http://.../ browsing
3044 v48: * One may use ftp to do remote host file browsing
3045 * (windows and !cygwin) remote browsing with ftp can
3046 now use the "dir" command internally to provide
3047 listings
3048 * g:netrw_keepdir now allows one to keep the initial
3049 current directory as the current directory
3050 (normally the local file browser makes the
3051 currently viewed directory the current directory)
3052 * g:netrw_alto and g:netrw_altv now support
3053 alternate placement of windows started with o or v
3054 * Nread ? and Nwrite ? now uses echomsg (instead of
3055 echo) so :messages can repeat showing the help
3056 * bugfix: avoids problems with partial matches of
3057 directory names to prior buffers with longer names
3058 * one can suppress error messages with g:netrw_quiet
3059 ctrl-h used
3060 * instead of <Leader>h for editing hiding list one
3061 may edit the sorting sequence with the S map, which
3062 now allows confirmation of deletion with
3063 [y(es) n(o) a(ll) q(uit)]
3064 * the "x" map now handles special file viewing with:
3065 (windows) rundll32 url.dll (gnome) gnome-open (kde)
3066 kfmclient If none of these are on the executable
3067 path, then netrwFileHandlers.vim is used.
3068 * directory bookmarking during both local and remote
3069 browsing implemented
3070 * one may view all, use the hiding list to suppress,
3071 or use the hiding list to show-only remote and
3072 local file/directory listings
3073 * improved unusual file and directory name handling
3074 preview window support
3075 v47: * now handles local browsing.
3076 v46: * now handles remote browsing
3077 * g:netrw_silent (if 1) will cause all transfers to
3078 be silent
3079 v45: * made the [user@]hostname:path form a bit more
3080 restrictive to better handle errors in using
3081 protocols (e.g. scp:usr@host:file was being
3082 recognized as an rcp request)
3083 v44: * changed from "rsync -a" to just "rsync"
3084 * somehow an editing error messed up the test to
3085 recognize use of the fetch method for NetRead.
3086 * more debugging statements included
3087 v43: * moved "Explanation" comments to <pi_netrw.txt> help
3088 file as "Network Reference" (|netrw-ref|)
3089 * <netrw.vim> now uses Dfunc() Decho() and Dret() for
3090 debugging
3091 * removed superfluous NetRestorePosn() calls
3092 v42: * now does BufReadPre and BufReadPost events on
3093 file:///* and file://localhost/*
3094 v41: * installed file:///* and file://localhost/* handling
3095 v40: * prevents redraw when a protocol error occurs so
3096 that the user may see it
3097 v39: * sftp support
3098 v38: * Now uses NetRestorePosn() calls with Nread/Nwrite
3099 commands
3100 * Temporary files now removed via bwipe! instead of
3101 bwipe (thanks to Dave Roberts)
3102 v37: * Claar's modifications which test if ftp is
3103 successful, otherwise give an error message
3104 * After a read, the alternate file was pointing to
3105 the temp file. The temp file buffer is now wiped
3106 out.
3107 * removed silent from transfer methods so user can
3108 see what's happening
Bram Moolenaar071d4272004-06-13 20:20:40 +00003109
3110
3111==============================================================================
Bram Moolenaar9964e462007-05-05 17:54:07 +0000311212. Credits *netrw-credits* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00003113
3114 Vim editor by Bram Moolenaar (Thanks, Bram!)
3115 dav support by C Campbell
3116 fetch support by Bram Moolenaar and C Campbell
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003117 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
Bram Moolenaar071d4272004-06-13 20:20:40 +00003118 http support by Bram Moolenaar <bram@moolenaar.net>
3119 rcp
3120 rsync support by C Campbell (suggested by Erik Warendorph)
3121 scp support by raf <raf@comdyn.com.au>
3122 sftp support by C Campbell
3123
3124 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
3125
3126 Jérôme Augé -- also using new buffer method with ftp+.netrc
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003127 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003128 fetch,...
Bram Moolenaar071d4272004-06-13 20:20:40 +00003129 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
3130 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
3131 variables, rsync etc)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003132 Doug Claar -- modifications to test for success with ftp
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003133 operation
Bram Moolenaar071d4272004-06-13 20:20:40 +00003134
3135==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00003136Modelines: {{{1
Bram Moolenaar83bab712005-08-01 21:58:57 +00003137 vim:tw=78:ts=8:ft=help:norl:fdm=marker