1668
|
1 *pi_netrw.txt* For Vim version 7.2b. Last change: 2008 Jul 13
|
7
|
2
|
1121
|
3 -----------------------------------------------------
|
|
4 NETRW REFERENCE MANUAL by Charles E. Campbell, Jr.
|
|
5 -----------------------------------------------------
|
7
|
6
|
559
|
7
|
1621
|
8 *dav* *ftp* *netrw-file* *Nread* *rcp* *scp*
|
|
9 *davs* *http* *netrw.vim* *Nsource* *rsync* *sftp*
|
|
10 *fetch* *netrw* *network* *Nwrite*
|
7
|
11
|
|
12 ==============================================================================
|
1621
|
13 1. Contents *netrw-contents* {{{1
|
7
|
14
|
1121
|
15 1. Contents.............................................|netrw-contents|
|
|
16 2. Starting With Netrw..................................|netrw-start|
|
|
17 3. Netrw Reference......................................|netrw-ref|
|
1621
|
18 EXTERNAL APPLICATIONS AND PROTOCOLS................|netrw-externapp|
|
482
|
19 READING............................................|netrw-read|
|
|
20 WRITING............................................|netrw-write|
|
|
21 DIRECTORY LISTING..................................|netrw-dirlist|
|
|
22 CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
|
1621
|
23 VARIABLES AND SETTINGS.............................|netrw-variables|
|
482
|
24 PATHS..............................................|netrw-path|
|
1121
|
25 4. Network-Oriented File Transfer.......................|netrw-xfer|
|
459
|
26 NETRC..............................................|netrw-netrc|
|
|
27 PASSWORD...........................................|netrw-passwd|
|
1121
|
28 5. Activation...........................................|netrw-activate|
|
1621
|
29 6. Transparent File Editing.............................|netrw-transparent|
|
1121
|
30 7. Ex Commands..........................................|netrw-ex|
|
|
31 8. Variables and Options................................|netrw-var|
|
1621
|
32 9. 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|
|
459
|
37 Browsing...........................................|netrw-cr|
|
1621
|
38 Browsing With A Horizontally Split Window..........|netrw-o|
|
|
39 Browsing With A New Tab............................|netrw-t|
|
|
40 Browsing With A Vertically Split Window............|netrw-v|
|
1121
|
41 Change Listing Style...............................|netrw-i|
|
1621
|
42 Changing To A Bookmarked Directory.................|netrw-gb|
|
459
|
43 Changing To A Predecessor Directory................|netrw-u|
|
|
44 Changing To A Successor Directory..................|netrw-U|
|
|
45 Customizing Browsing With A User Function..........|netrw-x|
|
1621
|
46 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|
|
459
|
57 Making The Browsing Directory The Current Directory|netrw-c|
|
1621
|
58 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|
|
1121
|
83 10. Problems and Fixes...................................|netrw-problems|
|
1621
|
84 11. Debugging Netrw Itself...............................|netrw-debug|
|
1121
|
85 12. History..............................................|netrw-history|
|
|
86 13. Credits..............................................|netrw-credits|
|
7
|
87
|
|
88 {Vi does not have any of this}
|
|
89
|
|
90 ==============================================================================
|
1621
|
91 2. Starting With Netrw *netrw-start* {{{1
|
|
92
|
|
93 Netrw makes reading files, writing files, browsing over a network, and
|
|
94 browsing locally easy! First, make sure that you have plugins enabled, so
|
|
95 you'll need to have at least the following in your <.vimrc>:
|
|
96 (or see |netrw-activate|) >
|
650
|
97
|
1121
|
98 set nocp " 'compatible' is not set
|
|
99 filetype plugin on " plugins are enabled
|
650
|
100 <
|
|
101 (see |'cp'| and |:filetype-plugin-on|)
|
|
102
|
|
103 Netrw 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
|
1621
|
105 account on some other machine; if you can use scp, try: >
|
650
|
106
|
|
107 vim scp://hostname/path/to/file
|
|
108 <
|
1621
|
109 Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
|
|
110
|
|
111 So, what if you have ftp, not ssh/scp? That's easy, too; try >
|
650
|
112
|
|
113 vim ftp://hostname/path/to/file
|
|
114 <
|
|
115 Want 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
|
|
117 permissions for only the user to read (ie. not group, world, other, etc),
|
|
118 and has lines resembling >
|
|
119
|
|
120 machine HOSTNAME login USERID password "PASSWORD"
|
|
121 machine HOSTNAME login USERID password "PASSWORD"
|
|
122 ...
|
1121
|
123 default login USERID password "PASSWORD"
|
650
|
124 <
|
1621
|
125 Now about browsing -- when you just want to look around before editing a
|
650
|
126 file. For browsing on your current host, just "edit" a directory: >
|
|
127
|
|
128 vim .
|
|
129 vim /home/userid/path
|
|
130 <
|
|
131 For browsing on a remote host, "edit" a directory (but make sure that
|
|
132 the directory name is followed by a "/"): >
|
|
133
|
|
134 vim scp://hostname/
|
|
135 vim ftp://hostname/path/to/dir/
|
|
136 <
|
|
137 See |netrw-browse| for more!
|
|
138
|
1621
|
139 There are more protocols supported by netrw just than scp and ftp, too: see the
|
|
140 next section, |netrw-externapp|, for how to use these external applications.
|
|
141
|
|
142 If you want to use plugins, but for some reason don't wish to use netrw, then
|
|
143 you need to avoid loading both the plugin and the autoload portions of netrw.
|
|
144 You 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 <
|
650
|
149
|
|
150 ==============================================================================
|
1621
|
151 3. Netrw Reference *netrw-ref* {{{1
|
|
152
|
|
153 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
|
|
158 EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
|
7
|
159
|
482
|
160 Protocol Variable Default Value
|
|
161 -------- ---------------- -------------
|
|
162 dav: *g:netrw_dav_cmd* = "cadaver"
|
650
|
163 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
|
482
|
164 ftp: *g:netrw_ftp_cmd* = "ftp"
|
1621
|
165 http: *g:netrw_http_cmd* = "curl -o" if curl is available
|
|
166 http: g:netrw_http_cmd = "wget -q -O" elseif wget is available
|
|
167 http: g:netrw_http_cmd = "fetch -o" elseif fetch is available
|
482
|
168 rcp: *g:netrw_rcp_cmd* = "rcp"
|
|
169 rsync: *g:netrw_rsync_cmd* = "rsync -a"
|
|
170 scp: *g:netrw_scp_cmd* = "scp -q"
|
|
171 sftp: *g:netrw_sftp_cmd* = "sftp"
|
7
|
172
|
1621
|
173 READING *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
|
7
|
182 :Nread ? give help
|
22
|
183 :Nread "machine:path" uses rcp
|
482
|
184 :Nread "machine path" uses ftp w/ <.netrc>
|
22
|
185 :Nread "machine id password path" uses ftp
|
|
186 :Nread "dav://machine[:port]/path" uses cadaver
|
|
187 :Nread "fetch://[user@]machine/path" uses fetch
|
482
|
188 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
|
22
|
189 :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
|
7
|
194
|
1621
|
195 WRITING *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
|
794
|
204 :Nwrite ? give help
|
22
|
205 :Nwrite "machine:path" uses rcp
|
482
|
206 :Nwrite "machine path" uses ftp w/ <.netrc>
|
22
|
207 :Nwrite "machine id password path" uses ftp
|
|
208 :Nwrite "dav://machine[:port]/path" uses cadaver
|
482
|
209 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
|
22
|
210 :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
|
7
|
214 http: not supported!
|
|
215
|
1621
|
216 SOURCING *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
|
1121
|
225 :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
|
1621
|
235 DIRECTORY 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
|
9
|
249 :Nread [protocol]://[user]@hostname/path/
|
|
250
|
1621
|
251 *netrw-login* *netrw-password*
|
|
252 CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
|
1209
|
253
|
7
|
254 Attempts to use ftp will prompt you for a user-id and a password.
|
1209
|
255 These will be saved in global variables g:netrw_uid and
|
1621
|
256 s:netrw_passwd; subsequent uses of ftp will re-use those two items to
|
1209
|
257 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
|
1621
|
262 to not need to use passwords, look at |netrw-ssh-hack|).
|
7
|
263
|
|
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
|
1621
|
269 NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
|
|
270 (also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-var|)
|
|
271
|
|
272 Netrw provides a lot of variables which allow you to customize netrw to your
|
|
273 preferences. One way to look at them is via the command :NetrwSettings (see
|
|
274 |netrw-settings|) which will display your current netrw settings. Most such
|
|
275 settings are described below, in |netrw-browser-options|, and in
|
|
276 |netrw-externapp|:
|
1121
|
277
|
482
|
278 *b:netrw_lastfile* last file Network-read/written retained on a per-buffer
|
|
279 basis (supports plain :Nw )
|
|
280
|
|
281 *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.
|
|
287
|
1121
|
288 *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
|
482
|
294 *g:netrw_ftpmode* ="binary" (default)
|
|
295 ="ascii"
|
|
296
|
1121
|
297 *g:netrw_ignorenetrc* =0 (default for linux, cygwin)
|
794
|
298 =1 If you have a <.netrc> file but it doesn't work and
|
1621
|
299 you want it ignored, then set this variable as
|
|
300 shown. (default for Windows + cmd.exe)
|
1121
|
301
|
|
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|)
|
482
|
307
|
|
308 *g:netrw_uid* (ftp) user-id, retained on a per-session basis
|
1621
|
309 *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.
|
7
|
316
|
1209
|
317 *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
|
1621
|
320 *g:netrw_silent* =0 : transfers done normally
|
|
321 =1 : transfers done silently
|
|
322
|
1209
|
323 *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
|
482
|
330 *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)
|
22
|
333
|
482
|
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
|
1121
|
342 =1 use WinNT's rcp in binary mode (default)
|
22
|
343
|
1621
|
344 PATHS *netrw-path* {{{2
|
466
|
345
|
482
|
346 Paths to files are generally user-directory relative for most protocols.
|
|
347 It is possible that some protocol will make paths relative to some
|
|
348 associated directory, however.
|
|
349 >
|
|
350 example: vim scp://user@host/somefile
|
|
351 example: vim scp://user@host/subdir1/subdir2/somefile
|
|
352 <
|
1621
|
353 where "somefile" is in the "user"'s home directory. If you wish to get a
|
482
|
354 file 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 <
|
7
|
359
|
|
360 ==============================================================================
|
1621
|
361 4. Network-Oriented File Transfer *netrw-xfer* {{{1
|
7
|
362
|
|
363 Network-oriented file transfer under Vim is implemented by a VimL-based script
|
559
|
364 (<netrw.vim>) using plugin techniques. It currently supports both reading and
|
|
365 writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
|
7
|
366 dav/cadaver, rsync, or sftp.
|
|
367
|
|
368 http 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
|
|
371 various file transfer programs. It uses autocommand events (BufReadCmd,
|
|
372 FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
|
|
373
|
|
374 ex. vim ftp://hostname/path/to/file
|
|
375 <
|
559
|
376 The characters preceding the colon specify the protocol to use; in the
|
1621
|
377 example, it's ftp. The <netrw.vim> script then formulates a command or a
|
559
|
378 series 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
|
|
380 from/written to a temporary file (under Unix/Linux, /tmp/...) which the
|
|
381 <netrw.vim> script will clean up.
|
7
|
382
|
1121
|
383 *netrw-putty* *netrw-pscp* *netrw-psftp*
|
559
|
384 One may modify any protocol's implementing external application by setting a
|
|
385 variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
|
794
|
386 "scp -q"). As an example, consider using PuTTY: >
|
1121
|
387
|
|
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"'
|
794
|
390 <
|
1121
|
391 See |netrw-p8| for more about putty, pscp, psftp, etc.
|
|
392
|
7
|
393 Ftp, an old protocol, seems to be blessed by numerous implementations.
|
559
|
394 Unfortunately, some implementations are noisy (ie., add junk to the end of the
|
|
395 file). Thus, concerned users may decide to write a NetReadFixup() function
|
|
396 that will clean up after reading with their ftp. Some Unix systems (ie.,
|
|
397 FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
|
|
398 not noisy and more convenient, actually, for <netrw.vim> to use.
|
7
|
399 Consequently, if "fetch" is executable, it will be used to do reads for
|
|
400 ftp://... (and http://...) . See |netrw-var| for more about this.
|
|
401
|
|
402 For rcp, scp, sftp, and http, one may use network-oriented file transfers
|
459
|
403 transparently; ie.
|
7
|
404 >
|
|
405 vim rcp://[user@]machine/path
|
|
406 vim scp://[user@]machine/path
|
|
407 <
|
|
408 If your ftp supports <.netrc>, then it too can be just as transparently used
|
|
409 if the needed triad of machine name, user id, and password are present in
|
|
410 that file. Your ftp must be able to use the <.netrc> file on its own, however.
|
|
411 >
|
|
412 vim ftp://[user@]machine[[:#]portnumber]/path
|
|
413 <
|
|
414 However, ftp will often need to query the user for the userid and password.
|
459
|
415 The latter will be done "silently"; ie. asterisks will show up instead of
|
7
|
416 the actually-typed-in password. Netrw will retain the userid and password
|
|
417 for subsequent read/writes from the most recent transfer so subsequent
|
|
418 transfers (read/write) to or from that machine will take place without
|
|
419 additional prompting.
|
|
420
|
|
421 *netrw-urls*
|
|
422 +=================================+============================+============+
|
1121
|
423 | Reading | Writing | Uses |
|
7
|
424 +=================================+============================+============+
|
1121
|
425 | DAV: | | |
|
|
426 | dav://host/path | | cadaver |
|
|
427 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
|
7
|
428 +---------------------------------+----------------------------+------------+
|
1621
|
429 | DAV + SSL: | | |
|
|
430 | davs://host/path | | cadaver |
|
|
431 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver |
|
|
432 +---------------------------------+----------------------------+------------+
|
1121
|
433 | FETCH: | | |
|
|
434 | fetch://[user@]host/path | | |
|
|
435 | fetch://[user@]host:http/path | Not Available | fetch |
|
|
436 | :Nread fetch://[user@]host/path| | |
|
7
|
437 +---------------------------------+----------------------------+------------+
|
1121
|
438 | FILE: | | |
|
|
439 | file:///* | file:///* | |
|
|
440 | file://localhost/* | file://localhost/* | |
|
7
|
441 +---------------------------------+----------------------------+------------+
|
1121
|
442 | 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 |
|
7
|
447 +---------------------------------+----------------------------+------------+
|
1121
|
448 | HTTP: wget is executable: (*4) | | |
|
|
449 | http://[user@]host/path | Not Available | wget |
|
7
|
450 +---------------------------------+----------------------------+------------+
|
1121
|
451 | HTTP: fetch is executable (*4) | | |
|
|
452 | http://[user@]host/path | Not Available | fetch |
|
7
|
453 +---------------------------------+----------------------------+------------+
|
1121
|
454 | RCP: | | |
|
|
455 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
|
7
|
456 +---------------------------------+----------------------------+------------+
|
1121
|
457 | 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 |
|
7
|
461 +---------------------------------+----------------------------+------------+
|
1121
|
462 | SCP: | | |
|
|
463 | scp://[user@]host/path | scp://[user@]host/path | scp |
|
|
464 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
|
7
|
465 +---------------------------------+----------------------------+------------+
|
1121
|
466 | SFTP: | | |
|
|
467 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
|
|
468 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
|
7
|
469 +=================================+============================+============+
|
|
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
|
1121
|
475 prompt for user-id and password.
|
7
|
476
|
1121
|
477 (*3) for ftp, "machine" may be machine#port or machine:port
|
7
|
478 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
|
|
483 Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
|
|
484
|
|
485
|
|
486 NETRC *netrw-netrc*
|
|
487
|
1621
|
488 The <.netrc> file, typically located in your home directory, contains lines
|
|
489 therein which map a hostname (machine name) to the user id and password you
|
|
490 prefer to use with it.
|
|
491
|
7
|
492 The typical syntax for lines in a <.netrc> file is given as shown below.
|
799
|
493 Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
|
7
|
494 >
|
|
495 machine {full machine name} login {user-id} password "{password}"
|
|
496 default login {user-id} password "{password}"
|
|
497
|
|
498 Your 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
|
|
500 password.
|
|
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
|
1621
|
506 still read the file! Ie. for Linux/Unix: chmod 600 .netrc
|
7
|
507
|
|
508
|
|
509 PASSWORD *netrw-passwd*
|
|
510
|
|
511 The script attempts to get passwords for ftp invisibly using |inputsecret()|,
|
|
512 a built-in Vim function. See |netrw-uidpass| for how to change the password
|
|
513 after one has set it.
|
|
514
|
559
|
515 Unfortunately there doesn't appear to be a way for netrw to feed a password to
|
|
516 scp. Thus every transfer via scp will require re-entry of the password.
|
1621
|
517 However, |netrw-ssh-hack| can help with this problem.
|
7
|
518
|
|
519
|
|
520 ==============================================================================
|
1621
|
521 5. Activation *netrw-activate* {{{1
|
7
|
522
|
799
|
523 Network-oriented file transfers are available by default whenever Vim's
|
1621
|
524 |'nocompatible'| mode is enabled. Netrw's script files reside in your
|
|
525 system's plugin, autoload, and syntax directories; just the
|
|
526 plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
|
|
527 vim. The main script in autoload/netrw.vim is only loaded when you actually
|
|
528 use netrw. I suggest that, at a minimum, you have at least the following in
|
|
529 your <.vimrc> customization file: >
|
799
|
530
|
559
|
531 set nocp
|
|
532 if version >= 600
|
|
533 filetype plugin indent on
|
|
534 endif
|
|
535 <
|
7
|
536
|
|
537 ==============================================================================
|
1621
|
538 6. Transparent File Editing *netrw-transparent* {{{1
|
7
|
539
|
|
540 Transparent file transfers occur whenever a regular file read or write
|
1621
|
541 (invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
|
|
542 events) is made. Thus one may read, write, or source files across networks
|
|
543 just as easily as if they were local files! >
|
7
|
544
|
|
545 vim ftp://[user@]machine/path
|
|
546 ...
|
|
547 :wq
|
|
548
|
559
|
549 See |netrw-activate| for more on how to encourage your vim to use plugins
|
|
550 such as netrw.
|
7
|
551
|
799
|
552
|
7
|
553 ==============================================================================
|
1621
|
554 7. Ex Commands *netrw-ex* {{{1
|
7
|
555
|
799
|
556 The usual read/write commands are supported. There are also a few
|
1621
|
557 additional commands available. Often you won't need to use Nwrite or
|
1121
|
558 Nread as shown in |netrw-transparent| (ie. simply use >
|
|
559 :e url
|
|
560 :r url
|
|
561 :w url
|
|
562 instead, as appropriate) -- see |netrw-urls|. In the explanations
|
|
563 below, a {netfile} is an url to a remote file.
|
7
|
564
|
1621
|
565 :[range]Nw[rite] Write the specified lines to the current
|
7
|
566 file as specified in b:netrw_lastfile.
|
|
567
|
1621
|
568 :[range]Nw[rite] {netfile} [{netfile}]...
|
7
|
569 Write the specified lines to the {netfile}.
|
|
570
|
1621
|
571 :Nr[ead] Read the specified lines into the current
|
7
|
572 buffer from the file specified in
|
|
573 b:netrw_lastfile.
|
|
574
|
1621
|
575 :Nr[ead] {netfile} {netfile}...
|
7
|
576 Read the {netfile} after the current line.
|
|
577
|
1621
|
578 :Ns[ource] {netfile}
|
1121
|
579 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*
|
7
|
586 :call NetUserPass()
|
1621
|
587 If g:netrw_uid and s:netrw_passwd don't exist,
|
|
588 this function will query the user for them.
|
7
|
589
|
|
590 :call NetUserPass("userid")
|
1621
|
591 This call will set the g:netrw_uid and, if
|
7
|
592 the password doesn't exist, will query the user for it.
|
|
593
|
|
594 :call NetUserPass("userid","passwd")
|
1621
|
595 This call will set both the g:netrw_uid and s:netrw_passwd.
|
7
|
596 The user-id and password are used by ftp transfers. One may
|
1621
|
597 effectively remove the user-id and password by using empty
|
|
598 strings (ie. "").
|
7
|
599
|
1121
|
600 :NetrwSettings This command is described in |netrw-settings| -- used to
|
|
601 display netrw settings and change netrw behavior.
|
482
|
602
|
7
|
603
|
|
604 ==============================================================================
|
1621
|
605 8. Variables and Options *netrw-options* *netrw-var* {{{1
|
|
606
|
|
607 (if you're interested in the netrw browser settings, see: |netrw-browser-var|)
|
7
|
608
|
1121
|
609 The <netrw.vim> script provides several variables which act as options to
|
1621
|
610 affect <netrw.vim>'s file transfer behavior. These variables typically may be
|
|
611 set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
|
|
612
|
|
613 >
|
559
|
614
|
1121
|
615 -------------
|
|
616 Netrw Options
|
|
617 -------------
|
9
|
618 Option Meaning
|
|
619 -------------- -----------------------------------------------
|
|
620 <
|
1121
|
621 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
|
7
|
631 want it used, then set this variable. Its
|
|
632 mere existence is enough to cause <.netrc>
|
|
633 to be ignored.
|
1121
|
634 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 >
|
9
|
646 -----------------------------------------------------------------------
|
|
647 <
|
7
|
648 The script will also make use of the following variables internally, albeit
|
|
649 temporarily.
|
9
|
650 >
|
|
651 -------------------
|
|
652 Temporary Variables
|
|
653 -------------------
|
|
654 Variable Meaning
|
|
655 -------- ------------------------------------
|
|
656 <
|
7
|
657 g:netrw_method Index indicating rcp/ftp+.netrc/ftp
|
|
658 g:netrw_machine Holds machine name parsed from input
|
9
|
659 g:netrw_fname Holds filename being accessed >
|
|
660 ------------------------------------------------------------
|
|
661 <
|
1621
|
662 *netrw-protocol*
|
7
|
663
|
9
|
664 Netrw supports a number of protocols. These protocols are invoked using the
|
|
665 variables listed below, and may be modified by the user.
|
7
|
666 >
|
|
667 ------------------------
|
1121
|
668 Protocol Control Options
|
7
|
669 ------------------------
|
1121
|
670 Option Type Setting Meaning
|
|
671 --------- -------- -------------- ---------------------------
|
9
|
672 <
|
1121
|
673 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()
|
7
|
681 g:netrw_dav_cmd variable ="cadaver"
|
1121
|
682 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
|
7
|
683 g:netrw_ftp_cmd variable ="ftp"
|
650
|
684 g:netrw_http_cmd variable ="fetch -o" if fetch is available
|
|
685 g:netrw_http_cmd variable ="wget -O" else if wget is available
|
1121
|
686 g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa"
|
7
|
687 g:netrw_rcp_cmd variable ="rcp"
|
|
688 g:netrw_rsync_cmd variable ="rsync -a"
|
|
689 g:netrw_scp_cmd variable ="scp -q"
|
9
|
690 g:netrw_sftp_cmd variable ="sftp" >
|
|
691 -------------------------------------------------------------------------
|
7
|
692 <
|
12
|
693 *netrw-ftp*
|
1121
|
694
|
|
695 The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|)
|
|
696 specify the external program to use handle the ftp protocol. They may
|
|
697 include command line options (such as -p for passive mode).
|
7
|
698
|
1121
|
699 Browsing is supported by using the |g:netrw_list_cmd|; the substring
|
|
700 "HOSTNAME" will be changed via substitution with whatever the current request
|
|
701 is for a hostname.
|
7
|
702
|
1121
|
703 Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's
|
|
704 that give trouble . In order to best understand how to use these options if
|
|
705 ftp is giving you troubles, a bit of discussion is provided on how netrw does
|
|
706 ftp reads.
|
9
|
707
|
|
708 For ftp, netrw typically builds up lines of one of the following formats in a
|
7
|
709 temporary file:
|
|
710 >
|
|
711 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
|
|
712 ---------------------------------- ------------------------------
|
9
|
713 <
|
1121
|
714 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 >
|
9
|
720 ---------------------------------------------------------------------
|
7
|
721 <
|
1121
|
722 The |g:netrw_ftpmode| and |g:netrw_extracmd| are optional.
|
|
723
|
7
|
724 Netrw then executes the lines above by use of a filter:
|
|
725 >
|
|
726 :%! {g:netrw_ftp_cmd} -i [-n]
|
|
727 <
|
|
728 where
|
|
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
|
|
733 If <.netrc> exists it will be used to avoid having to query the user for
|
9
|
734 userid and password. The transferred file is put into a temporary file.
|
7
|
735 The temporary file is then read into the main editing session window that
|
|
736 requested it and the temporary file deleted.
|
|
737
|
559
|
738 If your ftp doesn't accept the "user" command and immediately just demands a
|
|
739 userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
|
7
|
740
|
12
|
741 *netrw-cadaver*
|
|
742 To handle the SSL certificate dialog for untrusted servers, one may pull
|
|
743 down the certificate and place it into /usr/ssl/cert.pem. This operation
|
|
744 renders the server treatment as "trusted".
|
|
745
|
794
|
746 *netrw-fixup* *netreadfixup*
|
7
|
747 If your ftp for whatever reason generates unwanted lines (such as AUTH
|
|
748 messages) 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
|
1121
|
762 else " complain
|
7
|
763 endif
|
|
764 endfunction
|
|
765 >
|
559
|
766 The NetReadFixup() function will be called if it exists and thus allows you to
|
|
767 customize your reading process. As a further example, <netrw.vim> contains
|
|
768 just such a function to handle Windows 95 ftp. For whatever reason, Windows
|
|
769 95's ftp dumps four blank lines at the end of a transfer, and so it is
|
|
770 desirable to automate their removal. Here's some code taken from <netrw.vim>
|
|
771 itself:
|
7
|
772 >
|
|
773 if has("win95") && g:netrw_win95ftp
|
9
|
774 fun! NetReadFixup(method, line1, line2)
|
7
|
775 if method == 3 " ftp (no <.netrc>)
|
1121
|
776 let fourblanklines= line2 - 3
|
|
777 silent fourblanklines.",".line2."g/^\s*/d"
|
7
|
778 endif
|
|
779 endfunction
|
|
780 endif
|
|
781 >
|
|
782
|
|
783 ==============================================================================
|
1621
|
784 9. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1
|
|
785 *netrw-browser* *netrw-dir* *netrw-list*
|
|
786
|
|
787 INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2
|
|
788 (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
|
|
789
|
|
790 Netrw supports the browsing of directories on your local system and on remote
|
|
791 hosts; browsing includes listing files and directories, entering directories,
|
|
792 editing files therein, deleting files/directories, making new directories,
|
|
793 moving (renaming) files and directories, copying files and directories, etc.
|
|
794 One may mark files and execute any system command on them! The Netrw browser
|
|
795 generally implements the previous explorer's maps and commands for remote
|
|
796 directories, although details (such as pertinent global variable names)
|
|
797 necessarily differ. To browse a directory, simply "edit" it! >
|
|
798
|
|
799 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| )
|
22
|
805
|
|
806 The Netrw remote file and directory browser handles two protocols: ssh and
|
1621
|
807 ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp
|
|
808 in its remote browsing. Specifying any other protocol will cause it to be
|
|
809 used for file transfers; but the ssh protocol will be used to do remote
|
|
810 browsing.
|
|
811
|
|
812 To use Netrw's remote directory browser, simply attempt to read a "file" with
|
|
813 a trailing slash and it will be interpreted as a request to list a directory:
|
|
814 >
|
9
|
815 vim [protocol]://[user@]hostname/path/
|
1621
|
816 <
|
|
817 where [protocol] is typically scp or ftp. As an example, try: >
|
|
818
|
|
819 vim ftp://ftp.home.vim.org/pub/vim/
|
719
|
820 <
|
1621
|
821 For local directories, the trailing slash is not required. Again, because its
|
|
822 easy to miss: to browse remote directories, the url must terminate with a
|
|
823 slash!
|
|
824
|
|
825 If you'd like to avoid entering the password repeatedly for remote directory
|
|
826 listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with
|
|
827 ftp, see |netrw-netrc| (if your ftp supports it).
|
|
828
|
|
829 There are several things you can do to affect the browser's display of files:
|
|
830
|
|
831 * To change the listing style, press the "i" key (|netrw-i|).
|
|
832 Currently there are four styles: thin, long, wide, and tree.
|
|
833
|
|
834 * To hide files (don't want to see those xyz~ files anymore?) see
|
|
835 |netrw-ctrl-h|.
|
|
836
|
|
837 * Press s to sort files by name, time, or size.
|
|
838
|
|
839 See |netrw-browse-cmds| for all the things you can do with netrw!
|
|
840
|
|
841
|
|
842 QUICK 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|
|
1668
|
860 Sorting options...............................|g:netrw_sort_options|
|
1621
|
861 Associated setting variable...................|g:netrw_sort_sequence|
|
|
862 Reverse sorting order.........................|netrw-r|
|
|
863
|
|
864
|
|
865 *netrw-quickmap* *netrw-quickmaps*
|
|
866 QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
466
|
867 >
|
1621
|
868 --- ----------------- ----
|
|
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
|
1668
|
918 % Open a new file in netrw's current directory |netrw-%|
|
|
919
|
1621
|
920 <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*
|
|
936 QUICK 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
|
|
948 BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
|
|
949 One may easily "bookmark" a directory by using >
|
|
950
|
|
951 {cnt}mb
|
839
|
952 <
|
1621
|
953 Any count may be used. One may use viminfo's "!" option (|'viminfo'|) to
|
|
954 retain bookmarks between vim sessions. See |netrw-gb| for how to return
|
|
955 to a bookmark and |netrw-qb| for how to list them.
|
|
956
|
|
957
|
|
958 BROWSING *netrw-cr* {{{2
|
12
|
959
|
9
|
960 Browsing is simple: move the cursor onto a file or directory of interest.
|
11
|
961 Hitting the <cr> (the return key) will select the file or directory.
|
|
962 Directories will themselves be listed, and files will be opened using the
|
1121
|
963 protocol given in the original read request.
|
559
|
964
|
1621
|
965 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.
|
519
|
970
|
650
|
971 The |g:netrw_browse_split| option, which is zero by default, may be used to
|
1621
|
972 cause the opening of files to be done in a new window or tab instead of the
|
|
973 default. When the option is one or two, the splitting will be taken
|
|
974 horizontally or vertically, respectively. When the option is set to three, a
|
|
975 <cr> will cause the file to appear in a new tab.
|
|
976
|
|
977
|
|
978 When using the gui (gvim) one may select a file by pressing the <leftmouse>
|
|
979 button. In addtion, if
|
|
980
|
|
981 *|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
|
|
985
|
|
986 then a doubly-clicked leftmouse button will return to the netrw browser
|
|
987 window.
|
|
988
|
|
989 Netrw attempts to speed up browsing, especially for remote browsing where one
|
|
990 may have to enter passwords, by keeping and re-using previously obtained
|
|
991 directory listing buffers. The |g:netrw_fastbrowse| variable is used to
|
|
992 control this behavior; one may have slow browsing (no buffer re-use), medium
|
|
993 speed browsing (re-use directory buffer listings only for remote directories),
|
|
994 and fast browsing (re-use directory buffer listings as often as possible).
|
|
995 The price for such re-use is that when changes are made (such as new files
|
|
996 are introduced into a directory), the listing may become out-of-date. One may
|
|
997 always refresh directory listing buffers by pressing ctrl-L (see
|
|
998 |netrw-ctrl-l|).
|
|
999
|
|
1000
|
|
1001 Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
|
|
1002 Associated 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
|
|
1008 BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2
|
|
1009
|
|
1010 Normally one enters a file or directory using the <cr>. However, the "o" map
|
|
1011 allows one to open a new window to hold the new directory listing or file. A
|
|
1012 horizontal split is used. (for vertical splitting, see |netrw-v|)
|
|
1013
|
|
1014 Normally, the o key splits the window horizontally with the new window and
|
|
1015 cursor at the top. To change to splitting the window horizontally with the
|
|
1016 new window and cursor at the bottom, have
|
|
1017
|
|
1018 let g:netrw_alto = 1
|
|
1019
|
|
1020 in your <.vimrc>. (also see |netrw-t| |netrw-v|)
|
|
1021
|
|
1022 There is only one tree listing buffer; using "o" on a displayed subdirectory
|
|
1023 will split the screen, but the same buffer will be shown twice.
|
|
1024
|
|
1025 Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
|
|
1026
|
|
1027
|
|
1028 BROWSING WITH A NEW TAB *netrw-t* {{{2
|
|
1029
|
|
1030 Normally one enters a file or directory using the <cr>. The "t" map
|
|
1031 allows one to open a new window hold the new directory listing or file in a
|
|
1032 new tab. (also see: |netrw-o| |netrw-v|)
|
|
1033
|
|
1034
|
|
1035 BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2
|
|
1036
|
|
1037 Normally one enters a file or directory using the <cr>. However, the "v" map
|
|
1038 allows one to open a new window to hold the new directory listing or file. A
|
|
1039 vertical split is used. (for horizontal splitting, see |netrw-o|)
|
|
1040
|
|
1041 Normally, the v key splits the window vertically with the new window and
|
|
1042 cursor at the left. To change to splitting the window vertically with the new
|
|
1043 window and cursor at the right, have
|
|
1044
|
|
1045 let g:netrw_altv = 1
|
|
1046
|
|
1047 in your <.vimrc>. (also see: |netrw-o| |netrw-t|)
|
|
1048
|
|
1049 There is only one tree listing buffer; using "v" on a displayed subdirectory
|
|
1050 will split the screen, but the same buffer will be shown twice.
|
|
1051
|
|
1052 Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
|
|
1053
|
|
1054 CHANGE LISTING STYLE *netrw-i* {{{2
|
519
|
1055
|
1121
|
1056 The "i" map cycles between the thin, long, wide, and tree listing formats.
|
12
|
1057
|
15
|
1058 The short listing format gives just the files' and directories' names.
|
519
|
1059
|
15
|
1060 The long listing is either based on the "ls" command via ssh for remote
|
559
|
1061 directories or displays the filename, file size (in bytes), and the time and
|
|
1062 date of last modification for local directories. With the long listing
|
|
1063 format, netrw is not able to recognize filenames which have trailing spaces.
|
|
1064 Use the thin listing format for such files.
|
519
|
1065
|
1121
|
1066 The wide listing format uses two or more contiguous spaces to delineate
|
|
1067 filenames; when using that format, netrw won't be able to recognize or use
|
|
1068 filenames which have two or more contiguous spaces embedded in the name or any
|
|
1069 trailing spaces. The thin listing format will, however, work with such files.
|
|
1070 This listing format is the most compact.
|
|
1071
|
|
1072 The tree listing format has a top directory followed by files and directories
|
|
1073 preceded by a "|". One may open and close directories by pressing the <cr>
|
|
1074 key while atop the directory name. There is only one tree listing buffer;
|
|
1075 hence, using "v" or "o" on a subdirectory will only show the same buffer,
|
|
1076 twice.
|
15
|
1077
|
1621
|
1078 Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
|
|
1079 |g:netrw_timefmt| |g:netrw_list_cmd|
|
|
1080
|
|
1081
|
|
1082 CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2
|
|
1083
|
|
1084 To change directory back to a bookmarked directory, use
|
|
1085
|
|
1086 {cnt}gb
|
|
1087
|
|
1088 Any count may be used to reference any of the bookmarks. See |netrw-mb| on
|
|
1089 how to bookmark a directory and |netrw-qb| on how to list bookmarks.
|
|
1090
|
|
1091
|
|
1092 CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
|
36
|
1093
|
|
1094 Every time you change to a new directory (new for the current session),
|
|
1095 netrw will save the directory in a recently-visited directory history
|
1621
|
1096 list (unless g:netrw_dirhistmax is zero; by default, it's ten). With the
|
36
|
1097 "u" map, one can change to an earlier directory (predecessor). To do
|
|
1098 the opposite, see |netrw-U|.
|
|
1099
|
|
1100
|
1621
|
1101 CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2
|
36
|
1102
|
|
1103 With the "U" map, one can change to a later directory (successor).
|
|
1104 This map is the opposite of the "u" map. (see |netrw-u|) Use the
|
1621
|
1105 q map to list both the bookmarks and history. (see |netrw-qb|)
|
|
1106
|
|
1107
|
|
1108 NETRW CLEAN *netrw-clean* *:NetrwClean*
|
|
1109
|
|
1110 With :NetrwClean one may easily remove netrw from one's home directory;
|
|
1111 more precisely, from the first directory on your |'runtimepath'|.
|
|
1112
|
|
1113 With :NetrwClean!, netrw will remove netrw from all directories on your
|
|
1114 |'runtimepath'|.
|
|
1115
|
|
1116 With either form of the command, netrw will first ask for confirmation
|
|
1117 that the removal is in fact what you want to do. If netrw doesn't have
|
|
1118 permission to remove a file, it will issue an error message.
|
36
|
1119
|
1121
|
1120 *netrw-gx*
|
1621
|
1121 CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2
|
1121
|
1122 (also see |netrw_filehandler|)
|
650
|
1123
|
|
1124 Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
|
|
1125 best seen with a special handler (ie. a tool provided with your computer).
|
|
1126 Netrw allows one to invoke such special handlers by: >
|
12
|
1127
|
650
|
1128 * when Exploring, hit the "x" key
|
|
1129 * when editing, hit gx with the cursor atop the special filename
|
1121
|
1130 < (not available if the |g:netrw_nogx| variable exists)
|
|
1131
|
650
|
1132 Netrw 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|).
|
12
|
1143
|
1121
|
1144 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
|
650
|
1145 * for Gnome (with gnome-open): gnome-open is used.
|
1621
|
1146 * for KDE (with kfmclient) : kfmclient is used.
|
|
1147 * for Mac OS X : open is used.
|
559
|
1148 * otherwise the netrwFileHandler plugin is used.
|
482
|
1149
|
|
1150 The file's suffix is used by these various approaches to determine an
|
559
|
1151 appropriate application to use to "handle" these files. Such things as
|
|
1152 OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
|
|
1153 *.eps) can be handled.
|
482
|
1154
|
650
|
1155 *netrw_filehandler*
|
1121
|
1156
|
|
1157 The "x" map applies a function to a file, based on its extension. Of course,
|
|
1158 the handler function must exist for it to be called!
|
12
|
1159 >
|
|
1160 Ex. mypgm.html x ->
|
1121
|
1161 NFH_html("scp://user@host/some/path/mypgm.html")
|
12
|
1162 <
|
1121
|
1163 Users may write their own netrw File Handler functions to support more
|
|
1164 suffixes with special handling. See <plugin/netrwFileHandlers.vim> for
|
|
1165 examples on how to make file handler functions. As an example: >
|
12
|
1166
|
1121
|
1167 " NFH_suffix(filename)
|
|
1168 fun! NFH_suffix(filename)
|
|
1169 ..do something special with filename..
|
|
1170 endfun
|
|
1171 <
|
|
1172 These functions need to be defined in some file in your .vim/plugin
|
|
1173 (vimfiles\plugin) directory. Vim's function names may not have punctuation
|
|
1174 characters (except for the underscore) in them. To support suffices that
|
|
1175 contain such characters, netrw will first convert the suffix using the
|
|
1176 following table: >
|
650
|
1177
|
1121
|
1178 @ -> AT ! -> EXCLAMATION % -> PERCENT
|
|
1179 : -> COLON = -> EQUAL ? -> QUESTION
|
|
1180 , -> COMMA - -> MINUS ; -> SEMICOLON
|
|
1181 $ -> DOLLAR + -> PLUS ~ -> TILDE
|
|
1182 <
|
|
1183 So, for example: >
|
650
|
1184
|
1121
|
1185 file.rcs,v -> NFH_rcsCOMMAv()
|
|
1186 <
|
|
1187 If more such translations are necessary, please send me email: >
|
|
1188 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
|
|
1189 with a request.
|
482
|
1190
|
1621
|
1191 Associated setting variable: |g:netrw_browsex_viewer|
|
|
1192
|
|
1193 *netrw-curdir*
|
|
1194 DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2
|
|
1195
|
|
1196 If files have not been marked with |netrw-mf|: (local marked file list)
|
|
1197
|
|
1198 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".
|
|
1205
|
|
1206 If 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
|
|
1211 The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
|
|
1212 used to control the attempts to remove files and directories. The
|
|
1213 g:netrw_rm_cmd is used with files, and its default value is:
|
|
1214
|
|
1215 g:netrw_rm_cmd: ssh HOSTNAME rm
|
|
1216
|
|
1217 The g:netrw_rmdir_cmd variable is used to support the removal of directories.
|
|
1218 Its default value is:
|
|
1219
|
|
1220 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
|
|
1221
|
|
1222 If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
|
|
1223 to 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
|
|
1227 Associated setting variable: |g:netrw_local_rmdir| |g:netrw_rm_cmd|
|
|
1228 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
|
|
1229
|
|
1230
|
|
1231 *netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
|
|
1232 *netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
|
|
1233 DIRECTORY EXPLORATION COMMANDS {{{2
|
|
1234
|
|
1235 :Explore[!] [dir]... Explore directory of current file *:Explore*
|
|
1236 :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
|
|
1237 :Rexplore ... Return to Explorer *:Rexplore*
|
|
1238 :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore*
|
|
1239 :Texplore [dir]... Tab & Explore *:Texplore*
|
|
1240 :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
|
|
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
|
|
1262 By default, these commands use the current file's directory. However, one
|
|
1263 may explicitly provide a directory (path) to use.
|
|
1264
|
|
1265 The |g:netrw_winsize| variable also is used, if specified by the user, to
|
|
1266 size 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*
|
|
1277 EXPLORING WITH STARS AND PATTERNS
|
|
1278
|
|
1279 When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
|
|
1280 following four styles, Explore generates a list of files which satisfy
|
|
1281 the 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)
|
464
|
1290 <
|
1621
|
1291 The cursor will be placed on the first file in the list. One may then
|
|
1292 continue to go to subsequent files on that list via |:Nexplore| or to
|
|
1293 preceding files on that list with |:Pexplore|. Explore will update the
|
|
1294 directory and place the cursor appropriately.
|
|
1295
|
|
1296 A plain >
|
|
1297 :Explore
|
|
1298 will clear the explore list.
|
|
1299
|
|
1300 If your console or gui produces recognizable shift-up or shift-down sequences,
|
|
1301 then you'll likely find using shift-downarrow and shift-uparrow convenient.
|
|
1302 They're mapped by netrw:
|
|
1303
|
|
1304 <s-down> == Nexplore, and
|
|
1305 <s-up> == Pexplore.
|
|
1306
|
|
1307 As an example, consider
|
|
1308 >
|
|
1309 :Explore */*.c
|
|
1310 :Nexplore
|
|
1311 :Nexplore
|
|
1312 :Pexplore
|
|
1313 <
|
|
1314 The status line will show, on the right hand side of the status line, a
|
|
1315 message like "Match 3 of 20".
|
|
1316
|
|
1317 Associated 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|
|
|
1322
|
|
1323
|
|
1324 DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2
|
|
1325
|
|
1326 With the cursor atop a filename, pressing "qf" will reveal the file's size
|
|
1327 and last modification timestamp. Currently this capability is only available
|
|
1328 for local files.
|
|
1329
|
|
1330
|
|
1331 EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2
|
|
1332
|
|
1333 The "<ctrl-h>" map brings up a requestor allowing the user to change the
|
|
1334 file/directory hiding list contained in |g:netrw_list_hide|. The hiding list
|
|
1335 consists of one or more patterns delimited by commas. Files and/or
|
|
1336 directories satisfying these patterns will either be hidden (ie. not shown) or
|
|
1337 be the only ones displayed (see |netrw-a|).
|
|
1338
|
|
1339 The "gh" mapping (see |netrw-gh|) quickly alternates between the usual
|
|
1340 hiding list and the hiding of files or directories that begin with ".".
|
|
1341
|
|
1342 Associated setting variables: |g:netrw_hide| |g:netrw_list_hide|
|
|
1343 Associated topics: |netrw-a| |netrw-gh| |netrw-mh|
|
|
1344
|
|
1345
|
|
1346 EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2
|
|
1347
|
|
1348 When "Sorted by" is name, one may specify priority via the sorting sequence
|
|
1349 (g:netrw_sort_sequence). The sorting sequence typically prioritizes the
|
|
1350 name-listing by suffix, although any pattern will do. Patterns are delimited
|
|
1351 by commas. The default sorting sequence is (all one line):
|
|
1352 >
|
|
1353 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
|
|
1354 \.swp$,\.bak$,\~$'
|
|
1355 <
|
|
1356 The lone * is where all filenames not covered by one of the other patterns
|
|
1357 will end up. One may change the sorting sequence by modifying the
|
|
1358 g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
|
|
1359 using the "S" map.
|
|
1360
|
1668
|
1361 Related topics: |netrw-s| |netrw-S|
|
|
1362 Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
|
1621
|
1363
|
|
1364
|
|
1365 GOING UP *netrw--* {{{2
|
|
1366
|
|
1367 To go up a directory, press "-" or press the <cr> when atop the ../ directory
|
|
1368 entry in the listing.
|
|
1369
|
|
1370 Netrw will use the command in |g:netrw_list_cmd| to perform the directory
|
|
1371 listing operation after changing HOSTNAME to the host specified by the
|
|
1372 user-provided url. By default netrw provides the command as:
|
|
1373
|
|
1374 ssh HOSTNAME ls -FLa
|
|
1375
|
|
1376 where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
|
|
1377 read. Naturally, the user may override this command with whatever is
|
|
1378 preferred. The NetList function which implements remote browsing
|
|
1379 expects that directories will be flagged by a trailing slash.
|
|
1380
|
|
1381
|
|
1382 HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2
|
|
1383
|
|
1384 Netrw's browsing facility allows one to use the hiding list in one of three
|
|
1385 ways: ignore it, hide files which match, and show only those files which
|
|
1386 match.
|
|
1387
|
|
1388 If no files have been marked via |netrw-mf|:
|
|
1389
|
|
1390 The "a" map allows the user to cycle through the three hiding modes.
|
|
1391
|
|
1392 The |g:netrw_list_hide| variable holds a comma delimited list of patterns
|
|
1393 based 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
|
|
1395 example, to hide files which begin with a ".", one may use the <c-h> map to
|
|
1396 set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*'
|
|
1397 in one's <.vimrc>). One may then use the "a" key to show all files, hide
|
|
1398 matching 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
|
|
1407 Don't forget to use the "a" map to select the mode (normal/hiding/show) you
|
|
1408 want!
|
|
1409
|
|
1410 If 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*
|
|
1422 As a quick shortcut, one may press >
|
|
1423 gh
|
|
1424 to toggle between hiding files which begin with a period (dot) and not hiding
|
|
1425 them.
|
|
1426
|
|
1427 Associated setting variable: |g:netrw_list_hide|
|
|
1428 Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
|
|
1429
|
|
1430 IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2
|
12
|
1431
|
|
1432 Especially with the remote directory browser, constantly entering the password
|
|
1433 is tedious.
|
|
1434
|
1121
|
1435 For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
|
1209
|
1436 tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
|
|
1437 for setting up no-password ssh and scp and discusses associated security
|
1121
|
1438 issues. It used to be available at http://hacks.oreilly.com/pub/h/66 ,
|
|
1439 but apparently that address is now being redirected to some "hackzine".
|
|
1440 I'll attempt a summary:
|
11
|
1441
|
1121
|
1442 1. Generate a public/private key pair on the ssh server:
|
|
1443 ssh-keygen -t rsa
|
|
1444 (saving the file in ~/.ssh/id_rsa is ok)
|
|
1445 2. Just hit the <CR> when asked for passphrase (twice).
|
|
1446 3. This creates two files:
|
|
1447 ~/.ssh/id_rsa
|
|
1448 ~/.ssh/id_rsa.pub
|
|
1449 4. On the client:
|
|
1450 cd
|
|
1451 mkdir .ssh
|
|
1452 chmod 0700 .ssh
|
|
1453 scp {serverhostname}:.ssh/id_rsa.pub .
|
|
1454 cat id_rsa.pub >> .ssh/authorized_keys2
|
9
|
1455
|
1121
|
1456 For Windows, folks on the vim mailing list have mentioned that Pageant helps
|
|
1457 with avoiding the constant need to enter the password.
|
794
|
1458
|
1621
|
1459 Kingston Fung wrote about another way to avoid constantly needing to enter
|
|
1460 passwords:
|
|
1461
|
|
1462 In order to avoid the need to type in the password for scp each time, you
|
|
1463 provide a hack in the docs to set up a non password ssh account. I found a
|
|
1464 better way to do that: I can use a regular ssh account which uses a
|
|
1465 password to access the material without the need to key-in the password
|
|
1466 each time. It's good for security and convenience. I tried ssh public key
|
|
1467 authorization + ssh-agent, implementing this, and it works! Here are two
|
|
1468 links with instructions:
|
|
1469
|
|
1470 http://www.ibm.com/developerworks/library/l-keyc2/
|
|
1471 http://sial.org/howto/openssh/publickey-auth/
|
|
1472
|
|
1473
|
|
1474 LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2
|
|
1475
|
|
1476 Pressing "qb" (query bookmarks) will list the bookmarked directories and
|
|
1477 directory traversal history (query).
|
|
1478
|
|
1479 (see |netrw-mb|, |netrw-gb|, |netrw-u|, and |netrw-U|)
|
|
1480
|
|
1481
|
|
1482 MAKING A NEW DIRECTORY *netrw-d* {{{2
|
|
1483
|
|
1484 With the "d" map one may make a new directory either remotely (which depends
|
|
1485 on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
|
|
1486 global variable g:netrw_local_mkdir). Netrw will issue a request for the new
|
|
1487 directory's name. A bare <CR> at that point will abort the making of the
|
|
1488 directory. Attempts to make a local directory that already exists (as either
|
|
1489 a file or a directory) will be detected, reported on, and ignored.
|
|
1490
|
|
1491 Currently, making a directory via ftp is not supported.
|
|
1492
|
|
1493 Associated setting variable: |g:netrw_local_mkdir| |g:netrw_mkdir_cmd|
|
|
1494
|
|
1495
|
|
1496 MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
|
|
1497
|
|
1498 By default, |g:netrw_keepdir| is 1. This setting means that the current
|
|
1499 directory will not track the browsing directory.
|
|
1500
|
|
1501 Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to
|
|
1502 track netrw's browsing directory.
|
|
1503
|
|
1504 However, given the default setting for g:netrw_keepdir of 1 where netrw
|
|
1505 maintains its own separate notion of the current directory, in order to make
|
|
1506 the two directories the same, use the "c" map (just type c). That map will
|
|
1507 set Vim's notion of the current directory to netrw's current browsing
|
|
1508 directory.
|
|
1509
|
|
1510 Associated setting variable: |g:netrw_keepdir|
|
|
1511
|
|
1512 MARKING FILES *netrw-mf* {{{2
|
|
1513 (also see |netrw-mr|)
|
|
1514
|
|
1515 One may mark files with the cursor atop a filename and then pressing "mf".
|
|
1516 With gvim, one may also mark files with <s-leftmouse>. The following netrw
|
|
1517 maps make use of marked files:
|
|
1518
|
|
1519 |netrw-a| Hide marked files/directories
|
|
1520 |netrw-D| Delete marked files/directories
|
|
1521 |netrw-mc| Copy marked files to target
|
|
1522 |netrw-md| Apply vimdiff to marked files
|
|
1523 |netrw-me| Edit marked files
|
|
1524 |netrw-mg| Apply vimgrep to marked files
|
|
1525 |netrw-mm| Move marked files
|
|
1526 |netrw-mp| Print marked files
|
|
1527 |netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
|
1528 |netrw-mT| Generate tags using marked files
|
|
1529 |netrw-mx| Apply shell command to marked files
|
|
1530 |netrw-mz| Compress/Decompress marked files
|
|
1531 |netrw-O| Obtain marked files
|
|
1532 |netrw-R| Rename marked files
|
|
1533
|
|
1534 One may unmark files one at a time the same way one marks them; ie. place
|
|
1535 the cursor atop a marked file and press "mf". This process also works
|
|
1536 with <s-leftmouse> using gvim. One may unmark all files by pressing
|
|
1537 "mu" (see |netrw-mu|).
|
|
1538
|
|
1539 *markfilelist* *global_markfilelist* *local_markfilelist*
|
|
1540 All marked files are entered onto the global marked file list; there is only
|
|
1541 one such list. In addition, every netrw buffer also has its own local marked
|
|
1542 file list; since netrw buffers are associated with specific directories, this
|
|
1543 means that each directory has its own local marked file list. The various
|
|
1544 commands which operate on marked files use one or the other of the marked file
|
|
1545 lists.
|
|
1546
|
|
1547
|
|
1548 MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2
|
|
1549 (also see |netrw-mf|)
|
|
1550
|
|
1551 One may also mark files by pressing "mr"; netrw will then issue a prompt,
|
|
1552 "Enter regexp: ". You may then enter a regular expression such as \.c$ .
|
|
1553 All files in the current directory will then be marked. Note that the
|
|
1554 regular expressions are vim-style |regexp| ones, not shell ones. So
|
|
1555 entering *.c probably isn't what you want!
|
|
1556
|
|
1557
|
|
1558 MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2
|
|
1559 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1560 (uses the local marked-file list)
|
|
1561
|
|
1562 Upon activation of the "mx" map, netrw will query the user for some (external)
|
|
1563 command to be applied to all marked files. All "%"s in the command will be
|
|
1564 substituted with the name of each marked file in turn. If no "%"s are in the
|
|
1565 command, then the command will be followed by a space and a marked filename.
|
|
1566
|
|
1567
|
|
1568 MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
|
|
1569 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1570 (uses the local marked file list)
|
|
1571
|
|
1572 If any marked files are compressed, then "mz" will decompress them.
|
|
1573 If any marked files are decompressed, then "mz" will compress them
|
|
1574 using the command specified by |g:netrw_compress|; by default,
|
|
1575 that's "gzip".
|
|
1576
|
|
1577 For decompression, netrw provides a |Dictionary| of suffices and their
|
|
1578 associated decompressing utilities; see |g:netrw_decompress|.
|
|
1579
|
|
1580 Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
|
|
1581
|
|
1582 MARKED FILES: COPYING *netrw-mc* {{{2
|
|
1583 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1584 (Uses the global marked file list)
|
|
1585
|
|
1586 Select a target directory with mt (|netrw-mt|). Then change directory,
|
|
1587 select file(s) (see |netrw-mf|), and press "mc".
|
|
1588
|
|
1589 Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
|
|
1590
|
|
1591 MARKED FILES: DIFF *netrw-md* {{{2
|
|
1592 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1593 (uses the global marked file list)
|
|
1594
|
|
1595 Use |vimdiff| to visualize difference between selected files (two or
|
|
1596 three may be selected for this). Uses the global marked file list.
|
|
1597
|
|
1598 MARKED FILES: EDITING *netrw-me* {{{2
|
|
1599 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1600 (uses the global marked file list)
|
|
1601
|
|
1602 This command will place the marked files on the |arglist| and commence
|
|
1603 editing them. One may return the to explorer window with |:Rexplore|.
|
|
1604
|
|
1605 MARKED FILES: GREP *netrw-mg* {{{2
|
|
1606 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1607 (uses the global marked file list)
|
|
1608
|
|
1609 This command will apply |:vimgrep| to the marked files. The command will ask
|
|
1610 for the requested pattern; one may enter: >
|
|
1611 /pattern/[g][j]
|
|
1612 ! /pattern/[g][j]
|
|
1613 pattern
|
|
1614 <
|
|
1615 MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2
|
|
1616 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1617 (uses the local marked file list)
|
|
1618
|
|
1619 This command extracts the suffices of the marked files and toggles their
|
|
1620 presence on the hiding list. Please note that marking the same suffix
|
|
1621 this way multiple times will result in the suffix's presence being toggled
|
|
1622 for each file (so an even quantity of marked files having the same suffix
|
|
1623 is the same as not having bothered to select them at all).
|
|
1624
|
|
1625 Related topics: |netrw-a| |g:netrw_list_hide|
|
|
1626
|
|
1627 MARKED FILES: MOVING *netrw-mm* {{{2
|
|
1628 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1629 (uses the global marked file list)
|
|
1630
|
|
1631 Select a target directory with mT (|netrw-mt|). Then change directory,
|
|
1632 select file(s) (see |netrw-mf|), and press "mm".
|
|
1633
|
|
1634 Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
|
|
1635
|
|
1636 MARKED FILES: PRINTING *netrw-mp* {{{2
|
|
1637 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1638 (uses the local marked file list)
|
|
1639
|
|
1640 Netrw will apply the |:hardcopy| command to marked files. What it does
|
|
1641 is open each file in a one-line window, execute hardcopy, then close the
|
|
1642 one-line window.
|
|
1643
|
|
1644
|
|
1645 MARKED FILES: SOURCING *netrw-ms* {{{2
|
|
1646 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1647 (uses the local marked file list)
|
|
1648
|
|
1649 Netrw will source the marked files (using vim's |:source| command)
|
|
1650
|
|
1651
|
|
1652 MARKED FILES: TAGGING *netrw-mT* {{{2
|
|
1653 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1654 (uses the global marked file list)
|
|
1655
|
1668
|
1656 The "mt" mapping will apply the command in |g:netrw_ctags| (by default, its
|
1621
|
1657 "ctags") to marked files. For remote browsing, in order to create a tags file
|
|
1658 netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for
|
|
1659 this to work on remote systems. For your local system, see |ctags| on how to
|
|
1660 get a version. I myself use hdrtags, currently available at
|
|
1661 http://mysite.verizon.net/astronaut/src/index.html , and have >
|
|
1662
|
|
1663 let g:netrw_ctags= "hdrtag"
|
|
1664 <
|
|
1665 in my <.vimrc>.
|
|
1666
|
|
1667 When a remote set of files are tagged, the resulting tags file is "obtained";
|
|
1668 ie. a copy is transferred to the local system's directory. The local tags
|
|
1669 file is then modified so that one may use it through the network. The
|
|
1670 modification is concerns the names of the files in the tags; each filename is
|
|
1671 preceded by the netrw-compatible url used to obtain it. When one subsequently
|
|
1672 uses one of the go to tag actions (|tags|), the url will be used by netrw to
|
|
1673 edit the desired file and go to the tag.
|
|
1674
|
1668
|
1675 Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
|
1621
|
1676
|
|
1677
|
|
1678 MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2
|
|
1679 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1680
|
|
1681 Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
|
|
1682
|
|
1683 * if the cursor is atop a file name, then the netrw window's currently
|
|
1684 displayed directory is used for the copy/move-to target.
|
|
1685
|
|
1686 * also, if the cursor is in the banner, then the netrw window's currently
|
|
1687 displayed directory is used for the copy/move-to target.
|
|
1688
|
|
1689 * however, if the cursor is atop a directory name, then that directory is
|
|
1690 used for the copy/move-to target
|
|
1691
|
|
1692 There is only one copy/move-to target per vim session; ie. the target is a
|
|
1693 script variable (see |s:var|) and is shared between all netrw windows (in an
|
|
1694 instance of vim).
|
|
1695
|
|
1696 MARKED FILES: UNMARKING *netrw-mu* {{{2
|
|
1697 (See |netrw-mf| and |netrw-mr| for how to mark files)
|
|
1698
|
|
1699 The "mu" mapping will unmark all currently marked files.
|
|
1700
|
|
1701
|
|
1702 NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2
|
|
1703
|
|
1704 (if you're interestd in the netrw file transfer settings, see |netrw-options|)
|
|
1705
|
|
1706 The <netrw.vim> browser provides settings in the form of variables which
|
|
1707 you may modify; by placing these settings in your <.vimrc>, you may customize
|
|
1708 your browsing preferences. (see also: |netrw-settings|)
|
|
1709 >
|
|
1710 --- -----------
|
|
1711 Var Explanation
|
|
1712 --- -----------
|
|
1713 < *g:netrw_alto* change from above splitting to below splitting
|
|
1714 by setting this variable (see |netrw-o|)
|
|
1715 default: =&sb (see |'sb'|)
|
|
1716
|
|
1717 *g:netrw_altv* change from left splitting to right splitting
|
|
1718 by setting this variable (see |netrw-v|)
|
|
1719 default: =&spr (see |'spr'|)
|
|
1720
|
|
1721 *g:netrw_browse_split* when browsing, <cr> will open the file by:
|
|
1722 =0: re-using the same window
|
|
1723 =1: horizontally splitting the window first
|
|
1724 =2: vertically splitting the window first
|
|
1725 =3: open file in new tab
|
|
1726 =4: act like "P" (ie. open previous window)
|
|
1727
|
|
1728 *g:netrw_browsex_viewer* specify user's preference for a viewer: >
|
|
1729 "kfmclient exec"
|
|
1730 "gnome-open"
|
|
1731 < If >
|
|
1732 "-"
|
|
1733 < is used, then netrwFileHandler() will look for
|
|
1734 a script/function to handle the given
|
|
1735 extension. (see |netrw_filehandler|).
|
|
1736
|
|
1737 *g:netrw_compress* ="gzip"
|
|
1738 Will compress marked files with this
|
|
1739 command
|
|
1740
|
1668
|
1741 *g:netrw_ctags* ="ctags"
|
|
1742 The default external program used to create tags
|
|
1743
|
1621
|
1744 *g:netrw_decompress* = { ".gz" : "gunzip" ,
|
|
1745 ".bz2" : "bunzip2" ,
|
|
1746 ".zip" : "unzip" ,
|
|
1747 ".tar" : "tar -xf"}
|
|
1748 A dictionary mapping suffices to
|
|
1749 decompression programs.
|
|
1750
|
|
1751 *g:netrw_fastbrowse* =0: slow speed directory browsing;
|
|
1752 never re-uses directory listings,
|
|
1753 always obtains directory listings.
|
|
1754 =1: medium speed directory browsing;
|
|
1755 re-use directory listings only
|
|
1756 when remote directory browsing.
|
|
1757 (default value)
|
|
1758 =2: fast directory browsing;
|
|
1759 only obtains directory listings when the
|
|
1760 directory hasn't been seen before
|
|
1761 (or |netrw-ctrl-l| is used).
|
|
1762
|
|
1763 Fast browsing retains old directory listing
|
|
1764 buffers so that they don't need to be
|
|
1765 re-acquired. This feature is especially
|
|
1766 important for remote browsing. However, if
|
|
1767 a file is introduced or deleted into or from
|
|
1768 such directories, the old directory buffer
|
|
1769 becomes out-of-date. One may always refresh
|
|
1770 such a directory listing with |netrw-ctrl-l|.
|
|
1771 This option gives the user the choice of
|
|
1772 trading off accuracy (ie. up-to-date listing)
|
|
1773 versus speed.
|
|
1774
|
|
1775 *g:netrw_fname_escape* =' ?&;%'
|
|
1776 Used on filenames before remote reading/writing
|
|
1777
|
|
1778 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
|
|
1779 that can show up as "directories" and "files"
|
|
1780 in the listing. This pattern is used to
|
|
1781 remove such embedded messages. By default its
|
|
1782 value is:
|
|
1783 '^total\s\+\d\+$\|
|
|
1784 ^Trying\s\+\d\+.*$\|
|
|
1785 ^KERBEROS_V\d rejected\|
|
|
1786 ^Security extensions not\|
|
|
1787 No such file\|
|
|
1788 : connect to address [0-9a-fA-F:]*
|
|
1789 : No route to host$'
|
|
1790
|
|
1791 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
|
|
1792 listing. Defaults:
|
|
1793 unix or g:netrw_cygwin set: : "ls -lF"
|
|
1794 otherwise "dir"
|
|
1795
|
|
1796
|
|
1797 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
|
|
1798 listing, sorted by size of file.
|
|
1799 Defaults:
|
|
1800 unix or g:netrw_cygwin set: : "ls -slF"
|
|
1801 otherwise "dir"
|
|
1802
|
|
1803 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
|
|
1804 listing, sorted by time of last modification.
|
|
1805 Defaults:
|
|
1806 unix or g:netrw_cygwin set: : "ls -tlF"
|
|
1807 otherwise "dir"
|
|
1808
|
|
1809 *g:netrw_glob_escape* ='[]*?`{~$'
|
|
1810 These characters in directory names are
|
|
1811 escaped before applying glob()
|
|
1812
|
|
1813 *g:netrw_hide* if true, the hiding list is used
|
|
1814 default: =0
|
|
1815
|
|
1816 *g:netrw_keepdir* =1 (default) keep current directory immune from
|
|
1817 the browsing directory.
|
|
1818 =0 keep the current directory the same as the
|
|
1819 browsing directory.
|
|
1820 The current browsing directory is contained in
|
|
1821 b:netrw_curdir (also see |netrw-c|)
|
|
1822
|
|
1823 *g:netrw_list_cmd* command for listing remote directories
|
|
1824 default: (if ssh is executable)
|
|
1825 "ssh HOSTNAME ls -FLa"
|
|
1826
|
|
1827 *g:netrw_liststyle* Set the default listing style:
|
|
1828 = 0: thin listing (one file per line)
|
|
1829 = 1: long listing (one file per line with time
|
|
1830 stamp information and file size)
|
|
1831 = 2: wide listing (multiple files in columns)
|
|
1832 = 3: tree style listing
|
|
1833 *g:netrw_list_hide* comma separated pattern list for hiding files
|
|
1834 Patterns are regular expressions (see |regexp|)
|
|
1835 Example: let g:netrw_list_hide= '.*\.swp$'
|
|
1836 default: ""
|
|
1837
|
|
1838 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
|
|
1839 ="copy" Windows
|
|
1840 Copies marked files (|netrw-mf|) to target
|
|
1841 directory (|netrw-mt|, |netrw-mc|)
|
|
1842
|
|
1843 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
|
|
1844 ="move" Windows
|
|
1845 Moves marked files (|netrw-mf|) to target
|
|
1846 directory (|netrw-mt|, |netrw-mm|)
|
|
1847
|
|
1848 *g:netrw_local_mkdir* command for making a local directory
|
|
1849 default: "mkdir"
|
|
1850
|
|
1851 *g:netrw_local_rmdir* remove directory command (rmdir)
|
|
1852 default: "rmdir"
|
|
1853
|
|
1854 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
|
|
1855 listings fit on 80 column displays.
|
|
1856 If your screen is wider, and you have file
|
|
1857 or directory names longer than 32 bytes,
|
|
1858 you may set this option to keep listings
|
|
1859 columnar.
|
|
1860
|
|
1861 *g:netrw_mkdir_cmd* command for making a remote directory
|
|
1862 default: "ssh USEPORT HOSTNAME mkdir"
|
|
1863
|
|
1864 *g:netrw_retmap* if it exists and is set to one, then
|
|
1865 <2-leftmouse> will be mapped for easy
|
|
1866 return to the netrw browser window.
|
|
1867 (example: click once to select and open
|
|
1868 a file, double-click to return)
|
|
1869 default: =0
|
|
1870
|
|
1871 *g:netrw_rm_cmd* command for removing files
|
|
1872 default: "ssh USEPORT HOSTNAME rm"
|
|
1873
|
|
1874 *g:netrw_rmdir_cmd* command for removing directories
|
|
1875 default: "ssh USEPORT HOSTNAME rmdir"
|
|
1876
|
|
1877 *g:netrw_rmf_cmd* command for removing softlinks
|
|
1878 default: "ssh USEPORT HOSTNAME rm -f"
|
|
1879
|
|
1880 *g:netrw_sort_by* sort by "name", "time", or "size"
|
|
1881 default: "name"
|
|
1882
|
|
1883 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
|
|
1884 default: "normal"
|
|
1885
|
1668
|
1886 *g:netrw_sort_options* sorting is done using |:sort|; this
|
|
1887 variable's value is appended to the
|
|
1888 sort command. Thus one may ignore case,
|
|
1889 for example, with the following in your
|
|
1890 .vimrc: >
|
|
1891 let g:netrw_sort_options="i"
|
|
1892 < default: ""
|
|
1893
|
1621
|
1894 *g:netrw_sort_sequence* when sorting by name, first sort by the
|
|
1895 comma-separated pattern sequence
|
|
1896 default: '[\/]$,*,\.bak$,\.o$,\.h$,
|
|
1897 \.info$,\.swp$,\.obj$'
|
|
1898
|
|
1899 *g:netrw_special_syntax* If true, then certain files will be shown
|
|
1900 in special syntax in the browser:
|
|
1901
|
|
1902 netrwBak : *.bak
|
|
1903 netrwCompress: *.gz *.bz2 *.Z *.zip
|
|
1904 netrwData : *.dat
|
|
1905 netrwHdr : *.h
|
|
1906 netrwLib : *.a *.so *.lib *.dll
|
|
1907 netrwMakefile: [mM]akefile *.mak
|
|
1908 netrwObj : *.o *.obj
|
|
1909 netrwTags : tags ANmenu ANtags
|
|
1910 netrwTilde : *~
|
|
1911 netrwTmp : tmp* *tmp
|
|
1912
|
|
1913 These syntax highlighting groups are linked
|
|
1914 to Folded or DiffChange by default
|
|
1915 (see |hl-Folded| and |hl-DiffChange|), but
|
|
1916 one may put lines like >
|
|
1917 hi link netrwCompress Visual
|
|
1918 < into one's <.vimrc> to use one's own
|
|
1919 preferences.
|
|
1920
|
|
1921 *g:netrw_ssh_cmd* One may specify an executable command
|
|
1922 to use instead of ssh for remote actions
|
|
1923 such as listing, file removal, etc.
|
|
1924 default: ssh
|
|
1925
|
|
1926 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
|
|
1927 messages, banners, and whatnot that one doesn't
|
|
1928 want masquerading as "directories" and "files".
|
|
1929 Use this pattern to remove such embedded
|
|
1930 messages. By default its value is:
|
|
1931 '^total\s\+\d\+$'
|
|
1932
|
|
1933
|
|
1934 *g:netrw_tmpfile_escape* =' &;'
|
|
1935 escape() is applied to all temporary files
|
|
1936 to escape these characters.
|
|
1937
|
|
1938 *g:netrw_timefmt* specify format string to vim's strftime().
|
|
1939 The default, "%c", is "the preferred date
|
|
1940 and time representation for the current
|
|
1941 locale" according to my manpage entry for
|
|
1942 strftime(); however, not all are satisfied
|
|
1943 with it. Some alternatives:
|
|
1944 "%a %d %b %Y %T",
|
|
1945 " %a %Y-%m-%d %I-%M-%S %p"
|
|
1946 default: "%c"
|
|
1947
|
|
1948 *g:netrw_use_noswf* netrw normally avoids writing swapfiles
|
|
1949 for browser buffers. However, under some
|
|
1950 systems this apparently is causing nasty
|
|
1951 ml_get errors to appear; if you're getting
|
|
1952 ml_get errors, try putting
|
|
1953 let g:netrw_use_noswf= 0
|
|
1954 in your .vimrc.
|
|
1955
|
|
1956 *g:netrw_winsize* specify initial size of new windows made with
|
|
1957 "o" (see |netrw-o|), "v" (see |netrw-v|),
|
|
1958 |:Hexplore| or |:Vexplore|.
|
|
1959 default: ""
|
|
1960
|
|
1961 *g:netrw_xstrlen* Controls how netrw computes a string
|
|
1962 including multi-byte characters' string
|
|
1963 length. (thanks to N Weibull, T Mechelynck)
|
|
1964 =0: uses Vim's built-in strlen()
|
|
1965 =1: number of codepoints (Latin + a combining
|
|
1966 circumflex is two codepoints) (DEFAULT)
|
|
1967 =2: number of spacing codepoints (Latin a +
|
|
1968 combining circumflex is one spacing
|
|
1969 codepoint; a hard tab is one; wide and
|
|
1970 narrow CJK are one each; etc.)
|
|
1971 =3: virtual length (counting tabs as anything
|
|
1972 between 1 and |'tabstop'|, wide CJJK as 2
|
|
1973 rather than 1, Arabic alif as zero when
|
|
1974 immediately preceded by lam, one
|
|
1975 otherwise, etc)
|
|
1976
|
|
1977 *g:NetrwTopLvlMenu* This variable specifies the top level
|
|
1978 menu name; by default, it's "Netrw.". If
|
|
1979 you wish to change this, do so in your
|
|
1980 .vimrc.
|
|
1981
|
|
1982 NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2
|
|
1983
|
|
1984 Netrw has been designed to handle user options by saving them, setting the
|
|
1985 options to something that's compatible with netrw's needs, and then restoring
|
|
1986 them. However, the autochdir option: >
|
|
1987 :set acd
|
|
1988 is problematical. Autochdir sets the current directory to that containing the
|
|
1989 file you edit; this apparently also applies to directories. In other words,
|
|
1990 autochdir sets the current directory to that containing the "file" (even if
|
|
1991 that "file" is itself a directory).
|
|
1992
|
|
1993 NETRW SETTINGS *netrw-settings* {{{2
|
482
|
1994
|
|
1995 With the NetrwSettings.vim plugin, >
|
|
1996 :NetrwSettings
|
|
1997 will bring up a window with the many variables that netrw uses for its
|
559
|
1998 settings. You may change any of their values; when you save the file, the
|
|
1999 settings therein will be used. One may also press "?" on any of the lines for
|
|
2000 help on what each of the variables do.
|
482
|
2001
|
1621
|
2002 (also see: |netrw-browser-var| |netrw-protocol| |netrw-var| |netrw-variables|)
|
1121
|
2003
|
482
|
2004
|
9
|
2005 ==============================================================================
|
1621
|
2006 OBTAINING A FILE *netrw-O* {{{2
|
|
2007
|
|
2008 If there are no marked files:
|
|
2009
|
|
2010 When browsing a remote directory, one may obtain a file under the cursor
|
|
2011 (ie. get a copy on your local machine, but not edit it) by pressing the O
|
|
2012 key.
|
|
2013
|
|
2014 If there are marked files:
|
|
2015
|
|
2016 The marked files will be obtained (ie. a copy will be transferred to your
|
|
2017 local machine, but not set up for editing).
|
|
2018
|
|
2019 Only ftp and scp are supported for this operation (but since these two are
|
|
2020 available for browsing, that shouldn't be a problem). The status bar will
|
|
2021 then show, on its right hand side, a message like "Obtaining filename". The
|
|
2022 statusline will be restored after the transfer is complete.
|
|
2023
|
|
2024 Netrw can also "obtain" a file using the local browser. Netrw's display
|
|
2025 of a directory is not necessarily the same as Vim's "current directory",
|
|
2026 unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
|
|
2027 a file using the local browser (by putting the cursor on it) and pressing
|
|
2028 "O" will then "obtain" the file; ie. copy it to Vim's current directory.
|
|
2029
|
|
2030 Related topics:
|
|
2031 * To see what the current directory is, use |:pwd|
|
|
2032 * To make the currently browsed directory the current directory, see |netrw-c|
|
|
2033 * To automatically make the currently browsed directory the current
|
|
2034 directory, see |g:netrw_keepdir|.
|
|
2035
|
|
2036
|
1668
|
2037 OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
|
|
2038
|
|
2039 To open a file in netrw's current directory, press "%". This map will
|
|
2040 query the user for a new filename; an empty file by that name will be
|
|
2041 placed in the netrw's current directory (ie. b:netrw_curdir).
|
|
2042
|
|
2043
|
1621
|
2044 PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2
|
|
2045
|
|
2046 One may use a preview window by using the "p" key when the cursor is atop the
|
|
2047 desired filename to be previewed. The display will then split to show both
|
|
2048 the browser (where the cursor will remain) and the file (see |:pedit|).
|
|
2049 By default, the split will be taken horizontally; one may use vertical
|
|
2050 splitting if one has set |g:netrw_preview| first.
|
|
2051
|
|
2052
|
|
2053 PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
|
|
2054
|
|
2055 To edit a file or directory in the previously used (last accessed) window (see
|
|
2056 :he |CTRL-W_p|), press a "P". If there's only one window, then the one window
|
|
2057 will be horizontally split (above/below splitting is controlled by
|
|
2058 |g:netrw_alto|, and its initial size is controlled by |g:netrw_winsize|).
|
|
2059
|
|
2060 If there's more than one window, the previous window will be re-used on
|
|
2061 the selected file/directory. If the previous window's associated buffer
|
|
2062 has been modified, and there's only one window with that buffer, then
|
|
2063 the user will be asked if s/he wishes to save the buffer first (yes,
|
|
2064 no, or cancel).
|
|
2065
|
|
2066
|
|
2067 REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2
|
|
2068
|
|
2069 To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
|
|
2070 hit the <cr> when atop the ./ directory entry in the listing. One may also
|
|
2071 refresh a local directory by using ":e .".
|
|
2072
|
|
2073
|
|
2074 RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2
|
|
2075
|
|
2076 If there are no marked files: (see |netrw-mf|)
|
|
2077
|
|
2078 Renaming/moving files and directories involves moving the cursor to the
|
|
2079 file/directory to be moved (renamed) and pressing "R". You will then be
|
|
2080 queried for where you want the file/directory to be moved. You may select
|
|
2081 a range of lines with the "V" command (visual selection), and then
|
|
2082 pressing "R".
|
|
2083
|
|
2084 If there are marked files: (see |netrw-mf|)
|
|
2085
|
|
2086 Marked files will be renamed (moved). You will be queried as above in
|
|
2087 order to specify where you want the file/directory to be moved.
|
|
2088
|
|
2089 WARNING:~
|
|
2090
|
|
2091 Note that moving files is a dangerous operation; copies are safer. That's
|
|
2092 because a "move" for remote files is actually a copy + delete -- and if
|
|
2093 the copy fails and the delete does not, you may lose the file.
|
|
2094
|
|
2095 The g:netrw_rename_cmd variable is used to implement renaming. By default its
|
|
2096 value is:
|
|
2097
|
|
2098 ssh HOSTNAME mv
|
|
2099
|
|
2100 One may rename a block of files and directories by selecting them with
|
|
2101 the V (|linewise-visual|).
|
|
2102
|
|
2103
|
|
2104 REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2
|
|
2105
|
|
2106 One may toggle between normal and reverse sorting order by pressing the
|
|
2107 "r" key.
|
|
2108
|
|
2109 Related topics: |netrw-s|
|
|
2110 Associated setting variable: |g:netrw_sort_direction|
|
|
2111
|
|
2112
|
|
2113 SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
|
|
2114
|
|
2115 One may select the sorting style by name, time, or (file) size. The "s" map
|
|
2116 allows one to circulate amongst the three choices; the directory listing will
|
|
2117 automatically be refreshed to reflect the selected style.
|
|
2118
|
|
2119 Related topics: |netrw-r| |netrw-S|
|
|
2120 Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
|
|
2121
|
|
2122
|
|
2123 10. Problems and Fixes *netrw-problems* {{{1
|
24
|
2124
|
|
2125 (This section is likely to grow as I get feedback)
|
|
2126 (also see |netrw-debug|)
|
477
|
2127 *netrw-p1*
|
24
|
2128 P1. I use windows 95, and my ftp dumps four blank lines at the
|
|
2129 end of every read.
|
|
2130
|
|
2131 See |netrw-fixup|, and put the following into your
|
|
2132 <.vimrc> file:
|
|
2133
|
|
2134 let g:netrw_win95ftp= 1
|
466
|
2135
|
477
|
2136 *netrw-p2*
|
1121
|
2137 P2. I use Windows, and my network browsing with ftp doesn't sort by
|
|
2138 time or size! -or- The remote system is a Windows server; why
|
|
2139 don't I get sorts by time or size?
|
24
|
2140
|
|
2141 Windows' ftp has a minimal support for ls (ie. it doesn't
|
|
2142 accept sorting options). It doesn't support the -F which
|
|
2143 gives an explanatory character (ABC/ for "ABC is a directory").
|
1121
|
2144 Netrw then uses "dir" to get both its short and long listings.
|
|
2145 If you think your ftp does support a full-up ls, put the
|
|
2146 following into your <.vimrc>: >
|
24
|
2147
|
1121
|
2148 let g:netrw_ftp_list_cmd = "ls -lF"
|
|
2149 let g:netrw_ftp_timelist_cmd= "ls -tlF"
|
|
2150 let g:netrw_ftp_sizelist_cmd= "ls -slF"
|
|
2151 <
|
24
|
2152 Alternatively, if you have cygwin on your Windows box, put
|
1121
|
2153 into your <.vimrc>: >
|
24
|
2154
|
|
2155 let g:netrw_cygwin= 1
|
1121
|
2156 <
|
|
2157 This problem also occurs when the remote system is Windows.
|
|
2158 In this situation, the various g:netrw_ftp_[time|size]list_cmds
|
|
2159 are as shown above, but the remote system will not correctly
|
|
2160 modify its listing behavior.
|
|
2161
|
24
|
2162
|
477
|
2163 *netrw-p3*
|
24
|
2164 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
|
|
2165 used ssh! That wasn't what I asked for...
|
|
2166
|
|
2167 Netrw has two methods for browsing remote directories: ssh
|
|
2168 and ftp. Unless you specify ftp specifically, ssh is used.
|
|
2169 When it comes time to do download a file (not just a directory
|
|
2170 listing), netrw will use the given protocol to do so.
|
|
2171
|
477
|
2172 *netrw-p4*
|
24
|
2173 P4. I would like long listings to be the default.
|
|
2174
|
1621
|
2175 Put the following statement into your |.vimrc|: >
|
|
2176
|
1121
|
2177 let g:netrw_liststyle= 1
|
1621
|
2178 <
|
|
2179 Check out |netrw-browser-var| for more customizations that
|
26
|
2180 you can set.
|
24
|
2181
|
477
|
2182 *netrw-p5*
|
24
|
2183 P5. My times come up oddly in local browsing
|
|
2184
|
|
2185 Does your system's strftime() accept the "%c" to yield dates
|
|
2186 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
|
|
2187 and find out what option should be used. Then put it into
|
1621
|
2188 your |.vimrc|: >
|
|
2189
|
24
|
2190 let g:netrw_timefmt= "%X" (where X is the option)
|
1621
|
2191 <
|
477
|
2192 *netrw-p6*
|
26
|
2193 P6. I want my current directory to track my browsing.
|
|
2194 How do I do that?
|
24
|
2195
|
1621
|
2196 Put the following line in your |.vimrc|:
|
|
2197 >
|
794
|
2198 let g:netrw_keepdir= 0
|
1621
|
2199 <
|
1121
|
2200 *netrw-p7*
|
|
2201 P7. I use Chinese (or other non-ascii) characters in my filenames, and
|
|
2202 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
|
466
|
2203
|
1121
|
2204 (taken from an answer provided by Wu Yongwei on the vim
|
|
2205 mailing list)
|
|
2206 I now see the problem. You code page is not 936, right? Vim
|
|
2207 seems only able to open files with names that are valid in the
|
|
2208 current code page, as are many other applications that do not
|
|
2209 use the Unicode version of Windows APIs. This is an OS-related
|
|
2210 issue. You should not have such problems when the system
|
|
2211 locale uses UTF-8, such as modern Linux distros.
|
|
2212
|
|
2213 (...it is one more reason to recommend that people use utf-8!)
|
|
2214
|
|
2215 *netrw-p8*
|
|
2216 P8. I'm getting "ssh is not executable on your system" -- what do I
|
|
2217 do?
|
|
2218
|
|
2219 (Dudley Fox) Most people I know use putty for windows ssh. It
|
|
2220 is a free ssh/telnet application. You can read more about it
|
|
2221 here:
|
|
2222
|
|
2223 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also:
|
|
2224
|
|
2225 (Marlin Unruh) This program also works for me. It's a single
|
|
2226 executable, so he/she can copy it into the Windows\System32
|
|
2227 folder and create a shortcut to it.
|
|
2228
|
|
2229 (Dudley Fox) You might also wish to consider plink, as it
|
|
2230 sounds most similar to what you are looking for. plink is an
|
|
2231 application in the putty suite.
|
|
2232
|
|
2233 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink
|
|
2234
|
|
2235 (Vissale Neang) Maybe you can try OpenSSH for windows, which
|
|
2236 can be obtained from:
|
|
2237
|
|
2238 http://sshwindows.sourceforge.net/
|
|
2239
|
|
2240 It doesn't need the full Cygwin package.
|
|
2241
|
|
2242 (Antoine Mechelynck) For individual Unix-like programs needed
|
|
2243 for work in a native-Windows environment, I recommend getting
|
|
2244 them from the GnuWin32 project on sourceforge if it has them:
|
|
2245
|
|
2246 http://gnuwin32.sourceforge.net/
|
|
2247
|
|
2248 Unlike Cygwin, which sets up a Unix-like virtual machine on
|
|
2249 top of Windows, GnuWin32 is a rewrite of Unix utilities with
|
|
2250 Windows system calls, and its programs works quite well in the
|
|
2251 cmd.exe "Dos box".
|
|
2252
|
|
2253 (dave) Download WinSCP and use that to connect to the server.
|
|
2254 In Preferences > Editors, set gvim as your editor:
|
|
2255
|
|
2256 - Click "Add..."
|
|
2257 - Set External Editor (adjust path as needed, include
|
|
2258 the quotes and !.! at the end):
|
|
2259 "c:\Program Files\Vim\vim70\gvim.exe" !.!
|
|
2260 - Check that the filetype in the box below is
|
|
2261 {asterisk}.{asterisk} (all files), or whatever types
|
|
2262 you want (cec: change {asterisk} to * ; I had to
|
|
2263 write it that way because otherwise the helptags
|
1621
|
2264 system thinks it's a tag)
|
|
2265 - Make sure it's at the top of the listbox (click it,
|
|
2266 then click "Up" if it's not)
|
1121
|
2267 If using the Norton Commander style, you just have to hit <F4>
|
|
2268 to edit a file in a local copy of gvim.
|
|
2269
|
|
2270 (Vit Gottwald) How to generate public/private key and save
|
|
2271 public key it on server: >
|
|
2272 http://www.tartarus.org/~simon/puttydoc/Chapter8.html#pubkey-gettingready
|
|
2273 8.3 Getting ready for public key authentication
|
|
2274 <
|
1621
|
2275 How to use a private key with 'pscp': >
|
|
2276
|
1121
|
2277 http://www.tartarus.org/~simon/puttydoc/Chapter5.html
|
|
2278 5.2.4 Using public key authentication with PSCP
|
|
2279 <
|
1621
|
2280 (Ben Schmidt) I find the ssh included with cwRsync is
|
|
2281 brilliant, and install cwRsync or cwRsyncServer on most
|
|
2282 Windows systems I come across these days. I guess COPSSH,
|
|
2283 packed by the same person, is probably even better for use as
|
|
2284 just ssh on Windows, and probably includes sftp, etc. which I
|
|
2285 suspect the cwRsync doesn't, though it might
|
|
2286
|
1121
|
2287 (cec) To make proper use of these suggestions above, you will
|
|
2288 need to modify the following user-settable variables in your
|
|
2289 .vimrc:
|
|
2290
|
1621
|
2291 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd|
|
|
2292 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
|
1121
|
2293
|
|
2294 The first one (|g:netrw_ssh_cmd|) is the most important; most
|
|
2295 of the others will use the string in g:netrw_ssh_cmd by
|
|
2296 default.
|
|
2297 *netrw-p9* *netrw-ml_get*
|
|
2298 P9. I'm browsing, changing directory, and bang! ml_get errors
|
|
2299 appear and I have to kill vim. Any way around this?
|
|
2300
|
|
2301 Normally netrw attempts to avoid writing swapfiles for
|
|
2302 its temporary directory buffers. However, on some systems
|
|
2303 this attempt appears to be causing ml_get errors to
|
|
2304 appear. Please try setting |g:netrw_use_noswf| to 0
|
|
2305 in your <.vimrc>: >
|
|
2306 let g:netrw_use_noswf= 0
|
|
2307 <
|
1621
|
2308 *netrw-p10*
|
|
2309 P10. I'm being pestered with "[something] is a directory" and
|
|
2310 "Press ENTER or type command to continue" prompts...
|
|
2311
|
|
2312 The "[something] is a directory" prompt is issued by Vim,
|
|
2313 not by netrw, and there appears to be no way to work around
|
|
2314 it. Coupled with the default cmdheight of 1, this message
|
|
2315 causes the "Press ENTER..." prompt. So: read |hit-enter|;
|
|
2316 I also suggest that you set your |'cmdheight'| to 2 (or more) in
|
|
2317 your <.vimrc> file.
|
|
2318
|
|
2319 *netrw-p11*
|
|
2320 P11. I want to have two windows; a thin one on the left and my editing
|
|
2321 window on the right. How can I do this?
|
|
2322
|
|
2323 * Put the following line in your <.vimrc>:
|
|
2324 let g:netrw_altv = 1
|
|
2325 * Edit the current directory: :e .
|
|
2326 * Select some file, press v
|
|
2327 * Resize the windows as you wish (see |CTRL-W_<| and
|
|
2328 |CTRL-W_>|). If you're using gvim, you can drag
|
|
2329 the separating bar with your mouse.
|
|
2330 * When you want a new file, use ctrl-w h to go back to the
|
|
2331 netrw browser, select a file, then press P (see |CTRL-W_h|
|
|
2332 and |netrw-P|). If you're using gvim, you can press
|
|
2333 <leftmouse> in the browser window and then press the
|
|
2334 <middlemouse> to select the file.
|
24
|
2335
|
|
2336 ==============================================================================
|
1621
|
2337 11. Debugging Netrw Itself *netrw-debug* {{{1
|
7
|
2338
|
|
2339 The <netrw.vim> script is typically available as:
|
477
|
2340 >
|
1621
|
2341 /usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
|
|
2342 /usr/local/share/vim/vim6x/autoload/netrw.vim
|
477
|
2343 < -or- >
|
1621
|
2344 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
|
|
2345 /usr/local/share/vim/vim7x/autoload/netrw.vim
|
477
|
2346 <
|
7
|
2347 which is loaded automatically at startup (assuming :set nocp).
|
|
2348
|
|
2349 1. Get the <Decho.vim> script, available as:
|
|
2350
|
1621
|
2351 http://mysite.verizon.net/astronaut/vim/index.html#DECHO
|
7
|
2352 or
|
534
|
2353 http://vim.sourceforge.net/scripts/script.php?script_id=120
|
7
|
2354
|
1621
|
2355 It now comes as a "vimball"; if you're using vim 7.0 or earlier,
|
|
2356 you'll need to update vimball, too. See
|
|
2357 http://mysite.verizon.net/astronaut/vim/index.html#VIMBALL
|
|
2358
|
|
2359 2. Edit the <netrw.vim> file by typing: >
|
22
|
2360
|
|
2361 vim netrw.vim
|
7
|
2362 :DechoOn
|
22
|
2363 :wq
|
1621
|
2364 <
|
|
2365 To restore to normal non-debugging behavior, re-edit <netrw.vim>
|
|
2366 and type >
|
7
|
2367
|
22
|
2368 vim netrw.vim
|
|
2369 :DechoOff
|
|
2370 :wq
|
1621
|
2371 <
|
22
|
2372 This command, provided by <Decho.vim>, will comment out all
|
|
2373 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
|
|
2374
|
1621
|
2375 3. Then bring up vim and attempt to evoke the problem by doing a
|
|
2376 transfer or doing some browsing. A set of messages should appear
|
|
2377 concerning the steps that <netrw.vim> took in attempting to
|
|
2378 read/write your file over the network in a separate tab.
|
7
|
2379
|
1121
|
2380 To save the file, use >
|
|
2381 :wincmd j
|
|
2382 :set bt=
|
|
2383 :w! DBG
|
|
2384 < Please send that information to <netrw.vim>'s maintainer, >
|
36
|
2385 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
|
1121
|
2386 <
|
7
|
2387 ==============================================================================
|
1121
|
2388 12. History *netrw-history* {{{1
|
7
|
2389
|
1668
|
2390 v126: Jun 30, 2008 * after having gone to a remote directory,
|
|
2391 <f1> was no longer taking one to the correct
|
|
2392 entry in the help (|netrw-quickhelp|). Fixed.
|
|
2393 Jul 01, 2008 * extracting the last filename from a wide listing
|
|
2394 missed the last letter when |'virtualedit'| not
|
|
2395 enabled.
|
|
2396 Jul 01, 2008 * vim foo/bar was creating [Scratch] buffers,
|
|
2397 where bar was also a directory
|
|
2398 Jul 01, 2008 * numerous additional changes were made to netrw
|
|
2399 to use fnameescape() and shellescape() instead
|
|
2400 of escape(). Not all changes have been tested
|
|
2401 as yet...
|
|
2402 Jul 01, 2008 * (James Vega reported) some problems with
|
|
2403 :NetrwSettings (due to no longer used setting
|
|
2404 variables).
|
|
2405 Jul 07, 2008 * Additional numerous changes to support security;
|
|
2406 shellescape(arg,1), etc.
|
1621
|
2407 v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he
|
|
2408 noted that gx was failing since its call to
|
|
2409 netrw#NetBrowseX() wasn't updated to
|
|
2410 netrw#NetrwBrowseX().
|
|
2411 * (Stanis Trendelenburg) ST provides a patch to
|
|
2412 supports davs: (dav + ssl)
|
|
2413 * (Rick Choi) noted that directory names comprised
|
|
2414 of three digits were not being displayed by
|
|
2415 the internal browser. Fixed.
|
|
2416 * (Erik Falor) provided a patch to handle problems
|
|
2417 with changing directory and |'acd'| option.
|
|
2418 * (James Vega, Teemu Likonen) noted that netrw
|
|
2419 wasn't handling multi-byte filenames/directories
|
|
2420 correctly. Fixed.
|
|
2421 * (Rick) found problem with g:netrw_maxfilenamelen
|
|
2422 being overridden.
|
|
2423 * (James Vega) pointed out that netrw was
|
|
2424 misidentifying all files in a symbolically linked
|
|
2425 directory as being symbolically linked
|
|
2426 themselves. This particular problem was fixed;
|
|
2427 however, there are now situations where
|
|
2428 symbolically linked files will not be detected.
|
|
2429 Really need an internal vim function to do this
|
|
2430 identification.
|
|
2431 Apr 17, 2008 * When g:netrw_keepdir==0, current directory
|
|
2432 doesn't necessarily equal b:netrw_curdir
|
|
2433 initially. Problem is due to the patch directly
|
|
2434 above.
|
|
2435 * Fixed qf to handle case where b:netrw_curdir
|
|
2436 isn't the same as the current directory under
|
|
2437 linux/macosx.
|
|
2438 * New: |netrw-mg| (apply vimgrep to marked files)
|
|
2439 May 05, 2008 * (Rick) pointed out that a "setlocal ts=32" was
|
|
2440 interfering with g:netrw_maxfilenamelen
|
|
2441 May 05, 2008 * (James Vega) a file inside a linked directory
|
|
2442 was showing up as a symbolic link itself.
|
|
2443 May 22, 2008 * symbolic links, fifos, and sockets are now
|
|
2444 indicated by a trailing @, |, or =, respectively.
|
|
2445 Jun 06, 2008 * Removed numerous bugs from the marked file
|
|
2446 move and copy. Tested these changes under
|
|
2447 Unix only thus far.
|
|
2448 * :Rexplore returns to the screen position in the
|
|
2449 netrw listing from whence the file was edited
|
|
2450 v124: Apr 02, 2008 * (Adrian Rollett) change the line supporting the
|
|
2451 "x" action for mac to use g:netrw_shq
|
|
2452 v123: Feb 27, 2008 * Marked files now keeps a "global" marked file
|
|
2453 list. The global marked file list is used to
|
|
2454 support tag processing and vimdiff'ing
|
|
2455 (|netrw-md| |netrw-mt|)
|
|
2456 * Been insuring that mm and mc works with various
|
|
2457 combinations of local and remote directories
|
|
2458 * (Stefan Bittner) http://.../ should always have
|
|
2459 filetype "html" -- fixed.
|
|
2460 * (Stefan Bittner) a "?" in a http://.../ request
|
|
2461 wasn't being handled correctly. Fixed by
|
|
2462 removing ? from default |g:netrw_tmpfile_escape|.
|
|
2463 * (Nico Weber) % codes in http://.../ requests
|
|
2464 weren't being handled correctly. Fixed by
|
|
2465 including % in default |g:netrw_fname_escape|.
|
|
2466 * (Stefan Bittner) attempts to update Buffers.Refresh
|
|
2467 were failing because locale use changed the menu
|
|
2468 names. I implemented a workaround.
|
|
2469 v122: Feb 12, 2008 * bugfix - first sorting sequence match now has
|
|
2470 priority
|
|
2471 Feb 14, 2008 * bugfix - sorting sequence was effectively ignoring
|
|
2472 sequencing priority of anything following '*'
|
|
2473 * toggling a marked file was showing incorrect list
|
|
2474 (list was correct, but displayed matches weren't)
|
|
2475 * |g:netrw_special_syntax| implemented
|
|
2476 v121: Feb 11, 2008 * Bram M reported that :e file ... :e . would not
|
|
2477 retain the alternate file. Fixed -- I hope!
|
|
2478 * bugfix -- apparently v120 broke an explicit
|
|
2479 :Explore dirname
|
|
2480 v120: Jan 21, 2008 * |netrw-mt| changed to allow for target selection
|
|
2481 based on whether or not word under cursor is a
|
|
2482 directory or file, or if cursor is in banner
|
|
2483 area.
|
|
2484 * |netrw-mh| included (hiding by marked-file suffix)
|
|
2485 * functions moved about a bit (improved
|
|
2486 categorization)
|
|
2487 * executable files now displayed with trailing (*)
|
|
2488 * symbolically linked files now displayed with
|
|
2489 trailing (@)
|
|
2490 * Somewhen, s:NetrwMarkFileMove() got damaged. Its
|
|
2491 now restored (missing an endif, for example).
|
|
2492 * |netrw-mu| implemented (unmarking marked files)
|
|
2493 * many bugs have been removed from the marked file
|
|
2494 system (tnx to Mark S. for feedback)
|
|
2495 * |netrw-ms| implemented (sourcing marked files)
|
|
2496 * fixed use of P with tree listing style
|
|
2497 * multiple tree listing now supported
|
|
2498 * ./ suppressed
|
|
2499 * changed q -> qb (query bookmarks)
|
|
2500 * implemented |netrw-qf|
|
|
2501 * Explore now has four special list-generation
|
|
2502 modes: */filepat **/filepat
|
|
2503 *//pattern **//pattern
|
|
2504 * gh (|netrw-gh|) is a shortcut for toggling the
|
|
2505 hiding of files and directories beginning with a
|
|
2506 dot
|
|
2507 v119: Jan 10, 2008 * When g:netrw_keepdir is false,
|
|
2508 NetrwOptionsRestore() had a problem
|
|
2509 (Bill McCarthy)
|
|
2510 Jan 11, 2008 * Netrw now shows symbolic links with a trailing
|
|
2511 "@" and special highlighting.
|
|
2512 Jan 15, 2008 * Changed g:netrw_noretmap -> |g:netrw_retmap|.
|
|
2513 Changed: disabled by default at Bram's
|
|
2514 preference.
|
|
2515 v118: Jan 02, 2008 * Fixed a problem with Windows;
|
|
2516 :Explore c:/path/ would not work,
|
|
2517 but :Explore c:/path would.
|
|
2518 * Fixed a bug in s:NetrwOptionRestore() - lcd's
|
|
2519 argument wasn't being properly escaped so it
|
|
2520 wouldn't handle spaces in directory names.
|
|
2521 (Gary Johnson)
|
|
2522 v117: Jan 02, 2008 * Fixed a problem with P; had to include
|
|
2523 a b:netrw_curdir bypass (Bram Moolenaar)
|
|
2524 v116: Nov 27, 2007 * netrw#LocalBrowseCheck() has &ft=="netrw"
|
|
2525 check to prevent doing a directory listing
|
|
2526 (was getting unexpected directory refreshes
|
|
2527 in the middle of some function calls)
|
|
2528 * NetrwOptionRestore moved after e! filename
|
|
2529 in order to retain user options for editing
|
|
2530 in s:NetrwBrowseChgDir()
|
|
2531 Dec 12, 2007 * Bug fix -- netrw does a better job of retaining
|
|
2532 user options when editing files under the aegis
|
|
2533 of the browser
|
|
2534 v115: Oct 04, 2007 * Erik Remmelzwaal pointed out that the use of
|
|
2535 shellslash in s:GetTempfile() was incorrect
|
|
2536 Oct 11, 2007 * Tracked down and eliminated a bug with editing
|
|
2537 remote *.tar.gz and *.tar.bz2 files
|
|
2538 Oct 11, 2007 * g:netrw_localmovecmd wasn't being initialized
|
|
2539 properly, and g:netrw_localcopycmd was being
|
|
2540 overwritten.
|
|
2541 Oct 12, 2007 * Placed all :Rexplore and <2-leftmouse> setup
|
|
2542 in a new support function (s:SetRexDir()).
|
|
2543 Oct 15, 2007 * new: g:netrw_browse_split == 4; means <cr>
|
|
2544 based selection will use previous window
|
|
2545 Oct 20, 2007 * also checks on |'shellxquote'| to set g:netrw_shq
|
|
2546 Oct 24, 2007 * Explore handles path/**/filename
|
|
2547 Oct 27, 2007 * sourcing remote files often didn't work with ftp,
|
|
2548 turns out that b:netrw_method was undefined, so
|
|
2549 s:SaveBufVars and s:RestoreBufVars() fixed it.
|
|
2550 v114: Sep 28, 2007 * mT, the map that invokes tags, has been improved
|
|
2551 to support use of remote tags files.
|
|
2552 Oct 02, 2007 * changed Netrw menu to use more submenus
|
|
2553 v113: Sep 07, 2007 * worked out why the cursor position wasn't being
|
|
2554 saved and restored as intended after doing such
|
|
2555 things as deleting and renaming files.
|
|
2556 Sep 11, 2007 * Fixed bug which effectively disabled <c-l> and
|
|
2557 <c-h> maps
|
|
2558 Sep 18, 2007 * there used to be one NetrwOptionRestore() call at
|
|
2559 the end of the s:NetrwBrowseChgDir() function;
|
|
2560 they're now at the end of every if..elseif..else
|
|
2561 block. The edit-a-file one is not quite at the end
|
|
2562 of its block; instead, its just before the edit.
|
|
2563 Restores user options, then this new placement
|
|
2564 allows ftplugins, autocmds, etc to change settings
|
|
2565 (ex. ftplugin/cpp.vim sets cindent).
|
|
2566 Sep 19, 2007 * changed all strlen() calls to use s:Strlen(), a
|
|
2567 function which handles utf-8 wide characters
|
|
2568 correctly.
|
|
2569 Sep 20, 2007 * (Nico Weber) the "x" command has been extended
|
|
2570 to Mac's OS/X (macunix); it now uses open to
|
|
2571 handle |netrw-x| browsing with special files.
|
|
2572 Sep 22, 2007 * Added g:netrw_noretmap to netrw at Tony M's
|
|
2573 request.
|
|
2574 * Included path to NetrwRemoteRmFile()
|
|
2575 v112: Aug 18, 2007 * added mx (|netrw-mx|) for executing arbitrary
|
|
2576 commands on marked files
|
|
2577 Aug 22, 2007 * more option save/restore work for
|
|
2578 s:NetrwBrowseChgDir(); s:NetrwOptionSave()
|
|
2579 and s:NetrwOptionRestore() now take a parameter
|
|
2580 specifying the type of variables to be used for
|
|
2581 saving and restoring (either "w:" or "s:")
|
|
2582 Sep 04, 2007 * added the :NetrwClean[!] command
|
|
2583 v111: Jul 25, 2007 * using Windows but not using Cygwin, netrw does a
|
|
2584 "file bufname" where the bufname uses /s
|
|
2585 instead of \s; Vim "fixes" it by changing the
|
|
2586 bufname to use \s anyway. This meant that
|
|
2587 NetrwGetBuffer() didn't find the appropriately
|
|
2588 named buffer, and so would generate a new
|
|
2589 buffer listing; hence the cursor would appear
|
|
2590 to have been moved when doing a preview.
|
|
2591 * added <2-leftmouse> map to return to netrw's
|
|
2592 browser display
|
|
2593 Aug 16, 2007 * added the mark-file system, including
|
|
2594 maps for mf mp mt mz and mu. Modifications
|
|
2595 made to maps for a D O and R to support
|
|
2596 marked files.
|
|
2597 v110: May 10, 2007 * added [ and ] maps to NetrwTreeListing
|
|
2598 May 25, 2007 * |g:netrw_preview| included
|
|
2599 May 29, 2007 * modifed netrw#NetBrowseX to consistently use
|
1668
|
2600 g:netrw_shq instead of hardcoded quotes,
|
1621
|
2601 and modified the snippet that sets up redir
|
|
2602 so Windows machines use "nul" instead of
|
|
2603 "/dev/null".
|
|
2604 Jun 01, 2007 * fixed bug -- NetGetBuffer() wasn't always
|
|
2605 recognizing a buffer name match when it should,
|
|
2606 thus resulting in [Scratch] buffers.
|
|
2607 Jun 04, 2007 * Gary Johnson found a bugfix for the "c" mapping
|
|
2608 when the directory is to be made current but
|
|
2609 the name contains spaces.
|
1209
|
2610 v109: Mar 26, 2007 * if a directory name includes a "$" character,
|
|
2611 Explore() will use expand() in an attempt to
|
|
2612 decipher the name.
|
|
2613 May 07, 2007 * g:netrw_use_errorwindow now allows one to
|
1621
|
2614 have error messages go to a reliable window
|
1209
|
2615 or to use a less reliable but recallable
|
|
2616 echoerr method
|
|
2617 May 07, 2007 * g:netrw_scpport and g:netrw_sshport support
|
1621
|
2618 use of -P and -p, respectively, to set port
|
1209
|
2619 for scp/ssh.
|
1121
|
2620 v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting
|
|
2621 remote browsing
|
|
2622 * netrw can now source remote files
|
|
2623 Jan 26, 2007 * Colton Jamieson noted that remote directory
|
|
2624 browsing did not support alternate port
|
|
2625 selection. This feature has now been extended
|
|
2626 to apply to all remote browsing commands via ssh.
|
|
2627 (list, remove/delete, rename)
|
|
2628 Jan 31, 2007 * Luis Florit reported that @* was an invalid
|
1209
|
2629 register. The @* register is now only saved and
|
|
2630 restored if |'guioptions'| contains "a".
|
1121
|
2631 Feb 02, 2007 * Fixed a bug that cropped up when writing files
|
|
2632 via scp using cygwin
|
|
2633 Feb 08, 2007 * tree listing mode managed to stop working again;
|
|
2634 fixed again!
|
|
2635 Feb 15, 2007 * Guido Van Hoecke reported that netrw didn't
|
1209
|
2636 handle browsing well with M$ ftp servers. He even
|
1121
|
2637 set up a temporary account for me to test with
|
|
2638 (thanks!). Netrw now can browse M$ ftp servers.
|
|
2639 v107: Oct 12, 2006 * bypassed the autowrite option
|
|
2640 Oct 24, 2006 * handles automatic decompression of *.gz and *.bz2
|
|
2641 files
|
|
2642 Nov 03, 2006 * Explore will highlight matching files when
|
|
2643 **/pattern is used (and if the |'hls'| option
|
|
2644 is set)
|
|
2645 Nov 09, 2006 * a debugging line, when enabled, was inadvertently
|
|
2646 bringing up help instead of simply reporting on
|
|
2647 list contents
|
|
2648 Nov 21, 2006 * tree listing improved (cursor remains put)
|
|
2649 Nov 27, 2006 * fixed b:netrw_curdir bug when repeated "i"s were
|
|
2650 pressed.
|
|
2651 Dec 15, 2006 * considerable qty of changes, mostly to share more
|
|
2652 code between local and remote browsing. Includes
|
|
2653 support for tree-style listing for both remote
|
|
2654 and local browsing.
|
|
2655 Dec 15, 2006 * Included Peter Bengtsson's modifications to
|
|
2656 support the Amiga.
|
|
2657 v106: Sep 21, 2006 * removed old v:version<700 code as netrw now
|
|
2658 requires vim 7.0
|
|
2659 * worked around a bug where register * was
|
|
2660 overwritten during local browsing
|
|
2661 v104: Sep 05, 2006 * as suggested by Rodolfo Borges, :Explore and
|
|
2662 variants will position the cursor on the file
|
|
2663 just having been edited
|
|
2664 * changed default |g:netrw_sort_sequence| order
|
|
2665 * changed b, Nb to simply mb (see |netrw-mb|)
|
|
2666 * changed B, NB to simply gb (see |netrw-gb|)
|
|
2667 * tree listing style (see |g:netrw_liststyle|)
|
|
2668 * attempts to retain the alternate file
|
|
2669 v103: Jul 26, 2006 * used Yakov Lerner's tip#1289 to improve netrw
|
|
2670 error message display
|
|
2671 * wide listings didn't handle files with backslashes
|
|
2672 in their names properly. A symptom was an
|
|
2673 inability to open files.
|
|
2674 Aug 09, 2006 * included "t" mapping for opening tabbed windows,
|
|
2675 both for remote and local browsing
|
|
2676 * changed netrw_longlist to netrw_liststyle
|
|
2677 Aug 15, 2006 * fixed one of the NB maps
|
|
2678 Aug 22, 2006 * changed *Explore commands to use -nargs=* instead
|
|
2679 of -nargs=?. Allows both -complete=dir _and_ the
|
|
2680 starstar arguments to work (-nargs=? seems to
|
|
2681 require one or the other).
|
|
2682 Aug 23, 2006 * copied all w:.. variables across splits to
|
|
2683 new windows
|
|
2684 Aug 25, 2006 * when g:netrw_browsex_viewer was '-'
|
|
2685 (see |g:netrw_browsex_viewer|) it wasn't causing
|
|
2686 netrwFileHandlers#Invoke() to be called as it
|
|
2687 was expected to. (tnx Steve Dugaro)
|
|
2688 Aug 29, 2006 * changed NetBrowseX() to use "setlocal ... noswf"
|
|
2689 instead of "set ... noswf" (tnx Benji Fisher)
|
|
2690 Aug 31, 2006 * tabs and fastbrowse<=1 didn't work together.
|
|
2691 v102: Jun 15, 2006 * chgd netrwPlugin to call netrw#LocalBrowseCheck()
|
|
2692 * bugfix: g:netrw_keepdir==0 had stopped working
|
|
2693 Jul 06, 2006 * bugfix: NetOptionSave/Restore now saves/restores
|
|
2694 the unnamed register (|registers|)
|
|
2695 Jul 07, 2006 * |g:netrw_menu| support included
|
|
2696 Jul 13, 2006 * :Texplore command implemented
|
|
2697 Jul 17, 2006 * NetSplit and (Local|Net)BrowseChgDir() were both
|
|
2698 splitting windows. This affected o, v, and
|
|
2699 g:netrw_browse_split.
|
|
2700 Jul 20, 2006 * works around wildignore setting (was causing
|
|
2701 netrw's local browser not to list wildignore'd
|
|
2702 files)
|
|
2703 Jul 24, 2006 * <leftmouse> acts as a <cr> for selecting a file
|
|
2704 <rightmouse> acts as a <del> for deleting a file
|
|
2705 v100: May 14, 2006 * when using Windows and shell==cmd.exe, the
|
|
2706 default for g:netrw_ignorenetrc is now 1
|
|
2707 * bugfix: unwanted ^Ms now removed
|
|
2708 (affected shell==cmd.exe - Windows)
|
|
2709 * added Bookmarks and History to the menu
|
|
2710 * an error message about non-existing
|
|
2711 w:netrw_longlist was appearing during attempts to
|
|
2712 Explore (fixed)
|
|
2713 * g:netrw_shq now available to make netrw use
|
|
2714 specified style of quotes for commands
|
|
2715 May 29, 2006 * user NFH_*() functions were inadvertently being
|
|
2716 ignored
|
|
2717 * fixed a Windows non-cygwin ftp handling problem.
|
|
2718 * hiding pattern candidate separators included some
|
|
2719 characters it shouldn't have (tnx to Osei Poku)
|
|
2720 Jun 01, 2006 * for browsing, netrw was supposed to use "dir"
|
|
2721 instead of "ls -lF" when using
|
|
2722 ftp+non-cygwin+windows. Fixed.
|
|
2723 * an inadvertently left-in-place debugging statement
|
|
2724 was preventing use of the "x" key with browsing.
|
|
2725 Jun 05, 2006 * g:netrw_nogx available to prevent making the gx
|
|
2726 map (see |g:netrw_nogx|)
|
1209
|
2727 * bugfix, Explore wouldn't change directory
|
1121
|
2728 properly (vim ., :Explore subdirname)
|
|
2729 Jun 06, 2006 * moved history to 2nd line in Netrw menu
|
|
2730 * fixed delete for unix-based systems
|
|
2731 Jun 07, 2006 * x key now works for windows-noncygwin-ftp
|
|
2732 Jun 08, 2006 * Explore */pat and **//pat now wraps
|
|
2733 v99: May 09, 2006 * g:netrw_browse_split=3 for opening files in new
|
|
2734 tabs implemented.
|
|
2735 May 12, 2006 * deletes temporary file at end of NetRead()
|
|
2736 * visual mode based Obtain implemented
|
|
2737 * added -complete=dir to the various Explore
|
|
2738 commands
|
|
2739 v98: May 02, 2006 * the "p" key didn't work properly when the browsing
|
|
2740 directory name had spaces in it.
|
|
2741 v97: May 01, 2006 * exists("&acd") now used to determine if
|
|
2742 the 'acd' option exists
|
|
2743 * "obtain" now works again under Windows
|
1621
|
2744 v96: * bugfix - the |'acd'| option is not always defined
|
|
2745 but is now bypassed only when it is
|
|
2746 v95: * bugfix - Hiding mode worked correctly (don't show
|
|
2747 any file matching any of the g:netrw_hide
|
|
2748 patterns), but showing mode was showing only those
|
|
2749 files that didn't match any of the g:netrw_hide
|
|
2750 patterns. Instead, it now shows all files that
|
|
2751 match any of the g:netrw_hide patterns (the
|
|
2752 difference between a logical and and logical or).
|
|
2753 v94: * bugfix - a Decho() had a missing quote; only
|
|
2754 affects things when debugging was enabled.
|
|
2755 v93: * bugfix - removed FocusGained event from causing a
|
|
2756 slow-browser refresh for Windows
|
|
2757 v92: * :Explore **//pattern implemented
|
|
2758 (**/filepattern was already taken)
|
|
2759 v91: * :Explore */pattern implemented
|
|
2760 * |'acd'| option bypassed
|
|
2761 v90: * mark ', as suggested by Yegappan Lakshmanan, used
|
|
2762 to help guarantee entry into the jump list when
|
|
2763 appropriate.
|
|
2764 * <s-down> and <s-up> are no longer defined until a
|
|
2765 :Explore **/pattern is used (if the user already
|
|
2766 has a map for them). They will be defined for new
|
|
2767 browser windows from that point forward.
|
|
2768 v89: * A <s-down>, <s-up>, :Nexplore, or a :Pexplore
|
|
2769 without having first done an :Explore **/pattern
|
|
2770 (see |netrw-starstar|) caused
|
|
2771 a lot of unhelpful error messages to appear
|
|
2772 v88: * moved DrChip.Netrw menu to Netrw. Now has
|
|
2773 priority 80 by default.
|
|
2774 g:NetrwTopLvlMenu == "Netrw" and can be changed
|
|
2775 by the user to suit. The priority is given by
|
|
2776 g:NetrwMenuPriority.
|
|
2777 * Changed filetype for browser displays from
|
|
2778 netrwlist to netrw.
|
|
2779 v87: * bug fix -- menus were partially disappearing
|
|
2780 v85: * bug fix -- missing an endif
|
|
2781 * bug fix -- handles spaces in names and directories
|
|
2782 when using ftp-based browsing
|
|
2783 v83: * disabled stop-acd handling; the change in directory
|
|
2784 handling may allow acd to be used again.
|
|
2785 * D was refusing to delete remote files/directories
|
|
2786 in wide listing mode.
|
|
2787 v81: * FocusGained also used to refresh/wipe local browser
|
|
2788 directory buffers
|
|
2789 * (bugfix) netrw was leaving [Scratch] buffers behind
|
|
2790 when the user had the "hidden" option set. The
|
|
2791 'hidden' option is now bypassed.
|
|
2792 v80: * ShellCmdPost event used in conjunction with
|
|
2793 g:netrw_fastbrowse to refresh/wipe local browser
|
|
2794 directory buffers.
|
|
2795 v79: * directories are now displayed with nowrap
|
|
2796 * (bugfix) if the column width was smaller than the
|
|
2797 largest file's name, then netrw would hang when
|
|
2798 using wide-listing mode - fixed
|
|
2799 * g:netrw_fastbrowse introduced
|
|
2800 v78: * progress has been made on allowing spaces inside
|
|
2801 directory names for remote work (reading, writing,
|
|
2802 browsing). (scp)
|
|
2803 v77: * Mikolaj Machowski fixed a bug in a substitute cmd
|
|
2804 * g:netrw_browsex_viewer implemented
|
|
2805 * Mikolaj Machowski pointed out that gnome-open is
|
|
2806 often executable under KDE systems, although it is
|
|
2807 effectively not functional. NetBrowseX now looks
|
|
2808 for "kicker" as a running process to determine if
|
|
2809 KDE is actually running.
|
|
2810 * Explorer's O functionality was inadvertently left
|
|
2811 out. Netrw now does the same thing, but with the
|
|
2812 "P" key.
|
|
2813 * added g:netrw_browse_split option
|
|
2814 * fixed a bug where the directory contained a "." but
|
|
2815 the file didn't (was treating the dirname from "."
|
|
2816 onwards as a suffix)
|
|
2817 v76: * "directory is missing" error message now restores
|
|
2818 echo highlighting
|
|
2819 v75: * file://... now conforms to RFC2396 (thanks to
|
|
2820 S. Zacchiroli)
|
|
2821 * if the binary option is set, then NetWrite() will
|
|
2822 only write the whole file (line numbers don't make
|
|
2823 sense with this). Supports writing of tar and zip
|
|
2824 files.
|
|
2825 v74: * bugfix (vim, then :Explore) now works
|
|
2826 * ctrl-L keeps cursor at same screen location (both
|
|
2827 local and remote browsing)
|
|
2828 * netrw now can read remote zip and tar files
|
|
2829 * Obtain now uses WinXP ftp+.netrc successfully
|
|
2830 v73: * bugfix -- scp://host/path/file was getting named
|
|
2831 incorrectly
|
|
2832 * netrw detects use of earlier-than-7.0 version of
|
|
2833 vim and issues a pertinent error message.
|
|
2834 * netrwSettings.vim is now uses autoloading. Only
|
|
2835 <netrwPlugin.vim> is needed as a pure plugin
|
|
2836 (ie. always loaded).
|
|
2837 v72: * bugfix -- formerly, one could prevent the loading
|
|
2838 of netrw by "let g:loaded_netrw=1"; when
|
|
2839 autoloading became supported, this feature was
|
|
2840 lost. It is now restored.
|
|
2841 v71: * bugfix -- made some "set nomodifiable"s into
|
|
2842 setlocal variants (allows :e somenewfile to be
|
|
2843 modifiable as usual)
|
|
2844 * NetrwSettings calls a netrw function, thereby
|
|
2845 assuring that netrw has loaded. However, if netrw
|
|
2846 does not load for whatever reason, then
|
|
2847 NetrwSettings will now issue a warning message.
|
|
2848 * For what reason I don't recall, when wget and fetch
|
|
2849 are both not present, and an attempt to read a
|
|
2850 http://... url is made, netrw exited. It now only
|
|
2851 returns.
|
|
2852 * When ch=1, on the second and subsequent uses of
|
|
2853 browsing Netrw would issue a blank line to clear
|
|
2854 the echo'd messages. This caused an annoying
|
|
2855 "Hit-Enter" prompt; now a blank line message
|
|
2856 is echo'd only if &ch>1.
|
|
2857 v70: * when using |netrw-O|, the "Obtaining filename"
|
|
2858 message is now shown using |hl-User9|. If User9
|
|
2859 has not been defined, netrw itself will define it.
|
|
2860 v69: * Bugfix: win95/98 machines were experiencing a
|
|
2861 "E121: Undefined variable: g:netrw_win95ftp"
|
|
2862 message
|
|
2863 v68: * double-click-leftmouse selects word under mouse
|
|
2864 v67: * Passwords which contain blanks will now be
|
|
2865 surrounded by double-quotes automatically (Yongwei)
|
|
2866 v66: * Netrw now seems to work with a few more Windows
|
|
2867 situations
|
|
2868 * O now obtains a file: remote browsing
|
|
2869 file -> local copy, locally browsing
|
|
2870 file -> current directory (see :pwd)
|
|
2871 * i now cycles between thin, long, and wide listing
|
|
2872 styles
|
|
2873 * NB and Nb are maps that are always available;
|
|
2874 corresponding B and b maps are only available when
|
|
2875 not using wide listing in order to allow them to
|
|
2876 be used for motions
|
|
2877 v65: * Browser functions now use NetOptionSave/Restore; in
|
|
2878 particular, netrw now works around the report
|
|
2879 setting
|
|
2880 v64: * Bugfix - browsing a "/" directory (Unix) yielded
|
|
2881 buffers named "[Scratch]" instead of "/"
|
|
2882 * Bugfix - remote browsing with ftp was omitting
|
|
2883 the ./ and ../
|
|
2884 v63: * netrw now takes advantage of autoload (needs 7.0)
|
|
2885 * Bugfix - using r (to reverse sort) working again
|
|
2886 v62: * Bugfix - spaces allowed again in directory names
|
|
2887 with g:netrw_keepdir=0. In fact, I've tested netrw
|
|
2888 with most ANSI punctuation marks for directory
|
|
2889 names.
|
|
2890 * Bugfix - NetrwSettings gave errors when
|
|
2891 g:netrw_silent had not be set.
|
|
2892 v61: * Document upgrade -- netrw variable-based settings
|
|
2893 all should have tags. Supports NetrwSettings cmd.
|
|
2894 * Several important variables are window-oriented.
|
|
2895 Netrw has to transfer these across a window split.
|
|
2896 See s:BufWinVars() and s:UseBufWinVars().
|
|
2897 v60: * When using the i map to switch between long and
|
|
2898 short listings, netrw will now keep cursor on same
|
|
2899 line
|
|
2900 * "Match # of #" now uses status line
|
|
2901 * :Explore **/*.c will now work from a
|
|
2902 non-netrw-browser window
|
|
2903 * :Explore **/patterns can now be run in separate
|
|
2904 browser windows
|
|
2905 * active banner (hit <cr> will cause various things
|
|
2906 to happen)
|
|
2907 v59: * bugfix -- another keepalt work-around installed
|
|
2908 (for vim6.3)
|
|
2909 * "Match # of #" for Explore **/pattern matches
|
|
2910 v58: * Explore and relatives can now handle
|
|
2911 **/somefilepattern (v7)
|
|
2912 * Nexplore and Pexplore introduced (v7). shift-down
|
|
2913 and shift-up cursor keys will invoke Nexplore and
|
|
2914 Pexplore, respectively.
|
|
2915 * bug fixed with o and v
|
|
2916 * autochdir only worked around for vim when it has
|
|
2917 been compiled with either
|
|
2918 |+netbeans_intg| or |+sun_workshop|
|
|
2919 * Under Windows, all directories and files were
|
|
2920 being preceded with a "/" when local browsing.
|
|
2921 Fixed.
|
|
2922 * When: syntax highlighting is off, laststatus=2, and
|
|
2923 remote browsing is used, sometimes the laststatus
|
|
2924 highlighting bleeds into the entire display. Work
|
|
2925 around - do an extra redraw in that case.
|
|
2926 * Bugfix: when g:netrw_keepdir=0, due to re-use of
|
|
2927 buffers, netrw didn't change the directory when it
|
|
2928 should've
|
|
2929 * Bugfix: D and R commands work again
|
|
2930 v57: * Explore and relatives can now handle RO files
|
|
2931 * reverse sort restored with vim7's sort command
|
|
2932 * g:netrw_keepdir now being used to keep the current
|
|
2933 directory unchanged as intended (sense change)
|
|
2934 * vim 6.3 still supported
|
|
2935 v56: * LocalBrowse now saves autochdir setting, unsets it,
|
|
2936 and restores it before returning.
|
|
2937 * using vim's rename() instead of system +
|
|
2938 local_rename variable
|
|
2939 * avoids changing directory when g:netrw_keepdir is
|
|
2940 false
|
|
2941 v55: * -bar used with :Explore :Sexplore etc to allow
|
|
2942 multiple commands to be separated by |s
|
|
2943 * browser listings now use the "nowrap" option
|
|
2944 * browser: some unuseful error messages now
|
|
2945 suppressed
|
|
2946 v54: * For backwards compatibility, Explore and Sexplore
|
|
2947 have been implemented. In addition, Hexplore and
|
|
2948 Vexplore commands are available, too.
|
|
2949 * <amatch> used instead of <afile> in the
|
|
2950 transparency support (BufReadCmd, FileReadCmd,
|
|
2951 FileWriteCmd)
|
|
2952 * ***netrw*** prepended to various error messages
|
|
2953 netrw may emit
|
|
2954 * g:netrw_port used instead of b:netrw_port for scp
|
|
2955 * any leading [:#] is removed from port numbers
|
|
2956 v53: * backslashes as well as slashes placed in various
|
|
2957 patterns (ex. g:netrw_sort_sequence) to better
|
|
2958 support Windows
|
|
2959 v52: * nonumber'ing now set for browsing buffers
|
|
2960 * when the hiding list hid all files, error messages
|
|
2961 ensued. Fixed
|
|
2962 * when browsing, swf is set, but directory is not
|
|
2963 set, when netrw was attempting to restore options,
|
|
2964 vim wanted to save a swapfile to a local directory
|
|
2965 using an url-style path. Fixed
|
|
2966 v51: * cygwin detection now automated
|
|
2967 (using windows and &shell is bash)
|
|
2968 * customizable browser "file" rejection patterns
|
|
2969 * directory history
|
|
2970 * :[range]w url now supported (ie. netrw uses a
|
|
2971 FileWriteCmd event)
|
|
2972 * error messages have a "Press <cr> to continue" to
|
|
2973 allow them to be seen
|
|
2974 * directory browser displays no longer bother the
|
|
2975 swapfile
|
|
2976 * u/U commands to go up and down the history stack
|
|
2977 * history stack may be saved with viminfo with it's
|
|
2978 "!" option
|
|
2979 * bugfixes associated with unwanted [No Files]
|
|
2980 entries
|
|
2981 v50: * directories now displayed using buftype=nofile;
|
|
2982 should keep the directory names as-is
|
|
2983 * attempts to remove empty "[No File]" buffers
|
|
2984 leftover from :file ..name.. commands
|
|
2985 * bugfix: a "caps-lock" editing difficulty left in
|
|
2986 v49 was fixed
|
|
2987 * syntax highlighting for "Showing:" the hiding list
|
|
2988 included
|
|
2989 * bookmarks can now be retained if "!" is in the
|
|
2990 viminfo option
|
|
2991 v49: * will use ftp for http://.../ browsing
|
|
2992 v48: * One may use ftp to do remote host file browsing
|
|
2993 * (windows and !cygwin) remote browsing with ftp can
|
|
2994 now use the "dir" command internally to provide
|
|
2995 listings
|
|
2996 * g:netrw_keepdir now allows one to keep the initial
|
|
2997 current directory as the current directory
|
|
2998 (normally the local file browser makes the
|
|
2999 currently viewed directory the current directory)
|
|
3000 * g:netrw_alto and g:netrw_altv now support
|
|
3001 alternate placement of windows started with o or v
|
|
3002 * Nread ? and Nwrite ? now uses echomsg (instead of
|
|
3003 echo) so :messages can repeat showing the help
|
|
3004 * bugfix: avoids problems with partial matches of
|
|
3005 directory names to prior buffers with longer names
|
|
3006 * one can suppress error messages with g:netrw_quiet
|
|
3007 ctrl-h used
|
|
3008 * instead of <Leader>h for editing hiding list one
|
|
3009 may edit the sorting sequence with the S map, which
|
|
3010 now allows confirmation of deletion with
|
|
3011 [y(es) n(o) a(ll) q(uit)]
|
|
3012 * the "x" map now handles special file viewing with:
|
|
3013 (windows) rundll32 url.dll (gnome) gnome-open (kde)
|
|
3014 kfmclient If none of these are on the executable
|
|
3015 path, then netrwFileHandlers.vim is used.
|
|
3016 * directory bookmarking during both local and remote
|
|
3017 browsing implemented
|
|
3018 * one may view all, use the hiding list to suppress,
|
|
3019 or use the hiding list to show-only remote and
|
|
3020 local file/directory listings
|
|
3021 * improved unusual file and directory name handling
|
|
3022 preview window support
|
|
3023 v47: * now handles local browsing.
|
|
3024 v46: * now handles remote browsing
|
|
3025 * g:netrw_silent (if 1) will cause all transfers to
|
|
3026 be silent
|
|
3027 v45: * made the [user@]hostname:path form a bit more
|
|
3028 restrictive to better handle errors in using
|
|
3029 protocols (e.g. scp:usr@host:file was being
|
|
3030 recognized as an rcp request)
|
|
3031 v44: * changed from "rsync -a" to just "rsync"
|
|
3032 * somehow an editing error messed up the test to
|
|
3033 recognize use of the fetch method for NetRead.
|
|
3034 * more debugging statements included
|
|
3035 v43: * moved "Explanation" comments to <pi_netrw.txt> help
|
|
3036 file as "Network Reference" (|netrw-ref|)
|
|
3037 * <netrw.vim> now uses Dfunc() Decho() and Dret() for
|
|
3038 debugging
|
|
3039 * removed superfluous NetRestorePosn() calls
|
|
3040 v42: * now does BufReadPre and BufReadPost events on
|
|
3041 file:///* and file://localhost/*
|
|
3042 v41: * installed file:///* and file://localhost/* handling
|
|
3043 v40: * prevents redraw when a protocol error occurs so
|
|
3044 that the user may see it
|
|
3045 v39: * sftp support
|
|
3046 v38: * Now uses NetRestorePosn() calls with Nread/Nwrite
|
|
3047 commands
|
|
3048 * Temporary files now removed via bwipe! instead of
|
|
3049 bwipe (thanks to Dave Roberts)
|
|
3050 v37: * Claar's modifications which test if ftp is
|
|
3051 successful, otherwise give an error message
|
|
3052 * After a read, the alternate file was pointing to
|
|
3053 the temp file. The temp file buffer is now wiped
|
|
3054 out.
|
|
3055 * removed silent from transfer methods so user can
|
|
3056 see what's happening
|
7
|
3057
|
|
3058
|
|
3059 ==============================================================================
|
1121
|
3060 12. Credits *netrw-credits* {{{1
|
7
|
3061
|
|
3062 Vim editor by Bram Moolenaar (Thanks, Bram!)
|
|
3063 dav support by C Campbell
|
|
3064 fetch support by Bram Moolenaar and C Campbell
|
534
|
3065 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
|
7
|
3066 http support by Bram Moolenaar <bram@moolenaar.net>
|
|
3067 rcp
|
|
3068 rsync support by C Campbell (suggested by Erik Warendorph)
|
|
3069 scp support by raf <raf@comdyn.com.au>
|
|
3070 sftp support by C Campbell
|
|
3071
|
|
3072 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
|
|
3073
|
|
3074 Jérôme Augé -- also using new buffer method with ftp+.netrc
|
534
|
3075 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
|
1209
|
3076 fetch,...
|
7
|
3077 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
|
|
3078 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
|
|
3079 variables, rsync etc)
|
534
|
3080 Doug Claar -- modifications to test for success with ftp
|
1209
|
3081 operation
|
7
|
3082
|
|
3083 ==============================================================================
|
1621
|
3084 Modelines: {{{1
|
459
|
3085 vim:tw=78:ts=8:ft=help:norl:fdm=marker
|