blob: 4b74d1f56392a43939ca51192d16b2806b70c437 [file] [log] [blame]
Bram Moolenaar15146672011-10-20 22:22:38 +02001*pi_netrw.txt* For Vim version 7.3. Last change: 2011 Sep 26
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
Bram Moolenaar9964e462007-05-05 17:54:07 +00003 -----------------------------------------------------
4 NETRW REFERENCE MANUAL by Charles E. Campbell, Jr.
5 -----------------------------------------------------
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01006Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
7 (remove NOSPAM from Campbell's email first)
8
Bram Moolenaaradc21822011-04-01 18:03:16 +02009Copyright: Copyright (C) 1999-2011 Charles E Campbell, Jr *netrw-copyright*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010010 Permission is hereby granted to use and distribute this code, with
11 or without modifications, provided that this copyright notice is
12 copied with it. Like anything else that's free, netrw.vim,
13 netrwPlugin.vim, netrwFileHandlers.vim, netrwSettings.vim,
14 syntax/netrw.vim, and pi_netrw.txt are provided *as is* and comes
15 with no warranty of any kind, either expressed or implied. No
16 guarantees of merchantability. No guarantees of suitability for
17 any purpose. By using this plugin, you agree that in no event will
18 the copyright holder be liable for any damages resulting from the
19 use of this software.
Bram Moolenaar071d4272004-06-13 20:20:40 +000020
Bram Moolenaar1afcace2005-11-25 19:54:28 +000021
Bram Moolenaar00a927d2010-05-14 23:24:24 +020022 *dav* *ftp* *netrw-file* *rcp* *scp*
23 *davs* *http* *netrw.vim* *rsync* *sftp*
24 *fetch* *netrw* *network*
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
26==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000271. Contents *netrw-contents* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +000028
Bram Moolenaar9964e462007-05-05 17:54:07 +0000291. Contents.............................................|netrw-contents|
302. Starting With Netrw..................................|netrw-start|
313. Netrw Reference......................................|netrw-ref|
Bram Moolenaar446cb832008-06-24 21:56:24 +000032 EXTERNAL APPLICATIONS AND PROTOCOLS................|netrw-externapp|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000033 READING............................................|netrw-read|
34 WRITING............................................|netrw-write|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010035 SOURCING...........................................|netrw-source|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000036 DIRECTORY LISTING..................................|netrw-dirlist|
37 CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
Bram Moolenaar446cb832008-06-24 21:56:24 +000038 VARIABLES AND SETTINGS.............................|netrw-variables|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000039 PATHS..............................................|netrw-path|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000404. Network-Oriented File Transfer.......................|netrw-xfer|
Bram Moolenaar83bab712005-08-01 21:58:57 +000041 NETRC..............................................|netrw-netrc|
42 PASSWORD...........................................|netrw-passwd|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000435. Activation...........................................|netrw-activate|
Bram Moolenaaradc21822011-04-01 18:03:16 +0200446. Transparent Remote File Editing......................|netrw-transparent|
Bram Moolenaar9964e462007-05-05 17:54:07 +0000457. Ex Commands..........................................|netrw-ex|
468. Variables and Options................................|netrw-var|
Bram Moolenaar446cb832008-06-24 21:56:24 +0000479. Browsing.............................................|netrw-browse|
48 Introduction To Browsing...........................|netrw-intro-browse|
49 Quick Reference: Maps..............................|netrw-browse-maps|
50 Quick Reference: Commands..........................|netrw-browse-cmds|
51 Bookmarking A Directory............................|netrw-mb|
Bram Moolenaar83bab712005-08-01 21:58:57 +000052 Browsing...........................................|netrw-cr|
Bram Moolenaar83bab712005-08-01 21:58:57 +000053 Browsing With A Horizontally Split Window..........|netrw-o|
Bram Moolenaar9964e462007-05-05 17:54:07 +000054 Browsing With A New Tab............................|netrw-t|
Bram Moolenaar446cb832008-06-24 21:56:24 +000055 Browsing With A Vertically Split Window............|netrw-v|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010056 Change Listing Style.(thin wide long tree).........|netrw-i|
Bram Moolenaar446cb832008-06-24 21:56:24 +000057 Changing To A Bookmarked Directory.................|netrw-gb|
Bram Moolenaar83bab712005-08-01 21:58:57 +000058 Changing To A Predecessor Directory................|netrw-u|
59 Changing To A Successor Directory..................|netrw-U|
Bram Moolenaar83bab712005-08-01 21:58:57 +000060 Customizing Browsing With A User Function..........|netrw-x|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010061 Deleting Bookmarks.................................|netrw-mB|
Bram Moolenaar446cb832008-06-24 21:56:24 +000062 Deleting Files Or Directories......................|netrw-D|
63 Directory Exploring Commands.......................|netrw-explore|
64 Exploring With Stars and Patterns..................|netrw-star|
65 Displaying Information About File..................|netrw-qf|
66 Edit File Or Directory Hiding List.................|netrw-ctrl-h|
67 Editing The Sorting Sequence.......................|netrw-S|
Bram Moolenaaradc21822011-04-01 18:03:16 +020068 Forcing treatment as a file or directory...........|netrw-gd| |netrw-gf|
Bram Moolenaar446cb832008-06-24 21:56:24 +000069 Going Up...........................................|netrw--|
70 Hiding Files Or Directories........................|netrw-a|
71 Improving Browsing.................................|netrw-ssh-hack|
72 Listing Bookmarks And History......................|netrw-qb|
73 Making A New Directory.............................|netrw-d|
Bram Moolenaar83bab712005-08-01 21:58:57 +000074 Making The Browsing Directory The Current Directory|netrw-c|
Bram Moolenaar446cb832008-06-24 21:56:24 +000075 Marking Files......................................|netrw-mf|
76 Marking Files By Regular Expression................|netrw-mr|
77 Marked Files: Arbitrary Command....................|netrw-mx|
78 Marked Files: Compression And Decompression........|netrw-mz|
79 Marked Files: Copying..............................|netrw-mc|
80 Marked Files: Diff.................................|netrw-md|
81 Marked Files: Editing..............................|netrw-me|
82 Marked Files: Grep.................................|netrw-mg|
83 Marked Files: Hiding and Unhiding by Suffix........|netrw-mh|
84 Marked Files: Moving...............................|netrw-mm|
85 Marked Files: Printing.............................|netrw-mp|
86 Marked Files: Sourcing.............................|netrw-ms|
87 Marked Files: Tagging..............................|netrw-mT|
88 Marked Files: Setting the Target Directory.........|netrw-mt|
89 Marked Files: Unmarking............................|netrw-mu|
90 Netrw Browser Variables............................|netrw-browser-var|
91 Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
Bram Moolenaar15146672011-10-20 22:22:38 +020092 Netrw Settings Window..............................|netrw-settings-window|
Bram Moolenaar446cb832008-06-24 21:56:24 +000093 Obtaining A File...................................|netrw-O|
94 Preview Window.....................................|netrw-p|
95 Previous Window....................................|netrw-P|
96 Refreshing The Listing.............................|netrw-ctrl-l|
97 Renaming Files Or Directories......................|netrw-move|
98 Reversing Sorting Order............................|netrw-r|
99 Selecting Sorting Style............................|netrw-s|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100100 Setting Editing Window.............................|netrw-C|
Bram Moolenaar9964e462007-05-05 17:54:07 +000010110. Problems and Fixes...................................|netrw-problems|
Bram Moolenaar446cb832008-06-24 21:56:24 +000010211. Debugging Netrw Itself...............................|netrw-debug|
Bram Moolenaar9964e462007-05-05 17:54:07 +000010312. History..............................................|netrw-history|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010010413. Todo.................................................|netrw-todo|
10514. Credits..............................................|netrw-credits|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000106
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107{Vi does not have any of this}
108
109==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00001102. Starting With Netrw *netrw-start* {{{1
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000111
Bram Moolenaar446cb832008-06-24 21:56:24 +0000112Netrw makes reading files, writing files, browsing over a network, and
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100113local browsing easy! First, make sure that you have plugins enabled, so
Bram Moolenaar446cb832008-06-24 21:56:24 +0000114you'll need to have at least the following in your <.vimrc>:
115(or see |netrw-activate|) >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000116
Bram Moolenaar9964e462007-05-05 17:54:07 +0000117 set nocp " 'compatible' is not set
118 filetype plugin on " plugins are enabled
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000119<
120(see |'cp'| and |:filetype-plugin-on|)
121
122Netrw supports "transparent" editing of files on other machines using urls
123(see |netrw-transparent|). As an example of this, let's assume you have an
Bram Moolenaar446cb832008-06-24 21:56:24 +0000124account on some other machine; if you can use scp, try: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000125
126 vim scp://hostname/path/to/file
127<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000128Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000129
Bram Moolenaar446cb832008-06-24 21:56:24 +0000130So, what if you have ftp, not ssh/scp? That's easy, too; try >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000131
132 vim ftp://hostname/path/to/file
133<
134Want to make ftp simpler to use? See if your ftp supports a file called
135<.netrc> -- typically it goes in your home directory, has read/write
136permissions for only the user to read (ie. not group, world, other, etc),
137and has lines resembling >
138
139 machine HOSTNAME login USERID password "PASSWORD"
140 machine HOSTNAME login USERID password "PASSWORD"
141 ...
Bram Moolenaar9964e462007-05-05 17:54:07 +0000142 default login USERID password "PASSWORD"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000143<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000144Now about browsing -- when you just want to look around before editing a
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000145file. For browsing on your current host, just "edit" a directory: >
146
147 vim .
148 vim /home/userid/path
149<
150For browsing on a remote host, "edit" a directory (but make sure that
151the directory name is followed by a "/"): >
152
153 vim scp://hostname/
154 vim ftp://hostname/path/to/dir/
155<
156See |netrw-browse| for more!
157
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100158There are more protocols supported by netrw than just scp and ftp, too: see the
159next section, |netrw-externapp|, on how to use these external applications with
160netrw and vim.
161
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200162PREVENTING LOADING *netrw-noload*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000163
164If you want to use plugins, but for some reason don't wish to use netrw, then
165you need to avoid loading both the plugin and the autoload portions of netrw.
166You may do so by placing the following two lines in your <.vimrc>: >
167
168 :let g:loaded_netrw = 1
169 :let g:loaded_netrwPlugin = 1
170<
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000171
172==============================================================================
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001733. Netrw Reference *netrw-ref* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100175 Netrw supports several protocols in addition to scp and ftp as mentioned
Bram Moolenaar446cb832008-06-24 21:56:24 +0000176 in |netrw-start|. These include dav, fetch, http,... well, just look
177 at the list in |netrw-externapp|. Each protocol is associated with a
178 variable which holds the default command supporting that protocol.
179
180EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000181
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000182 Protocol Variable Default Value
183 -------- ---------------- -------------
Bram Moolenaaradc21822011-04-01 18:03:16 +0200184 dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable
185 dav: g:netrw_dav_cmd = "curl -o" elseif curl is available
186 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
187 ftp: *g:netrw_ftp_cmd* = "ftp"
188 http: *g:netrw_http_cmd* = "elinks" if elinks is available
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100189 http: g:netrw_http_cmd = "links" elseif links is available
190 http: g:netrw_http_cmd = "curl" elseif curl is available
191 http: g:netrw_http_cmd = "wget" elseif wget is available
192 http: g:netrw_http_cmd = "fetch" elseif fetch is available
Bram Moolenaaradc21822011-04-01 18:03:16 +0200193 rcp: *g:netrw_rcp_cmd* = "rcp"
194 rsync: *g:netrw_rsync_cmd* = "rsync -a"
195 scp: *g:netrw_scp_cmd* = "scp -q"
196 sftp: *g:netrw_sftp_cmd* = "sftp"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100197
198 *g:netrw_http_xcmd* : the option string for http://... protocols are
199 specified via this variable and may be independently overridden. By
200 default, the option arguments for the http-handling commands are: >
201
202 elinks : "-source >"
203 links : "-source >"
204 curl : "-o"
205 wget : "-q -O"
206 fetch : "-o"
207<
208 For example, if your system has elinks, and you'd rather see the
209 page using an attempt at rendering the text, you may wish to have >
210 let g:netrw_http_xcmd= "-dump >"
211< in your .vimrc.
212
Bram Moolenaar071d4272004-06-13 20:20:40 +0000213
Bram Moolenaar446cb832008-06-24 21:56:24 +0000214READING *netrw-read* *netrw-nread* {{{2
215
216 Generally, one may just use the url notation with a normal editing
217 command, such as >
218
219 :e ftp://[user@]machine/path
220<
221 Netrw also provides the Nread command:
222
Bram Moolenaar071d4272004-06-13 20:20:40 +0000223 :Nread ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000224 :Nread "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000225 :Nread "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000226 :Nread "machine id password path" uses ftp
227 :Nread "dav://machine[:port]/path" uses cadaver
228 :Nread "fetch://[user@]machine/path" uses fetch
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000229 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000230 :Nread "http://[user@]machine/path" uses http uses wget
231 :Nread "rcp://[user@]machine/path" uses rcp
232 :Nread "rsync://[user@]machine[:port]/path" uses rsync
233 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
234 :Nread "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000235
Bram Moolenaar446cb832008-06-24 21:56:24 +0000236WRITING *netrw-write* *netrw-nwrite* {{{2
237
238 One may just use the url notation with a normal file writing
239 command, such as >
240
241 :w ftp://[user@]machine/path
242<
243 Netrw also provides the Nwrite command:
244
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000245 :Nwrite ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000246 :Nwrite "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000247 :Nwrite "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000248 :Nwrite "machine id password path" uses ftp
249 :Nwrite "dav://machine[:port]/path" uses cadaver
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000250 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000251 :Nwrite "rcp://[user@]machine/path" uses rcp
252 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
253 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
254 :Nwrite "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000255 http: not supported!
256
Bram Moolenaar446cb832008-06-24 21:56:24 +0000257SOURCING *netrw-source* {{{2
258
259 One may just use the url notation with the normal file sourcing
260 command, such as >
261
262 :so ftp://[user@]machine/path
263<
264 Netrw also provides the Nsource command:
265
Bram Moolenaar9964e462007-05-05 17:54:07 +0000266 :Nsource ? give help
267 :Nsource "dav://machine[:port]/path" uses cadaver
268 :Nsource "fetch://[user@]machine/path" uses fetch
269 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
270 :Nsource "http://[user@]machine/path" uses http uses wget
271 :Nsource "rcp://[user@]machine/path" uses rcp
272 :Nsource "rsync://[user@]machine[:port]/path" uses rsync
273 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp
274 :Nsource "sftp://[user@]machine/path" uses sftp
275
Bram Moolenaar251e1912011-06-19 05:09:16 +0200276DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +0000277
278 One may browse a directory to get a listing by simply attempting to
279 edit the directory: >
280
281 :e scp://[user]@hostname/path/
282 :e ftp://[user]@hostname/path/
283<
Bram Moolenaar251e1912011-06-19 05:09:16 +0200284 For remote directory listings (ie. those using scp or ftp), that
285 trailing "/" is necessary (the slash tells netrw to treat the argument
286 as a directory to browse instead of as a file to download).
Bram Moolenaar446cb832008-06-24 21:56:24 +0000287
Bram Moolenaar251e1912011-06-19 05:09:16 +0200288 The Nread command may also be used to accomplish this (again, that
289 trailing slash is necessary): >
Bram Moolenaar446cb832008-06-24 21:56:24 +0000290
Bram Moolenaar251e1912011-06-19 05:09:16 +0200291 :Nread [protocol]://[user]@hostname/path/
292<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000293 *netrw-login* *netrw-password*
294CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000295
Bram Moolenaar071d4272004-06-13 20:20:40 +0000296 Attempts to use ftp will prompt you for a user-id and a password.
Bram Moolenaar15146672011-10-20 22:22:38 +0200297 These will be saved in global variables |g:netrw_uid| and
298 |s:netrw_passwd|; subsequent use of ftp will re-use those two strings,
299 thereby simplifying use of ftp. However, if you need to use a
300 different user id and/or password, you'll want to call |NetUserPass()|
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000301 first. To work around the need to enter passwords, check if your ftp
302 supports a <.netrc> file in your home directory. Also see
303 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how
Bram Moolenaar15146672011-10-20 22:22:38 +0200304 to not need to use passwords for scp, look at |netrw-ssh-hack|).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000305
306 :NetUserPass [uid [password]] -- prompts as needed
307 :call NetUserPass() -- prompts for uid and password
308 :call NetUserPass("uid") -- prompts for password
309 :call NetUserPass("uid","password") -- sets global uid and password
310
Bram Moolenaar446cb832008-06-24 21:56:24 +0000311NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
312(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-var|)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000313
Bram Moolenaar446cb832008-06-24 21:56:24 +0000314Netrw provides a lot of variables which allow you to customize netrw to your
315preferences. One way to look at them is via the command :NetrwSettings (see
316|netrw-settings|) which will display your current netrw settings. Most such
317settings are described below, in |netrw-browser-options|, and in
318|netrw-externapp|:
Bram Moolenaar9964e462007-05-05 17:54:07 +0000319
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100320 *b:netrw_lastfile* last file Network-read/written retained on a
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200321 per-buffer basis (supports plain :Nw )
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100322
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200323 *g:netrw_bufsettings* the settings that netrw buffers have
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200324 (default) noma nomod nonu nowrap ro nobl
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200325
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100326 *g:netrw_chgwin* specifies a window number where file edits will take
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200327 place. (also see |netrw-C|)
328 (default) not defined
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100329
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200330 *g:Netrw_funcref* specifies a function (or functions) to be called when
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200331 netrw edits a file. The file is first edited, and
332 then the function reference (|Funcref|) is called.
333 This variable may also hold a |List| of Funcrefs.
Bram Moolenaar15146672011-10-20 22:22:38 +0200334 (default) not defined. (the capital in g:Netrw...
335 is required by its holding a function reference)
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200336>
337 Example: place in .vimrc; affects all file opening
338 fun! MyFuncRef()
339 endfun
340 let g:Netrw_funcref= function("MyFuncRef")
341<
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000342 *g:netrw_ftp* if it doesn't exist, use default ftp
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200343 =0 use default ftp (uid password)
344 =1 use alternate ftp method (user uid password)
345 If you're having trouble with ftp, try changing the
346 value of this variable to see if the alternate ftp
347 method works for your setup.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000348
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100349 *g:netrw_ftpextracmd* default: doesn't exist
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200350 If this variable exists, then any string it contains
351 will be placed into the commands set to your ftp
352 client. As an example:
353 ="passive"
Bram Moolenaar9964e462007-05-05 17:54:07 +0000354
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000355 *g:netrw_ftpmode* ="binary" (default)
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200356 ="ascii"
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000357
Bram Moolenaar9964e462007-05-05 17:54:07 +0000358 *g:netrw_ignorenetrc* =0 (default for linux, cygwin)
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200359 =1 If you have a <.netrc> file but it doesn't work and
360 you want it ignored, then set this variable as
361 shown. (default for Windows + cmd.exe)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000362
363 *g:netrw_menu* =0 disable netrw's menu
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200364 =1 (default) netrw's menu enabled
Bram Moolenaar9964e462007-05-05 17:54:07 +0000365
366 *g:netrw_nogx* if this variable exists, then the "gx" map will not
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200367 be available (see |netrw-gx|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000368
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100369 *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis
370 *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
Bram Moolenaar446cb832008-06-24 21:56:24 +0000371
372 *g:netrw_preview* =0 (default) preview window shown in a horizontally
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200373 split window
374 =1 preview window shown in a vertically split window.
375 Also affects the "previous window" (see |netrw-P|) in
376 the same way.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000377
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000378 *g:netrw_scpport* = "-P" : option to use to set port for scp
379 *g:netrw_sshport* = "-p" : option to use to set port for ssh
380
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100381 *g:netrw_sepchr* =\0xff
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200382 =\0x01 for enc == euc-jp (and perhaps it should be for
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100383 others, too, please let me
384 know)
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200385 Separates priority codes from filenames internally.
386 See |netrw-p12|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100387
Bram Moolenaar446cb832008-06-24 21:56:24 +0000388 *g:netrw_silent* =0 : transfers done normally
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200389 =1 : transfers done silently
Bram Moolenaar446cb832008-06-24 21:56:24 +0000390
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000391 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200392 line window. This window provides reliable
393 delivery of messages. (default)
394 =0 : messages from netrw will use echoerr ;
395 messages don't always seem to show up this
396 way, but one doesn't have to quit the window.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000397
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000398 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200399 lines that o/s's ftp "provides" on transfers
400 =0 force normal ftp behavior (no trailing line removal)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000401
402 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200403 permits network browsing to use ls with time and
404 size sorting (default if windows)
405 =0 assume Windows' scp accepts windows-style paths
406 Network browsing uses dir instead of ls
407 This option is ignored if you're using unix
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000408
409 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200410 =1 use WinNT's rcp in binary mode (default)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000411
Bram Moolenaar446cb832008-06-24 21:56:24 +0000412PATHS *netrw-path* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000413
414Paths to files are generally user-directory relative for most protocols.
415It is possible that some protocol will make paths relative to some
416associated directory, however.
417>
418 example: vim scp://user@host/somefile
419 example: vim scp://user@host/subdir1/subdir2/somefile
420<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000421where "somefile" is in the "user"'s home directory. If you wish to get a
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000422file using root-relative paths, use the full path:
423>
424 example: vim scp://user@host//somefile
425 example: vim scp://user@host//subdir1/subdir2/somefile
426<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000427
428==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00004294. Network-Oriented File Transfer *netrw-xfer* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000430
431Network-oriented file transfer under Vim is implemented by a VimL-based script
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000432(<netrw.vim>) using plugin techniques. It currently supports both reading and
433writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000434dav/cadaver, rsync, or sftp.
435
436http is currently supported read-only via use of wget or fetch.
437
438<netrw.vim> is a standard plugin which acts as glue between Vim and the
439various file transfer programs. It uses autocommand events (BufReadCmd,
440FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
441
442 ex. vim ftp://hostname/path/to/file
443<
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000444The characters preceding the colon specify the protocol to use; in the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000445example, it's ftp. The <netrw.vim> script then formulates a command or a
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000446series of commands (typically ftp) which it issues to an external program
447(ftp, scp, etc) which does the actual file transfer/protocol. Files are read
448from/written to a temporary file (under Unix/Linux, /tmp/...) which the
449<netrw.vim> script will clean up.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000450
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100451Now, a word about Jan Minář's "FTP User Name and Password Disclosure"; first,
452ftp is not a secure protocol. User names and passwords are transmitted "in
453the clear" over the internet; any snooper tool can pick these up; this is not
454a netrw thing, this is a ftp thing. If you're concerned about this, please
455try to use scp or sftp instead.
456
457Netrw re-uses the user id and password during the same vim session and so long
458as the remote hostname remains the same.
459
460Jan seems to be a bit confused about how netrw handles ftp; normally multiple
461commands are performed in a "ftp session", and he seems to feel that the
462uid/password should only be retained over one ftp session. However, netrw
463does every ftp operation in a separate "ftp session"; so remembering the
464uid/password for just one "ftp session" would be the same as not remembering
465the uid/password at all. IMHO this would rapidly grow tiresome as one
466browsed remote directories, for example.
467
468On the other hand, thanks go to Jan M. for pointing out the many
469vulnerabilities that netrw (and vim itself) had had in handling "crafted"
470filenames. The |shellescape()| and |fnameescape()| functions were written in
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200471response by Bram Moolenaar to handle these sort of problems, and netrw has
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100472been modified to use them. Still, my advice is, if the "filename" looks like
473a vim command that you aren't comfortable with having executed, don't open it.
474
Bram Moolenaar9964e462007-05-05 17:54:07 +0000475 *netrw-putty* *netrw-pscp* *netrw-psftp*
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000476One may modify any protocol's implementing external application by setting a
477variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000478"scp -q"). As an example, consider using PuTTY: >
Bram Moolenaar9964e462007-05-05 17:54:07 +0000479
480 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch'
481 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000482<
Bram Moolenaar15146672011-10-20 22:22:38 +0200483(note: it has been reported that windows 7 with putty v0.6's "-batch" option
484 doesn't work, so its best to leave it off for that system)
485
Bram Moolenaar9964e462007-05-05 17:54:07 +0000486See |netrw-p8| for more about putty, pscp, psftp, etc.
487
Bram Moolenaar071d4272004-06-13 20:20:40 +0000488Ftp, an old protocol, seems to be blessed by numerous implementations.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000489Unfortunately, some implementations are noisy (ie., add junk to the end of the
490file). Thus, concerned users may decide to write a NetReadFixup() function
491that will clean up after reading with their ftp. Some Unix systems (ie.,
492FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
493not noisy and more convenient, actually, for <netrw.vim> to use.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100494Consequently, if "fetch" is available (ie. executable), it may be preferable
495to use it for ftp://... based transfers.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000496
497For rcp, scp, sftp, and http, one may use network-oriented file transfers
Bram Moolenaar83bab712005-08-01 21:58:57 +0000498transparently; ie.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000499>
500 vim rcp://[user@]machine/path
501 vim scp://[user@]machine/path
502<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100503If your ftp supports <.netrc>, then it too can be transparently used
Bram Moolenaar071d4272004-06-13 20:20:40 +0000504if the needed triad of machine name, user id, and password are present in
505that file. Your ftp must be able to use the <.netrc> file on its own, however.
506>
507 vim ftp://[user@]machine[[:#]portnumber]/path
508<
Bram Moolenaaradc21822011-04-01 18:03:16 +0200509Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses
510an option, -s:filename (filename can and probably should be a full path)
511which contains ftp commands which will be automatically run whenever ftp
512starts. You may use this feature to enter a user and password for one site: >
513 userid
514 password
515If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
516netrw will substitute the current machine name requested for ftp connection
517for MACHINE. Hence one can have multiple machine.ftp files containing login
518and password for ftp. Example: >
519
520 g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
521 vim ftp://myhost.somewhere.net/
522will use a file >
523 C:\Users\Myself\myhost.ftp
524<
525Often, ftp will need to query the user for the userid and password.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000526The latter will be done "silently"; ie. asterisks will show up instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000527the actually-typed-in password. Netrw will retain the userid and password
528for subsequent read/writes from the most recent transfer so subsequent
529transfers (read/write) to or from that machine will take place without
530additional prompting.
531
532 *netrw-urls*
533 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000534 | Reading | Writing | Uses |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000535 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000536 | DAV: | | |
537 | dav://host/path | | cadaver |
538 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000539 +---------------------------------+----------------------------+------------+
Bram Moolenaar446cb832008-06-24 21:56:24 +0000540 | DAV + SSL: | | |
541 | davs://host/path | | cadaver |
542 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver |
543 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000544 | FETCH: | | |
545 | fetch://[user@]host/path | | |
546 | fetch://[user@]host:http/path | Not Available | fetch |
547 | :Nread fetch://[user@]host/path| | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000549 | FILE: | | |
550 | file:///* | file:///* | |
551 | file://localhost/* | file://localhost/* | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000552 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000553 | FTP: (*3) | (*3) | |
554 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
555 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
556 | :Nread host path | :Nwrite host path | ftp+.netrc |
557 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000558 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000559 | HTTP: wget is executable: (*4) | | |
560 | http://[user@]host/path | Not Available | wget |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000561 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000562 | HTTP: fetch is executable (*4) | | |
563 | http://[user@]host/path | Not Available | fetch |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000564 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000565 | RCP: | | |
566 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000567 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000568 | RSYNC: | | |
569 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
570 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
571 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000572 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000573 | SCP: | | |
574 | scp://[user@]host/path | scp://[user@]host/path | scp |
575 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000576 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000577 | SFTP: | | |
578 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
579 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000580 +=================================+============================+============+
581
582 (*1) For an absolute path use scp://machine//path.
583
584 (*2) if <.netrc> is present, it is assumed that it will
585 work with your ftp client. Otherwise the script will
Bram Moolenaar9964e462007-05-05 17:54:07 +0000586 prompt for user-id and password.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000587
Bram Moolenaar9964e462007-05-05 17:54:07 +0000588 (*3) for ftp, "machine" may be machine#port or machine:port
Bram Moolenaar071d4272004-06-13 20:20:40 +0000589 if a different port is needed than the standard ftp port
590
591 (*4) for http:..., if wget is available it will be used. Otherwise,
592 if fetch is available it will be used.
593
594Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
595
596
597NETRC *netrw-netrc*
598
Bram Moolenaar446cb832008-06-24 21:56:24 +0000599The <.netrc> file, typically located in your home directory, contains lines
600therein which map a hostname (machine name) to the user id and password you
601prefer to use with it.
602
Bram Moolenaar071d4272004-06-13 20:20:40 +0000603The typical syntax for lines in a <.netrc> file is given as shown below.
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000604Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000605>
606 machine {full machine name} login {user-id} password "{password}"
607 default login {user-id} password "{password}"
608
609Your ftp client must handle the use of <.netrc> on its own, but if the
610<.netrc> file exists, an ftp transfer will not ask for the user-id or
611password.
612
613 Note:
614 Since this file contains passwords, make very sure nobody else can
615 read this file! Most programs will refuse to use a .netrc that is
616 readable for others. Don't forget that the system administrator can
Bram Moolenaar446cb832008-06-24 21:56:24 +0000617 still read the file! Ie. for Linux/Unix: chmod 600 .netrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000618
619
620PASSWORD *netrw-passwd*
621
622The script attempts to get passwords for ftp invisibly using |inputsecret()|,
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200623a built-in Vim function. See |netrw-userpass| for how to change the password
Bram Moolenaar071d4272004-06-13 20:20:40 +0000624after one has set it.
625
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000626Unfortunately there doesn't appear to be a way for netrw to feed a password to
627scp. Thus every transfer via scp will require re-entry of the password.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000628However, |netrw-ssh-hack| can help with this problem.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000629
630
631==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00006325. Activation *netrw-activate* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000633
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000634Network-oriented file transfers are available by default whenever Vim's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000635|'nocompatible'| mode is enabled. Netrw's script files reside in your
636system's plugin, autoload, and syntax directories; just the
637plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
638vim. The main script in autoload/netrw.vim is only loaded when you actually
639use netrw. I suggest that, at a minimum, you have at least the following in
640your <.vimrc> customization file: >
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000641
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000642 set nocp
643 if version >= 600
644 filetype plugin indent on
645 endif
646<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000647
648==============================================================================
Bram Moolenaaradc21822011-04-01 18:03:16 +02006496. Transparent Remote File Editing *netrw-transparent* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000650
651Transparent file transfers occur whenever a regular file read or write
Bram Moolenaar446cb832008-06-24 21:56:24 +0000652(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
653events) is made. Thus one may read, write, or source files across networks
654just as easily as if they were local files! >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000655
656 vim ftp://[user@]machine/path
657 ...
658 :wq
659
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000660See |netrw-activate| for more on how to encourage your vim to use plugins
661such as netrw.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000662
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000663
Bram Moolenaar071d4272004-06-13 20:20:40 +0000664==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00006657. Ex Commands *netrw-ex* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000666
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000667The usual read/write commands are supported. There are also a few
Bram Moolenaar446cb832008-06-24 21:56:24 +0000668additional commands available. Often you won't need to use Nwrite or
Bram Moolenaar9964e462007-05-05 17:54:07 +0000669Nread as shown in |netrw-transparent| (ie. simply use >
670 :e url
671 :r url
672 :w url
673instead, as appropriate) -- see |netrw-urls|. In the explanations
674below, a {netfile} is an url to a remote file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000675
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200676 *:Nwrite* *:Nw*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000677:[range]Nw[rite] Write the specified lines to the current
Bram Moolenaar071d4272004-06-13 20:20:40 +0000678 file as specified in b:netrw_lastfile.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200679 (related: |netrw-nwrite|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000680
Bram Moolenaar446cb832008-06-24 21:56:24 +0000681:[range]Nw[rite] {netfile} [{netfile}]...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000682 Write the specified lines to the {netfile}.
683
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200684 *:Nread* *:Nr*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100685:Nr[ead] Read the lines from the file specified in b:netrw_lastfile
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200686 into the current buffer. (related: |netrw-nread|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000687
Bram Moolenaar446cb832008-06-24 21:56:24 +0000688:Nr[ead] {netfile} {netfile}...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000689 Read the {netfile} after the current line.
690
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200691 *:Nsource* *:Ns*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000692:Ns[ource] {netfile}
Bram Moolenaar9964e462007-05-05 17:54:07 +0000693 Source the {netfile}.
694 To start up vim using a remote .vimrc, one may use
695 the following (all on one line) (tnx to Antoine Mechelynck) >
696 vim -u NORC -N
697 --cmd "runtime plugin/netrwPlugin.vim"
698 --cmd "source scp://HOSTNAME/.vimrc"
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200699< (related: |netrw-source|)
700
701:call NetUserPass() *NetUserPass()*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000702 If g:netrw_uid and s:netrw_passwd don't exist,
703 this function will query the user for them.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200704 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000705
706:call NetUserPass("userid")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000707 This call will set the g:netrw_uid and, if
Bram Moolenaar071d4272004-06-13 20:20:40 +0000708 the password doesn't exist, will query the user for it.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200709 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000710
711:call NetUserPass("userid","passwd")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000712 This call will set both the g:netrw_uid and s:netrw_passwd.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000713 The user-id and password are used by ftp transfers. One may
Bram Moolenaar446cb832008-06-24 21:56:24 +0000714 effectively remove the user-id and password by using empty
715 strings (ie. "").
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200716 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000717
Bram Moolenaar9964e462007-05-05 17:54:07 +0000718:NetrwSettings This command is described in |netrw-settings| -- used to
719 display netrw settings and change netrw behavior.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000720
Bram Moolenaar071d4272004-06-13 20:20:40 +0000721
722==============================================================================
Bram Moolenaar15146672011-10-20 22:22:38 +02007238. Variables and Options *netrw-settings* {{{1
Bram Moolenaar446cb832008-06-24 21:56:24 +0000724
Bram Moolenaar15146672011-10-20 22:22:38 +0200725(also see: |netrw-options| |netrw-variables| |netrw-protocol|
726 |netrw-browser-settings| |netrw-browser-options|
727 |netrw-browser-var| )
Bram Moolenaar071d4272004-06-13 20:20:40 +0000728
Bram Moolenaar9964e462007-05-05 17:54:07 +0000729The <netrw.vim> script provides several variables which act as options to
Bram Moolenaar446cb832008-06-24 21:56:24 +0000730affect <netrw.vim>'s file transfer behavior. These variables typically may be
731set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
Bram Moolenaar15146672011-10-20 22:22:38 +0200732 *netrw-options*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000733>
Bram Moolenaar9964e462007-05-05 17:54:07 +0000734 -------------
735 Netrw Options
736 -------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000737 Option Meaning
738 -------------- -----------------------------------------------
739<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000740 b:netrw_col Holds current cursor position (during NetWrite)
741 g:netrw_cygwin =1 assume scp under windows is from cygwin
742 (default/windows)
743 =0 assume scp under windows accepts windows
744 style paths (default/else)
745 g:netrw_ftp =0 use default ftp (uid password)
746 g:netrw_ftpmode ="binary" (default)
747 ="ascii" (your choice)
748 g:netrw_ignorenetrc =1 (default)
749 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000750 want it used, then set this variable. Its
751 mere existence is enough to cause <.netrc>
752 to be ignored.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000753 b:netrw_lastfile Holds latest method/machine/path.
754 b:netrw_line Holds current line number (during NetWrite)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000755 g:netrw_silent =0 transfers done normally
756 =1 transfers done silently
757 g:netrw_uid Holds current user-id for ftp.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000758 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
759 =1 use WinNT/2K/XP's rcp, binary mode
760 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
761 =1 use default method to do ftp >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000762 -----------------------------------------------------------------------
763<
Bram Moolenaar15146672011-10-20 22:22:38 +0200764 *netrw-internal-variables*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000765The script will also make use of the following variables internally, albeit
766temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000767>
768 -------------------
769 Temporary Variables
770 -------------------
771 Variable Meaning
772 -------- ------------------------------------
773<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100774 b:netrw_method Index indicating rcp/ftp+.netrc/ftp
775 w:netrw_method (same as b:netrw_method)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000776 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100777 b:netrw_fname Holds filename being accessed >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000778 ------------------------------------------------------------
779<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000780 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000781
782Netrw supports a number of protocols. These protocols are invoked using the
783variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000784>
785 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000786 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000787 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000788 Option Type Setting Meaning
789 --------- -------- -------------- ---------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000790<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000791 netrw_ftp variable =doesn't exist userid set by "user userid"
792 =0 userid set by "user userid"
793 =1 userid set by "userid"
794 NetReadFixup function =doesn't exist no change
795 =exists Allows user to have files
796 read via ftp automatically
797 transformed however they wish
798 by NetReadFixup()
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100799 g:netrw_dav_cmd variable ="cadaver" if cadaver is executable
800 g:netrw_dav_cmd variable ="curl -o" elseif curl is executable
Bram Moolenaar9964e462007-05-05 17:54:07 +0000801 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
Bram Moolenaar071d4272004-06-13 20:20:40 +0000802 g:netrw_ftp_cmd variable ="ftp"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000803 g:netrw_http_cmd variable ="fetch -o" if fetch is available
804 g:netrw_http_cmd variable ="wget -O" else if wget is available
Bram Moolenaar9964e462007-05-05 17:54:07 +0000805 g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000806 g:netrw_rcp_cmd variable ="rcp"
807 g:netrw_rsync_cmd variable ="rsync -a"
808 g:netrw_scp_cmd variable ="scp -q"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000809 g:netrw_sftp_cmd variable ="sftp" >
810 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000811<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000812 *netrw-ftp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000813
Bram Moolenaar9964e462007-05-05 17:54:07 +0000814The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|)
815specify the external program to use handle the ftp protocol. They may
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200816include command line options (such as -p for passive mode). Example: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000817
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200818 let g:netrw_ftp_cmd= "ftp -p"
819<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000820Browsing is supported by using the |g:netrw_list_cmd|; the substring
821"HOSTNAME" will be changed via substitution with whatever the current request
822is for a hostname.
823
824Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's
825that give trouble . In order to best understand how to use these options if
826ftp is giving you troubles, a bit of discussion is provided on how netrw does
827ftp reads.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000828
829For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000830temporary file:
831>
832 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
833 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000834<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000835 open machine [port] open machine [port]
836 user userid password userid password
837 [g:netrw_ftpmode] password
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200838 [g:netrw_ftpextracmd] [g:netrw_ftpmode]
Bram Moolenaar9964e462007-05-05 17:54:07 +0000839 get filename tempfile [g:netrw_extracmd]
840 get filename tempfile >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000841 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000842<
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200843The |g:netrw_ftpmode| and |g:netrw_ftpextracmd| are optional.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000844
Bram Moolenaar071d4272004-06-13 20:20:40 +0000845Netrw then executes the lines above by use of a filter:
846>
847 :%! {g:netrw_ftp_cmd} -i [-n]
848<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000849where
850 g:netrw_ftp_cmd is usually "ftp",
851 -i tells ftp not to be interactive
852 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
853
854If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000855userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000856The temporary file is then read into the main editing session window that
857requested it and the temporary file deleted.
858
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000859If your ftp doesn't accept the "user" command and immediately just demands a
860userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000861
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000862 *netrw-cadaver*
863To handle the SSL certificate dialog for untrusted servers, one may pull
864down the certificate and place it into /usr/ssl/cert.pem. This operation
865renders the server treatment as "trusted".
866
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000867 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000868If your ftp for whatever reason generates unwanted lines (such as AUTH
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100869messages) you may write a NetReadFixup() function:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000870>
871 function! NetReadFixup(method,line1,line2)
872 " a:line1: first new line in current file
873 " a:line2: last new line in current file
874 if a:method == 1 "rcp
875 elseif a:method == 2 "ftp + <.netrc>
876 elseif a:method == 3 "ftp + machine,uid,password,filename
877 elseif a:method == 4 "scp
878 elseif a:method == 5 "http/wget
879 elseif a:method == 6 "dav/cadaver
880 elseif a:method == 7 "rsync
881 elseif a:method == 8 "fetch
882 elseif a:method == 9 "sftp
Bram Moolenaar9964e462007-05-05 17:54:07 +0000883 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000884 endif
885 endfunction
886>
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000887The NetReadFixup() function will be called if it exists and thus allows you to
888customize your reading process. As a further example, <netrw.vim> contains
889just such a function to handle Windows 95 ftp. For whatever reason, Windows
89095's ftp dumps four blank lines at the end of a transfer, and so it is
891desirable to automate their removal. Here's some code taken from <netrw.vim>
892itself:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000893>
894 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000895 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000896 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000897 let fourblanklines= line2 - 3
898 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000899 endif
900 endfunction
901 endif
902>
903
904==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00009059. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100906 *netrw-browser* *netrw-dir* *netrw-list*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000907
Bram Moolenaar446cb832008-06-24 21:56:24 +0000908INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2
909 (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000910
Bram Moolenaar446cb832008-06-24 21:56:24 +0000911Netrw supports the browsing of directories on your local system and on remote
912hosts; browsing includes listing files and directories, entering directories,
913editing files therein, deleting files/directories, making new directories,
914moving (renaming) files and directories, copying files and directories, etc.
915One may mark files and execute any system command on them! The Netrw browser
916generally implements the previous explorer's maps and commands for remote
917directories, although details (such as pertinent global variable names)
918necessarily differ. To browse a directory, simply "edit" it! >
Bram Moolenaar269ec652004-07-29 08:43:53 +0000919
Bram Moolenaar446cb832008-06-24 21:56:24 +0000920 vim /your/directory/
921 vim .
922 vim c:\your\directory\
923<
924(Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t|
925 |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| )
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000926
927The Netrw remote file and directory browser handles two protocols: ssh and
Bram Moolenaar446cb832008-06-24 21:56:24 +0000928ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp
929in its remote browsing. Specifying any other protocol will cause it to be
930used for file transfers; but the ssh protocol will be used to do remote
931browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000932
Bram Moolenaar446cb832008-06-24 21:56:24 +0000933To use Netrw's remote directory browser, simply attempt to read a "file" with
934a trailing slash and it will be interpreted as a request to list a directory:
935>
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000936 vim [protocol]://[user@]hostname/path/
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000937<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000938where [protocol] is typically scp or ftp. As an example, try: >
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000939
Bram Moolenaar446cb832008-06-24 21:56:24 +0000940 vim ftp://ftp.home.vim.org/pub/vim/
941<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100942For local directories, the trailing slash is not required. Again, because it's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000943easy to miss: to browse remote directories, the url must terminate with a
944slash!
Bram Moolenaar83bab712005-08-01 21:58:57 +0000945
Bram Moolenaar446cb832008-06-24 21:56:24 +0000946If you'd like to avoid entering the password repeatedly for remote directory
947listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with
948ftp, see |netrw-netrc| (if your ftp supports it).
Bram Moolenaar83bab712005-08-01 21:58:57 +0000949
Bram Moolenaar446cb832008-06-24 21:56:24 +0000950There are several things you can do to affect the browser's display of files:
Bram Moolenaar83bab712005-08-01 21:58:57 +0000951
Bram Moolenaar446cb832008-06-24 21:56:24 +0000952 * To change the listing style, press the "i" key (|netrw-i|).
953 Currently there are four styles: thin, long, wide, and tree.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100954 To make that change "permanent", see |g:netrw_liststyle|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000955
Bram Moolenaar446cb832008-06-24 21:56:24 +0000956 * To hide files (don't want to see those xyz~ files anymore?) see
957 |netrw-ctrl-h|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000958
Bram Moolenaar446cb832008-06-24 21:56:24 +0000959 * Press s to sort files by name, time, or size.
960
961See |netrw-browse-cmds| for all the things you can do with netrw!
962
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100963 *netrw-getftype* *netrw-filigree* *netrw-ftype*
964The |getftype()| function is used to append a bit of filigree to indicate
965filetype to locally listed files:
966
967 directory : /
968 executable : *
969 fifo : |
970 links : @
971 sockets : =
972
973The filigree also affects the |g:netrw_sort_sequence|.
974
Bram Moolenaar446cb832008-06-24 21:56:24 +0000975
976QUICK HELP *netrw-quickhelp* {{{2
977 (Use ctrl-] to select a topic)~
978 Intro to Browsing...............................|netrw-intro-browse|
979 Quick Reference: Maps.........................|netrw-quickmap|
980 Quick Reference: Commands.....................|netrw-browse-cmds|
981 Hiding
982 Edit hiding list..............................|netrw-ctrl-h|
983 Hiding Files or Directories...................|netrw-a|
984 Hiding/Unhiding by suffix.....................|netrw-mh|
985 Hiding dot-files.............................|netrw-gh|
986 Listing Style
987 Select listing style (thin/long/wide/tree)....|netrw-i|
988 Associated setting variable...................|g:netrw_liststyle|
989 Shell command used to perform listing.........|g:netrw_list_cmd|
990 Quick file info...............................|netrw-qf|
991 Sorted by
992 Select sorting style (name/time/size).........|netrw-s|
993 Editing the sorting sequence..................|netrw-S|
Bram Moolenaarc236c162008-07-13 17:41:49 +0000994 Sorting options...............................|g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +0000995 Associated setting variable...................|g:netrw_sort_sequence|
996 Reverse sorting order.........................|netrw-r|
997
998
999 *netrw-quickmap* *netrw-quickmaps*
1000QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001001>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001002 --- ----------------- ----
1003 Map Quick Explanation Link
1004 --- ----------------- ----
1005< <F1> Causes Netrw to issue help
1006 <cr> Netrw will enter the directory or read the file |netrw-cr|
1007 <del> Netrw will attempt to remove the file/directory |netrw-del|
1008 - Makes Netrw go up one directory |netrw--|
1009 a Toggles between normal display, |netrw-a|
1010 hiding (suppress display of files matching g:netrw_list_hide)
1011 showing (display only files which match g:netrw_list_hide)
1012 c Make browsing directory the current directory |netrw-c|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001013 C Setting the editing window |netrw-C|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001014 d Make a directory |netrw-d|
1015 D Attempt to remove the file(s)/directory(ies) |netrw-D|
1016 gb Go to previous bookmarked directory |netrw-gb|
1017 gh Quick hide/unhide of dot-files |netrw-gh|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001018 <c-h> Edit file hiding list |netrw-ctrl-h|
1019 i Cycle between thin, long, wide, and tree listings |netrw-i|
1020 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
1021 mb Bookmark current directory |netrw-mb|
1022 mc Copy marked files to marked-file target directory |netrw-mc|
1023 md Apply diff to marked files (up to 3) |netrw-md|
1024 me Place marked files on arg list and edit them |netrw-me|
1025 mf Mark a file |netrw-mf|
1026 mh Toggle marked file suffices' presence on hiding list |netrw-mh|
1027 mm Move marked files to marked-file target directory |netrw-mm|
1028 mp Print marked files |netrw-mp|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001029 mr Mark files satisfying a shell-style |regexp| |netrw-mr|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001030 mt Current browsing directory becomes markfile target |netrw-mt|
1031 mT Apply ctags to marked files |netrw-mT|
1032 mu Unmark all marked files |netrw-mu|
1033 mx Apply arbitrary shell command to marked files |netrw-mx|
1034 mz Compress/decompress marked files |netrw-mz|
1035 o Enter the file/directory under the cursor in a new |netrw-o|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001036 browser window. A horizontal split is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001037 O Obtain a file specified by cursor |netrw-O|
1038 p Preview the file |netrw-p|
1039 P Browse in the previously used window |netrw-P|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001040 qb List bookmarked directories and history |netrw-qb|
1041 qf Display information on file |netrw-qf|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001042 r Reverse sorting order |netrw-r|
1043 R Rename the designed file(s)/directory(ies) |netrw-R|
1044 s Select sorting style: by name, time, or file size |netrw-s|
1045 S Specify suffix priority for name-sorting |netrw-S|
1046 t Enter the file/directory under the cursor in a new tab|netrw-t|
1047 u Change to recently-visited directory |netrw-u|
1048 U Change to subsequently-visited directory |netrw-U|
1049 v Enter the file/directory under the cursor in a new |netrw-v|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001050 browser window. A vertical split is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001051 x View file with an associated program |netrw-x|
1052
Bram Moolenaarc236c162008-07-13 17:41:49 +00001053 % Open a new file in netrw's current directory |netrw-%|
1054
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001055 *netrw-mouse* *netrw-leftmouse* *netrw-middlemouse* *netrw-rightmouse*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001056 <leftmouse> (gvim only) selects word under mouse as if a <cr>
1057 had been pressed (ie. edit file, change directory)
1058 <middlemouse> (gvim only) same as P selecting word under mouse;
1059 see |netrw-P|
1060 <rightmouse> (gvim only) delete file/directory using word under
1061 mouse
1062 <2-leftmouse> (gvim only) when:
1063 * in a netrw-selected file, AND
1064 * |g:netrw_retmap| == 1 AND
1065 * the user doesn't already have a <2-leftmouse> mapping
1066 defined before netrw is autoloaded,
1067 then a double clicked leftmouse button will return
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001068 to the netrw browser window. See |g:netrw_retmap|.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001069 <s-leftmouse> (gvim only) like mf, will mark files
1070
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001071 (to disable mouse buttons while browsing: |g:netrw_mousemaps|)
1072
Bram Moolenaar446cb832008-06-24 21:56:24 +00001073 *netrw-quickcom* *netrw-quickcoms*
1074QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
1075 :NetrwClean[!] ...........................................|netrw-clean|
1076 :NetrwSettings ...........................................|netrw-settings|
1077 :Explore[!] [dir] Explore directory of current file......|netrw-explore|
1078 :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
1079 :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1080 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1081 :Rexplore Return to Explorer.....................|netrw-explore|
1082 :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore|
1083 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
1084 :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1085
1086BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001087
Bram Moolenaar446cb832008-06-24 21:56:24 +00001088One may easily "bookmark" a directory by using >
1089
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001090 mb
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001091<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001092Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are
1093kept in sorted order.
1094
1095Related Topics:
1096 |netrw-gb| how to return (go) to a bookmark
1097 |netrw-mB| how to delete bookmarks
1098 |netrw-qb| how to list bookmarks
Bram Moolenaar4a85b412006-04-23 22:40:29 +00001099
1100
Bram Moolenaar446cb832008-06-24 21:56:24 +00001101BROWSING *netrw-cr* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001102
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001103Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001104Hitting the <cr> (the return key) will select the file or directory.
1105Directories will themselves be listed, and files will be opened using the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001106protocol given in the original read request.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001107
Bram Moolenaar446cb832008-06-24 21:56:24 +00001108 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that
1109 two or more spaces delimit filenames and directory names for the long and
1110 wide listing formats. Thus, if your filename or directory name has two or
1111 more sequential spaces embedded in it, or any trailing spaces, then you'll
1112 need to use the "thin" format to select it.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001113
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001114The |g:netrw_browse_split| option, which is zero by default, may be used to
Bram Moolenaar446cb832008-06-24 21:56:24 +00001115cause the opening of files to be done in a new window or tab instead of the
1116default. When the option is one or two, the splitting will be taken
1117horizontally or vertically, respectively. When the option is set to three, a
1118<cr> will cause the file to appear in a new tab.
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001119
Bram Moolenaar83bab712005-08-01 21:58:57 +00001120
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001121When using the gui (gvim), one may select a file by pressing the <leftmouse>
1122button. In addition, if
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001123
Bram Moolenaar446cb832008-06-24 21:56:24 +00001124 *|g:netrw_retmap| == 1 AND (its default value is 0)
1125 * in a netrw-selected file, AND
1126 * the user doesn't already have a <2-leftmouse> mapping defined before
1127 netrw is loaded
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001128
Bram Moolenaar446cb832008-06-24 21:56:24 +00001129then a doubly-clicked leftmouse button will return to the netrw browser
1130window.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001131
Bram Moolenaar446cb832008-06-24 21:56:24 +00001132Netrw attempts to speed up browsing, especially for remote browsing where one
1133may have to enter passwords, by keeping and re-using previously obtained
1134directory listing buffers. The |g:netrw_fastbrowse| variable is used to
1135control this behavior; one may have slow browsing (no buffer re-use), medium
1136speed browsing (re-use directory buffer listings only for remote directories),
1137and fast browsing (re-use directory buffer listings as often as possible).
1138The price for such re-use is that when changes are made (such as new files
1139are introduced into a directory), the listing may become out-of-date. One may
1140always refresh directory listing buffers by pressing ctrl-L (see
1141|netrw-ctrl-l|).
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001142
1143
Bram Moolenaar446cb832008-06-24 21:56:24 +00001144Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
1145Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse|
1146 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1147 |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd|
1148 |g:netrw_ssh_browse_reject| |g:netrw_use_noswf|
1149
1150
1151BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2
1152
1153Normally one enters a file or directory using the <cr>. However, the "o" map
1154allows one to open a new window to hold the new directory listing or file. A
1155horizontal split is used. (for vertical splitting, see |netrw-v|)
1156
1157Normally, the o key splits the window horizontally with the new window and
Bram Moolenaar15146672011-10-20 22:22:38 +02001158cursor at the top.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001159
1160Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
1161
Bram Moolenaar15146672011-10-20 22:22:38 +02001162Related Actions |netrw-cr| |netrw-p| |netrw-t| |netrw-T| |netrw-v|
1163Associated setting variables:
1164 |g:netrw_alto| control above/below splitting
1165 |g:netrw_winsize| control initial sizing
Bram Moolenaar446cb832008-06-24 21:56:24 +00001166
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001167BROWSING WITH A NEW TAB *netrw-t* *netrw-T* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001168
1169Normally one enters a file or directory using the <cr>. The "t" map
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001170allows one to open a new window holding the new directory listing or file in
1171a new tab. The "T" version puts the file or directory into a background tab
1172(see |gT|)
1173
Bram Moolenaar15146672011-10-20 22:22:38 +02001174Related Actions |netrw-cr| |netrw-o| |netrw-p| |netrw-v|
1175Associated setting variables:
1176 |g:netrw_winsize| control initial sizing
Bram Moolenaar446cb832008-06-24 21:56:24 +00001177
1178BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2
1179
1180Normally one enters a file or directory using the <cr>. However, the "v" map
1181allows one to open a new window to hold the new directory listing or file. A
1182vertical split is used. (for horizontal splitting, see |netrw-o|)
1183
1184Normally, the v key splits the window vertically with the new window and
Bram Moolenaar15146672011-10-20 22:22:38 +02001185cursor at the left.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001186
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001187There is only one tree listing buffer; using "v" on a displayed subdirectory
Bram Moolenaar446cb832008-06-24 21:56:24 +00001188will split the screen, but the same buffer will be shown twice.
1189
1190Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
1191
Bram Moolenaar15146672011-10-20 22:22:38 +02001192Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-T| |netrw-v|
1193Associated setting variables:
1194 |g:netrw_altv| control right/left splitting
1195 |g:netrw_winsize| control initial sizing
1196
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001197
1198CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001199
Bram Moolenaar9964e462007-05-05 17:54:07 +00001200The "i" map cycles between the thin, long, wide, and tree listing formats.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001201
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001202The thin listing format gives just the files' and directories' names.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001203
Bram Moolenaar8299df92004-07-10 09:47:34 +00001204The long listing is either based on the "ls" command via ssh for remote
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001205directories or displays the filename, file size (in bytes), and the time and
1206date of last modification for local directories. With the long listing
1207format, netrw is not able to recognize filenames which have trailing spaces.
1208Use the thin listing format for such files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001209
Bram Moolenaar9964e462007-05-05 17:54:07 +00001210The wide listing format uses two or more contiguous spaces to delineate
1211filenames; when using that format, netrw won't be able to recognize or use
1212filenames which have two or more contiguous spaces embedded in the name or any
1213trailing spaces. The thin listing format will, however, work with such files.
1214This listing format is the most compact.
1215
1216The tree listing format has a top directory followed by files and directories
1217preceded by a "|". One may open and close directories by pressing the <cr>
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001218key while atop the directory name.
1219
1220One may make a preferred listing style your default; see |g:netrw_liststyle|.
1221As an example, by putting the following line in your .vimrc, >
1222 let g:netrw_liststyle= 4
1223the tree style will become your default listing style.
Bram Moolenaar8299df92004-07-10 09:47:34 +00001224
Bram Moolenaar446cb832008-06-24 21:56:24 +00001225Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
1226 |g:netrw_timefmt| |g:netrw_list_cmd|
Bram Moolenaar8299df92004-07-10 09:47:34 +00001227
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001228CHANGE FILE PERMISSION *netrw-gp* {{{2
1229
1230"gp" will ask you for a new permission for the file named under the cursor.
1231Currently, this only works for local files.
1232
1233Associated setting variables: |g:netrw_chgperm|
1234
Bram Moolenaar83bab712005-08-01 21:58:57 +00001235
Bram Moolenaar446cb832008-06-24 21:56:24 +00001236CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2
Bram Moolenaar843ee412004-06-30 16:16:41 +00001237
Bram Moolenaar446cb832008-06-24 21:56:24 +00001238To change directory back to a bookmarked directory, use
Bram Moolenaar843ee412004-06-30 16:16:41 +00001239
Bram Moolenaar446cb832008-06-24 21:56:24 +00001240 {cnt}gb
Bram Moolenaar843ee412004-06-30 16:16:41 +00001241
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001242Any count may be used to reference any of the bookmarks.
1243
1244Related Topics:
1245 |netrw-mB| how to delete bookmarks
1246 |netrw-mb| how to make a bookmark
1247 |netrw-qb| how to list bookmarks
Bram Moolenaar843ee412004-06-30 16:16:41 +00001248
Bram Moolenaar843ee412004-06-30 16:16:41 +00001249
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001250CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001251
1252Every time you change to a new directory (new for the current session),
1253netrw will save the directory in a recently-visited directory history
Bram Moolenaaradc21822011-04-01 18:03:16 +02001254list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001255"u" map, one can change to an earlier directory (predecessor). To do
1256the opposite, see |netrw-U|.
1257
1258
Bram Moolenaar446cb832008-06-24 21:56:24 +00001259CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001260
1261With the "U" map, one can change to a later directory (successor).
1262This map is the opposite of the "u" map. (see |netrw-u|) Use the
Bram Moolenaar446cb832008-06-24 21:56:24 +00001263q map to list both the bookmarks and history. (see |netrw-qb|)
1264
1265
1266NETRW CLEAN *netrw-clean* *:NetrwClean*
1267
1268With :NetrwClean one may easily remove netrw from one's home directory;
1269more precisely, from the first directory on your |'runtimepath'|.
1270
1271With :NetrwClean!, netrw will remove netrw from all directories on your
1272|'runtimepath'|.
1273
1274With either form of the command, netrw will first ask for confirmation
1275that the removal is in fact what you want to do. If netrw doesn't have
1276permission to remove a file, it will issue an error message.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001277
Bram Moolenaar9964e462007-05-05 17:54:07 +00001278 *netrw-gx*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001279CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2
Bram Moolenaar9964e462007-05-05 17:54:07 +00001280 (also see |netrw_filehandler|)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001281
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001282Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
1283best seen with a special handler (ie. a tool provided with your computer).
1284Netrw allows one to invoke such special handlers by: >
1285
1286 * when Exploring, hit the "x" key
1287 * when editing, hit gx with the cursor atop the special filename
Bram Moolenaar9964e462007-05-05 17:54:07 +00001288< (not available if the |g:netrw_nogx| variable exists)
1289
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001290Netrw determines which special handler by the following method:
1291
1292 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
1293 view files. Examples of useful settings (place into your <.vimrc>): >
1294
1295 :let g:netrw_browsex_viewer= "kfmclient exec"
1296< or >
1297 :let g:netrw_browsex_viewer= "gnome-open"
1298<
1299 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
1300 invoked first (see |netrw_filehandler|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001301
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001302 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001303 * for Gnome (with gnome-open): gnome-open is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001304 * for KDE (with kfmclient) : kfmclient is used.
1305 * for Mac OS X : open is used.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001306 * otherwise the netrwFileHandler plugin is used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001307
1308The file's suffix is used by these various approaches to determine an
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001309appropriate application to use to "handle" these files. Such things as
1310OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
1311*.eps) can be handled.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001312
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001313 *netrw_filehandler*
Bram Moolenaar9964e462007-05-05 17:54:07 +00001314
1315The "x" map applies a function to a file, based on its extension. Of course,
1316the handler function must exist for it to be called!
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001317>
1318 Ex. mypgm.html x ->
Bram Moolenaar9964e462007-05-05 17:54:07 +00001319 NFH_html("scp://user@host/some/path/mypgm.html")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001320<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001321Users may write their own netrw File Handler functions to support more
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001322suffixes with special handling. See <autoload/netrwFileHandlers.vim> for
Bram Moolenaar9964e462007-05-05 17:54:07 +00001323examples on how to make file handler functions. As an example: >
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001324
Bram Moolenaar9964e462007-05-05 17:54:07 +00001325 " NFH_suffix(filename)
1326 fun! NFH_suffix(filename)
1327 ..do something special with filename..
1328 endfun
1329<
1330These functions need to be defined in some file in your .vim/plugin
1331(vimfiles\plugin) directory. Vim's function names may not have punctuation
1332characters (except for the underscore) in them. To support suffices that
1333contain such characters, netrw will first convert the suffix using the
1334following table: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001335
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001336 @ -> AT ! -> EXCLAMATION % -> PERCENT
1337 : -> COLON = -> EQUAL ? -> QUESTION
Bram Moolenaar9964e462007-05-05 17:54:07 +00001338 , -> COMMA - -> MINUS ; -> SEMICOLON
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001339 $ -> DOLLAR + -> PLUS ~ -> TILDE
1340<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001341So, for example: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001342
Bram Moolenaar9964e462007-05-05 17:54:07 +00001343 file.rcs,v -> NFH_rcsCOMMAv()
1344<
1345If more such translations are necessary, please send me email: >
1346 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
1347with a request.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001348
Bram Moolenaar446cb832008-06-24 21:56:24 +00001349Associated setting variable: |g:netrw_browsex_viewer|
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001350
Bram Moolenaar446cb832008-06-24 21:56:24 +00001351 *netrw-curdir*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001352DELETING BOOKMARKS *netrw-mB* {{{2
1353
1354To delete a bookmark, use >
1355
1356 {cnt}mB
1357<
1358Related Topics:
1359 |netrw-gb| how to return (go) to a bookmark
1360 |netrw-mb| how to make a bookmark
1361 |netrw-qb| how to list bookmarks
1362
1363
Bram Moolenaar446cb832008-06-24 21:56:24 +00001364DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001365
Bram Moolenaar446cb832008-06-24 21:56:24 +00001366If files have not been marked with |netrw-mf|: (local marked file list)
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001367
Bram Moolenaar446cb832008-06-24 21:56:24 +00001368 Deleting/removing files and directories involves moving the cursor to the
1369 file/directory to be deleted and pressing "D". Directories must be empty
1370 first before they can be successfully removed. If the directory is a
1371 softlink to a directory, then netrw will make two requests to remove the
1372 directory before succeeding. Netrw will ask for confirmation before doing
1373 the removal(s). You may select a range of lines with the "V" command
1374 (visual selection), and then pressing "D".
Bram Moolenaar9964e462007-05-05 17:54:07 +00001375
Bram Moolenaar446cb832008-06-24 21:56:24 +00001376If files have been marked with |netrw-mf|: (local marked file list)
1377
1378 Marked files (and empty directories) will be deleted; again, you'll be
1379 asked to confirm the deletion before it actually takes place.
1380
1381The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
1382used to control the attempts to remove files and directories. The
1383g:netrw_rm_cmd is used with files, and its default value is:
1384
1385 g:netrw_rm_cmd: ssh HOSTNAME rm
1386
1387The g:netrw_rmdir_cmd variable is used to support the removal of directories.
1388Its default value is:
1389
1390 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
1391
1392If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
1393to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
1394
1395 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
1396
Bram Moolenaar15146672011-10-20 22:22:38 +02001397Related topics: |netrw-d|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001398Associated setting variable: |g:netrw_local_rmdir| |g:netrw_rm_cmd|
1399 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001400
1401
Bram Moolenaar446cb832008-06-24 21:56:24 +00001402*netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
1403*netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
1404DIRECTORY EXPLORATION COMMANDS {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001405
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001406 :[N]Explore[!] [dir]... Explore directory of current file *:Explore*
1407 :[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
1408 :Rexplore ... Return to Explorer *:Rexplore*
1409 :[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore*
1410 :Texplore [dir]... Tab & Explore *:Texplore*
1411 :[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001412
1413 Used with :Explore **/pattern : (also see |netrw-starstar|)
1414 :Nexplore............. go to next matching file *:Nexplore*
1415 :Pexplore............. go to previous matching file *:Pexplore*
1416
1417:Explore will open the local-directory browser on the current file's
1418 directory (or on directory [dir] if specified). The window will be
1419 split only if the file has been modified, otherwise the browsing
1420 window will take over that window. Normally the splitting is taken
1421 horizontally.
1422:Explore! is like :Explore, but will use vertical splitting.
1423:Sexplore will always split the window before invoking the local-directory
1424 browser. As with Explore, the splitting is normally done
1425 horizontally.
1426:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
1427:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
1428:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
1429:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
1430:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
1431:Texplore [dir] does a tabnew before generating the browser window
1432
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001433By default, these commands use the current file's directory. However, one may
1434explicitly provide a directory (path) to use.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001435
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001436The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or
1437columns the new explorer window should have.
1438
1439Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
1440user, is used to control the quantity of rows and/or columns new explorer
1441windows should have.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001442
1443:Rexplore This command is a little different from the others. When one
1444 edits a file, for example by pressing <cr> when atop a file in
1445 a netrw browser window, :Rexplore will return the display to
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001446 that of the last netrw browser window. It is a command version
1447 of the <2-leftmouse> map (which is only available under gvim and
Bram Moolenaar446cb832008-06-24 21:56:24 +00001448 cooperative terms).
1449
1450
1451*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
1452EXPLORING WITH STARS AND PATTERNS
1453
1454When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
1455following four styles, Explore generates a list of files which satisfy
1456the request. >
1457
1458 */filepat files in current directory which satisfy filepat
1459 **/filepat files in current directory or below which satisfy the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001460 file pattern
Bram Moolenaar446cb832008-06-24 21:56:24 +00001461 *//pattern files in the current directory which contain the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001462 pattern (vimgrep is used)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001463 **//pattern files in the current directory or below which contain
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001464 the pattern (vimgrep is used)
Bram Moolenaar572cb562005-08-05 21:35:02 +00001465<
Bram Moolenaar446cb832008-06-24 21:56:24 +00001466The cursor will be placed on the first file in the list. One may then
1467continue to go to subsequent files on that list via |:Nexplore| or to
1468preceding files on that list with |:Pexplore|. Explore will update the
1469directory and place the cursor appropriately.
1470
1471A plain >
1472 :Explore
1473will clear the explore list.
1474
1475If your console or gui produces recognizable shift-up or shift-down sequences,
1476then you'll likely find using shift-downarrow and shift-uparrow convenient.
1477They're mapped by netrw:
1478
1479 <s-down> == Nexplore, and
1480 <s-up> == Pexplore.
1481
1482As an example, consider
1483>
1484 :Explore */*.c
1485 :Nexplore
1486 :Nexplore
1487 :Pexplore
1488<
1489The status line will show, on the right hand side of the status line, a
1490message like "Match 3 of 20".
1491
1492Associated setting variables: |g:netrw_keepdir| |g:netrw_browse_split|
1493 |g:netrw_fastbrowse| |g:netrw_ftp_browse_reject|
1494 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1495 |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
1496 |g:netrw_liststyle|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001497
1498
Bram Moolenaar446cb832008-06-24 21:56:24 +00001499DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001500
Bram Moolenaar446cb832008-06-24 21:56:24 +00001501With the cursor atop a filename, pressing "qf" will reveal the file's size
1502and last modification timestamp. Currently this capability is only available
1503for local files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001504
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001505
Bram Moolenaar446cb832008-06-24 21:56:24 +00001506EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001507
Bram Moolenaar446cb832008-06-24 21:56:24 +00001508The "<ctrl-h>" map brings up a requestor allowing the user to change the
1509file/directory hiding list contained in |g:netrw_list_hide|. The hiding list
1510consists of one or more patterns delimited by commas. Files and/or
1511directories satisfying these patterns will either be hidden (ie. not shown) or
1512be the only ones displayed (see |netrw-a|).
1513
1514The "gh" mapping (see |netrw-gh|) quickly alternates between the usual
1515hiding list and the hiding of files or directories that begin with ".".
1516
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001517As an example, >
1518 let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
1519Effectively, this makes the effect of a |netrw-gh| command the initial setting.
1520What it means:
1521
1522 \(^\|\s\s\) : if the line begins with the following, -or-
1523 two consecutive spaces are encountered
1524 \zs : start the hiding match now
1525 \. : if it now begins with a dot
1526 \S\+ : and is followed by one or more non-whitespace
1527 characters
1528
Bram Moolenaar446cb832008-06-24 21:56:24 +00001529Associated setting variables: |g:netrw_hide| |g:netrw_list_hide|
1530Associated topics: |netrw-a| |netrw-gh| |netrw-mh|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001531
Bram Moolenaar15146672011-10-20 22:22:38 +02001532 *netrw-sort-sequence*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001533EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2
1534
1535When "Sorted by" is name, one may specify priority via the sorting sequence
1536(g:netrw_sort_sequence). The sorting sequence typically prioritizes the
1537name-listing by suffix, although any pattern will do. Patterns are delimited
1538by commas. The default sorting sequence is (all one line):
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001539
1540For Unix: >
1541 '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,
1542 \.info$,\.swp$,\.bak$,\~$'
1543<
1544Otherwise: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00001545 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
1546 \.swp$,\.bak$,\~$'
1547<
1548The lone * is where all filenames not covered by one of the other patterns
1549will end up. One may change the sorting sequence by modifying the
1550g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
1551using the "S" map.
1552
Bram Moolenaarc236c162008-07-13 17:41:49 +00001553Related topics: |netrw-s| |netrw-S|
1554Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001555
1556
Bram Moolenaaradc21822011-04-01 18:03:16 +02001557FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
1558
1559Remote symbolic links (ie. those listed via ssh or ftp) are problematic
1560in that it is difficult to tell whether they link to a file or to a
1561directory.
1562
1563To force treatment as a file: use >
1564 gd
1565<
1566To force treatment as a directory: use >
1567 gf
1568<
1569
Bram Moolenaar446cb832008-06-24 21:56:24 +00001570GOING UP *netrw--* {{{2
1571
1572To go up a directory, press "-" or press the <cr> when atop the ../ directory
1573entry in the listing.
1574
1575Netrw will use the command in |g:netrw_list_cmd| to perform the directory
1576listing operation after changing HOSTNAME to the host specified by the
1577user-provided url. By default netrw provides the command as:
1578
1579 ssh HOSTNAME ls -FLa
1580
1581where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
1582read. Naturally, the user may override this command with whatever is
1583preferred. The NetList function which implements remote browsing
1584expects that directories will be flagged by a trailing slash.
1585
1586
1587HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2
1588
1589Netrw's browsing facility allows one to use the hiding list in one of three
1590ways: ignore it, hide files which match, and show only those files which
1591match.
1592
1593If no files have been marked via |netrw-mf|:
1594
1595The "a" map allows the user to cycle through the three hiding modes.
1596
1597The |g:netrw_list_hide| variable holds a comma delimited list of patterns
1598based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list.
1599(also see |netrw-ctrl-h|) To set the hiding list, use the <c-h> map. As an
1600example, to hide files which begin with a ".", one may use the <c-h> map to
1601set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*'
1602in one's <.vimrc>). One may then use the "a" key to show all files, hide
1603matching files, or to show only the matching files.
1604
1605 Example: \.[ch]$
1606 This hiding list command will hide/show all *.c and *.h files.
1607
1608 Example: \.c$,\.h$
1609 This hiding list command will also hide/show all *.c and *.h
1610 files.
1611
1612Don't forget to use the "a" map to select the mode (normal/hiding/show) you
1613want!
1614
1615If files have been marked using |netrw-mf|, then this command will:
1616
1617 if showing all files or non-hidden files:
1618 modify the g:netrw_list_hide list by appending the marked files to it
1619 and showing only non-hidden files.
1620
1621 else if showing hidden files only:
1622 modify the g:netrw_list_hide list by removing the marked files from it
1623 and showing only non-hidden files.
1624 endif
1625
1626 *netrw-gh* *netrw-hide*
1627As a quick shortcut, one may press >
1628 gh
1629to toggle between hiding files which begin with a period (dot) and not hiding
1630them.
1631
1632Associated setting variable: |g:netrw_list_hide|
1633Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
1634
1635IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001636
1637Especially with the remote directory browser, constantly entering the password
1638is tedious.
1639
Bram Moolenaar9964e462007-05-05 17:54:07 +00001640For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00001641tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
1642for setting up no-password ssh and scp and discusses associated security
Bram Moolenaar9964e462007-05-05 17:54:07 +00001643issues. It used to be available at http://hacks.oreilly.com/pub/h/66 ,
1644but apparently that address is now being redirected to some "hackzine".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001645I'll attempt a summary based on that article and on a communication from
1646Ben Schmidt:
Bram Moolenaar843ee412004-06-30 16:16:41 +00001647
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001648 1. Generate a public/private key pair on the local machine
1649 (ssh client): >
1650 ssh-keygen -t rsa
1651 (saving the file in ~/.ssh/id_rsa as prompted)
1652<
1653 2. Just hit the <CR> when asked for passphrase (twice) for no
1654 passphrase. If you do use a passphrase, you will also need to use
1655 ssh-agent so you only have to type the passphrase once per session.
1656 If you don't use a passphrase, simply logging onto your local
1657 computer or getting access to the keyfile in any way will suffice
1658 to access any ssh servers which have that key authorized for login.
1659
1660 3. This creates two files: >
1661 ~/.ssh/id_rsa
1662 ~/.ssh/id_rsa.pub
1663<
1664 4. On the target machine (ssh server): >
1665 cd
1666 mkdir -p .ssh
1667 chmod 0700 .ssh
1668<
1669 5. On your local machine (ssh client): (one line) >
1670 ssh {serverhostname}
1671 cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub
1672<
1673 or, for OpenSSH, (one line) >
1674 ssh {serverhostname}
1675 cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
1676<
1677You can test it out with >
1678 ssh {serverhostname}
1679and you should be log onto the server machine without further need to type
1680anything.
1681
1682If you decided to use a passphrase, do: >
1683 ssh-agent $SHELL
1684 ssh-add
1685 ssh {serverhostname}
1686You will be prompted for your key passphrase when you use ssh-add, but not
1687subsequently when you use ssh. For use with vim, you can use >
1688 ssh-agent vim
1689and, when next within vim, use >
1690 :!ssh-add
1691Alternatively, you can apply ssh-agent to the terminal you're planning on
1692running vim in: >
1693 ssh-agent xterm &
1694and do ssh-add whenever you need.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001695
Bram Moolenaar9964e462007-05-05 17:54:07 +00001696For Windows, folks on the vim mailing list have mentioned that Pageant helps
1697with avoiding the constant need to enter the password.
Bram Moolenaar433f7c82006-03-21 21:29:36 +00001698
Bram Moolenaar446cb832008-06-24 21:56:24 +00001699Kingston Fung wrote about another way to avoid constantly needing to enter
1700passwords:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001701
Bram Moolenaar446cb832008-06-24 21:56:24 +00001702 In order to avoid the need to type in the password for scp each time, you
1703 provide a hack in the docs to set up a non password ssh account. I found a
1704 better way to do that: I can use a regular ssh account which uses a
1705 password to access the material without the need to key-in the password
1706 each time. It's good for security and convenience. I tried ssh public key
1707 authorization + ssh-agent, implementing this, and it works! Here are two
1708 links with instructions:
1709
1710 http://www.ibm.com/developerworks/library/l-keyc2/
1711 http://sial.org/howto/openssh/publickey-auth/
1712
1713
1714LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2
1715
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001716Pressing "qb" (query bookmarks) will list both the bookmarked directories and
1717directory traversal history.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001718
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001719Related Topics:
1720 |netrw-gb| how to return (go) to a bookmark
1721 |netrw-mb| how to make a bookmark
1722 |netrw-mB| how to delete bookmarks
1723 |netrw-u| change to a predecessor directory via the history stack
1724 |netrw-U| change to a successor directory via the history stack
Bram Moolenaar446cb832008-06-24 21:56:24 +00001725
1726MAKING A NEW DIRECTORY *netrw-d* {{{2
1727
1728With the "d" map one may make a new directory either remotely (which depends
1729on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
1730global variable g:netrw_local_mkdir). Netrw will issue a request for the new
1731directory's name. A bare <CR> at that point will abort the making of the
1732directory. Attempts to make a local directory that already exists (as either
1733a file or a directory) will be detected, reported on, and ignored.
1734
Bram Moolenaar15146672011-10-20 22:22:38 +02001735Related topics: |netrw-D|
1736Associated setting variables: |g:netrw_local_mkdir| |g:netrw_mkdir_cmd|
1737 |g:netrw_remote_mkdir|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001738
1739
1740MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
1741
1742By default, |g:netrw_keepdir| is 1. This setting means that the current
1743directory will not track the browsing directory.
1744
1745Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to
1746track netrw's browsing directory.
1747
1748However, given the default setting for g:netrw_keepdir of 1 where netrw
1749maintains its own separate notion of the current directory, in order to make
1750the two directories the same, use the "c" map (just type c). That map will
1751set Vim's notion of the current directory to netrw's current browsing
1752directory.
1753
1754Associated setting variable: |g:netrw_keepdir|
1755
1756MARKING FILES *netrw-mf* {{{2
1757 (also see |netrw-mr|)
1758
1759One may mark files with the cursor atop a filename and then pressing "mf".
1760With gvim, one may also mark files with <s-leftmouse>. The following netrw
1761maps make use of marked files:
1762
1763 |netrw-a| Hide marked files/directories
1764 |netrw-D| Delete marked files/directories
1765 |netrw-mc| Copy marked files to target
1766 |netrw-md| Apply vimdiff to marked files
1767 |netrw-me| Edit marked files
1768 |netrw-mg| Apply vimgrep to marked files
1769 |netrw-mm| Move marked files
1770 |netrw-mp| Print marked files
1771 |netrw-mt| Set target for |netrw-mm| and |netrw-mc|
1772 |netrw-mT| Generate tags using marked files
1773 |netrw-mx| Apply shell command to marked files
1774 |netrw-mz| Compress/Decompress marked files
1775 |netrw-O| Obtain marked files
1776 |netrw-R| Rename marked files
1777
1778One may unmark files one at a time the same way one marks them; ie. place
1779the cursor atop a marked file and press "mf". This process also works
1780with <s-leftmouse> using gvim. One may unmark all files by pressing
1781"mu" (see |netrw-mu|).
1782
Bram Moolenaaradc21822011-04-01 18:03:16 +02001783Marked files are highlighted using the "netrwMarkFile" highlighting group,
1784which by default is linked to "Identifier" (see Identifier under
1785|group-name|). You may change the highlighting group by putting something
1786like >
1787
1788 highlight clear netrwMarkFile
1789 hi link netrwMarkFile ..whatever..
1790<
1791into $HOME/.vim/after/syntax/netrw.vim .
1792
Bram Moolenaar446cb832008-06-24 21:56:24 +00001793*markfilelist* *global_markfilelist* *local_markfilelist*
1794All marked files are entered onto the global marked file list; there is only
1795one such list. In addition, every netrw buffer also has its own local marked
1796file list; since netrw buffers are associated with specific directories, this
1797means that each directory has its own local marked file list. The various
1798commands which operate on marked files use one or the other of the marked file
1799lists.
1800
1801
1802MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2
1803 (also see |netrw-mf|)
1804
1805One may also mark files by pressing "mr"; netrw will then issue a prompt,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001806"Enter regexp: ". You may then enter a shell-style regular expression such
1807as *.c$ (see |glob()|). For remote systems, glob() doesn't work -- so netrw
1808converts "*" into ".*" (see |regexp|) and marks files based on that. In the
1809future I may make it possible to use |regexp|s instead of glob()-style
1810expressions (yet-another-option).
Bram Moolenaar446cb832008-06-24 21:56:24 +00001811
1812
1813MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2
1814 (See |netrw-mf| and |netrw-mr| for how to mark files)
1815 (uses the local marked-file list)
1816
1817Upon activation of the "mx" map, netrw will query the user for some (external)
1818command to be applied to all marked files. All "%"s in the command will be
1819substituted with the name of each marked file in turn. If no "%"s are in the
1820command, then the command will be followed by a space and a marked filename.
1821
1822
1823MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
1824 (See |netrw-mf| and |netrw-mr| for how to mark files)
1825 (uses the local marked file list)
1826
1827If any marked files are compressed, then "mz" will decompress them.
1828If any marked files are decompressed, then "mz" will compress them
1829using the command specified by |g:netrw_compress|; by default,
1830that's "gzip".
1831
1832For decompression, netrw provides a |Dictionary| of suffices and their
1833associated decompressing utilities; see |g:netrw_decompress|.
1834
1835Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
1836
1837MARKED FILES: COPYING *netrw-mc* {{{2
1838 (See |netrw-mf| and |netrw-mr| for how to mark files)
1839 (Uses the global marked file list)
1840
1841Select a target directory with mt (|netrw-mt|). Then change directory,
Bram Moolenaaradc21822011-04-01 18:03:16 +02001842select file(s) (see |netrw-mf|), and press "mc". The copy is done
1843from the current window (where one does the mf) to the target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001844
1845Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
1846
1847MARKED FILES: DIFF *netrw-md* {{{2
1848 (See |netrw-mf| and |netrw-mr| for how to mark files)
1849 (uses the global marked file list)
1850
1851Use |vimdiff| to visualize difference between selected files (two or
1852three may be selected for this). Uses the global marked file list.
1853
1854MARKED FILES: EDITING *netrw-me* {{{2
1855 (See |netrw-mf| and |netrw-mr| for how to mark files)
1856 (uses the global marked file list)
1857
1858This command will place the marked files on the |arglist| and commence
1859editing them. One may return the to explorer window with |:Rexplore|.
1860
1861MARKED FILES: GREP *netrw-mg* {{{2
1862 (See |netrw-mf| and |netrw-mr| for how to mark files)
1863 (uses the global marked file list)
1864
1865This command will apply |:vimgrep| to the marked files. The command will ask
1866for the requested pattern; one may enter: >
1867 /pattern/[g][j]
1868 ! /pattern/[g][j]
1869 pattern
1870<
1871MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2
1872 (See |netrw-mf| and |netrw-mr| for how to mark files)
1873 (uses the local marked file list)
1874
1875This command extracts the suffices of the marked files and toggles their
1876presence on the hiding list. Please note that marking the same suffix
1877this way multiple times will result in the suffix's presence being toggled
1878for each file (so an even quantity of marked files having the same suffix
1879is the same as not having bothered to select them at all).
1880
1881Related topics: |netrw-a| |g:netrw_list_hide|
1882
1883MARKED FILES: MOVING *netrw-mm* {{{2
1884 (See |netrw-mf| and |netrw-mr| for how to mark files)
1885 (uses the global marked file list)
1886
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001887 WARNING: moving files is more dangerous than copying them.
1888 A file being moved is first copied and then deleted; if the
1889 copy operation fails and the delete succeeds, you will lose
1890 the file. Either try things out with unimportant files
1891 first or do the copy and then delete yourself using mc and D.
1892 Use at your own risk!
1893
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001894Select a target directory with mt (|netrw-mt|). Then change directory,
Bram Moolenaaradc21822011-04-01 18:03:16 +02001895select file(s) (see |netrw-mf|), and press "mm". The move is done
1896from the current window (where one does the mf) to the target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001897
1898Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
1899
1900MARKED FILES: PRINTING *netrw-mp* {{{2
1901 (See |netrw-mf| and |netrw-mr| for how to mark files)
1902 (uses the local marked file list)
1903
1904Netrw will apply the |:hardcopy| command to marked files. What it does
1905is open each file in a one-line window, execute hardcopy, then close the
1906one-line window.
1907
1908
1909MARKED FILES: SOURCING *netrw-ms* {{{2
1910 (See |netrw-mf| and |netrw-mr| for how to mark files)
1911 (uses the local marked file list)
1912
1913Netrw will source the marked files (using vim's |:source| command)
1914
1915
1916MARKED FILES: TAGGING *netrw-mT* {{{2
1917 (See |netrw-mf| and |netrw-mr| for how to mark files)
1918 (uses the global marked file list)
1919
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001920The "mT" mapping will apply the command in |g:netrw_ctags| (by default, it is
Bram Moolenaar446cb832008-06-24 21:56:24 +00001921"ctags") to marked files. For remote browsing, in order to create a tags file
1922netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for
1923this to work on remote systems. For your local system, see |ctags| on how to
1924get a version. I myself use hdrtags, currently available at
1925http://mysite.verizon.net/astronaut/src/index.html , and have >
1926
1927 let g:netrw_ctags= "hdrtag"
1928<
1929in my <.vimrc>.
1930
1931When a remote set of files are tagged, the resulting tags file is "obtained";
1932ie. a copy is transferred to the local system's directory. The local tags
1933file is then modified so that one may use it through the network. The
1934modification is concerns the names of the files in the tags; each filename is
1935preceded by the netrw-compatible url used to obtain it. When one subsequently
1936uses one of the go to tag actions (|tags|), the url will be used by netrw to
1937edit the desired file and go to the tag.
1938
Bram Moolenaarc236c162008-07-13 17:41:49 +00001939Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001940
1941
1942MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2
1943 (See |netrw-mf| and |netrw-mr| for how to mark files)
1944
1945Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
1946
1947 * if the cursor is atop a file name, then the netrw window's currently
1948 displayed directory is used for the copy/move-to target.
1949
1950 * also, if the cursor is in the banner, then the netrw window's currently
1951 displayed directory is used for the copy/move-to target.
1952
1953 * however, if the cursor is atop a directory name, then that directory is
1954 used for the copy/move-to target
1955
1956There is only one copy/move-to target per vim session; ie. the target is a
1957script variable (see |s:var|) and is shared between all netrw windows (in an
1958instance of vim).
1959
1960MARKED FILES: UNMARKING *netrw-mu* {{{2
1961 (See |netrw-mf| and |netrw-mr| for how to mark files)
1962
1963The "mu" mapping will unmark all currently marked files.
1964
Bram Moolenaar15146672011-10-20 22:22:38 +02001965 *netrw-browser-settings*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001966NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2
1967
Bram Moolenaar15146672011-10-20 22:22:38 +02001968(if you're interested in the netrw file transfer settings, see |netrw-options|
1969 and |netrw-protocol|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001970
1971The <netrw.vim> browser provides settings in the form of variables which
1972you may modify; by placing these settings in your <.vimrc>, you may customize
1973your browsing preferences. (see also: |netrw-settings|)
1974>
1975 --- -----------
1976 Var Explanation
1977 --- -----------
Bram Moolenaaradc21822011-04-01 18:03:16 +02001978< *g:netrw_alto* change from above splitting to below splitting
Bram Moolenaar446cb832008-06-24 21:56:24 +00001979 by setting this variable (see |netrw-o|)
1980 default: =&sb (see |'sb'|)
1981
Bram Moolenaaradc21822011-04-01 18:03:16 +02001982 *g:netrw_altv* change from left splitting to right splitting
Bram Moolenaar446cb832008-06-24 21:56:24 +00001983 by setting this variable (see |netrw-v|)
1984 default: =&spr (see |'spr'|)
1985
Bram Moolenaaradc21822011-04-01 18:03:16 +02001986 *g:netrw_banner* enable/suppress the banner
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001987 =0: suppress the banner
1988 =1: banner is enabled (default)
1989 NOTE: suppressing the banner is a new feature
1990 which may cause problems.
1991
Bram Moolenaaradc21822011-04-01 18:03:16 +02001992 *g:netrw_browse_split* when browsing, <cr> will open the file by:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001993 =0: re-using the same window
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001994 =1: horizontally splitting the window first
1995 =2: vertically splitting the window first
Bram Moolenaar446cb832008-06-24 21:56:24 +00001996 =3: open file in new tab
1997 =4: act like "P" (ie. open previous window)
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001998 Note that |g:netrw_preview| may be used
1999 to get vertical splitting instead of
2000 horizontal splitting.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002001
Bram Moolenaaradc21822011-04-01 18:03:16 +02002002 *g:netrw_browsex_viewer* specify user's preference for a viewer: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00002003 "kfmclient exec"
2004 "gnome-open"
2005< If >
2006 "-"
2007< is used, then netrwFileHandler() will look for
2008 a script/function to handle the given
2009 extension. (see |netrw_filehandler|).
2010
Bram Moolenaaradc21822011-04-01 18:03:16 +02002011 *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002012 Windows: "cacls FILENAME /e /p PERM"
2013 Used to change access permission for a file.
2014
Bram Moolenaaradc21822011-04-01 18:03:16 +02002015 *g:netrw_compress* ="gzip"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002016 Will compress marked files with this
2017 command
2018
Bram Moolenaar15146672011-10-20 22:22:38 +02002019 *g:Netrw_corehandler* Allows one to specify something additional
2020 to do when handling <core> files via netrw's
2021 browser's "x" command (see |netrw-x|). If
2022 present, g:Netrw_corehandler specifies
2023 either one or more function references
2024 (see |Funcref|). (the capital g:Netrw...
2025 is required its holding a function reference)
2026
2027
Bram Moolenaaradc21822011-04-01 18:03:16 +02002028 *g:netrw_ctags* ="ctags"
Bram Moolenaarc236c162008-07-13 17:41:49 +00002029 The default external program used to create tags
2030
Bram Moolenaaradc21822011-04-01 18:03:16 +02002031 *g:netrw_cursor* = 2 (default)
2032 This option controls the use of the
2033 |'cursorline'| (cul) and |'cursorcolumn'|
2034 (cuc) settings by netrw:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002035
Bram Moolenaaradc21822011-04-01 18:03:16 +02002036 Value Thin-Long-Tree Wide
2037 =0 u-cul u-cuc u-cul u-cuc
2038 =1 u-cul u-cuc cul u-cuc
2039 =2 cul u-cuc cul u-cuc
2040 =3 cul u-cuc cul cuc
2041 =4 cul cuc cul cuc
2042
2043 Where
2044 u-cul : user's |'cursorline'| setting used
2045 u-cuc : user's |'cursorcolumn'| setting used
2046 cul : |'cursorline'| locally set
2047 cuc : |'cursorcolumn'| locally set
2048
2049 *g:netrw_decompress* = { ".gz" : "gunzip" ,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002050 ".bz2" : "bunzip2" ,
2051 ".zip" : "unzip" ,
2052 ".tar" : "tar -xf"}
2053 A dictionary mapping suffices to
2054 decompression programs.
2055
Bram Moolenaaradc21822011-04-01 18:03:16 +02002056 *g:netrw_dirhistmax* =10: controls maximum quantity of past
2057 history. May be zero to supppress
2058 history.
2059 (related: |netrw-qb| |netrw-u| |netrw-U|)
2060
2061 *g:netrw_fastbrowse* =0: slow speed directory browsing;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002062 never re-uses directory listings,
2063 always obtains directory listings.
2064 =1: medium speed directory browsing;
2065 re-use directory listings only
2066 when remote directory browsing.
2067 (default value)
2068 =2: fast directory browsing;
2069 only obtains directory listings when the
2070 directory hasn't been seen before
2071 (or |netrw-ctrl-l| is used).
2072
2073 Fast browsing retains old directory listing
2074 buffers so that they don't need to be
2075 re-acquired. This feature is especially
2076 important for remote browsing. However, if
2077 a file is introduced or deleted into or from
2078 such directories, the old directory buffer
2079 becomes out-of-date. One may always refresh
2080 such a directory listing with |netrw-ctrl-l|.
2081 This option gives the user the choice of
2082 trading off accuracy (ie. up-to-date listing)
2083 versus speed.
2084
Bram Moolenaaradc21822011-04-01 18:03:16 +02002085 *g:netrw_fname_escape* =' ?&;%'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002086 Used on filenames before remote reading/writing
Bram Moolenaar446cb832008-06-24 21:56:24 +00002087
Bram Moolenaaradc21822011-04-01 18:03:16 +02002088 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
Bram Moolenaar446cb832008-06-24 21:56:24 +00002089 that can show up as "directories" and "files"
2090 in the listing. This pattern is used to
2091 remove such embedded messages. By default its
2092 value is:
2093 '^total\s\+\d\+$\|
2094 ^Trying\s\+\d\+.*$\|
2095 ^KERBEROS_V\d rejected\|
2096 ^Security extensions not\|
2097 No such file\|
2098 : connect to address [0-9a-fA-F:]*
2099 : No route to host$'
2100
Bram Moolenaaradc21822011-04-01 18:03:16 +02002101 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002102 listing. Defaults:
2103 unix or g:netrw_cygwin set: : "ls -lF"
2104 otherwise "dir"
2105
2106
Bram Moolenaaradc21822011-04-01 18:03:16 +02002107 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002108 listing, sorted by size of file.
2109 Defaults:
2110 unix or g:netrw_cygwin set: : "ls -slF"
2111 otherwise "dir"
2112
Bram Moolenaaradc21822011-04-01 18:03:16 +02002113 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002114 listing, sorted by time of last modification.
2115 Defaults:
2116 unix or g:netrw_cygwin set: : "ls -tlF"
2117 otherwise "dir"
2118
Bram Moolenaaradc21822011-04-01 18:03:16 +02002119 *g:netrw_glob_escape* ='[]*?`{~$' (unix)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002120 ='[]*?`{$' (windows
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002121 These characters in directory names are
Bram Moolenaar446cb832008-06-24 21:56:24 +00002122 escaped before applying glob()
2123
Bram Moolenaaradc21822011-04-01 18:03:16 +02002124 *g:netrw_hide* if true, the hiding list is used
Bram Moolenaar446cb832008-06-24 21:56:24 +00002125 default: =0
2126
Bram Moolenaaradc21822011-04-01 18:03:16 +02002127 *g:netrw_home* The home directory for where bookmarks and
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002128 history are saved (as .netrwbook and
2129 .netrwhist).
2130 default: the first directory on the
2131 |'runtimepath'|
2132
Bram Moolenaaradc21822011-04-01 18:03:16 +02002133 *g:netrw_keepdir* =1 (default) keep current directory immune from
Bram Moolenaar446cb832008-06-24 21:56:24 +00002134 the browsing directory.
2135 =0 keep the current directory the same as the
2136 browsing directory.
2137 The current browsing directory is contained in
2138 b:netrw_curdir (also see |netrw-c|)
2139
Bram Moolenaaradc21822011-04-01 18:03:16 +02002140 *g:netrw_list_cmd* command for listing remote directories
Bram Moolenaar446cb832008-06-24 21:56:24 +00002141 default: (if ssh is executable)
2142 "ssh HOSTNAME ls -FLa"
2143
Bram Moolenaaradc21822011-04-01 18:03:16 +02002144 *g:netrw_liststyle* Set the default listing style:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002145 = 0: thin listing (one file per line)
2146 = 1: long listing (one file per line with time
2147 stamp information and file size)
2148 = 2: wide listing (multiple files in columns)
2149 = 3: tree style listing
Bram Moolenaaradc21822011-04-01 18:03:16 +02002150 *g:netrw_list_hide* comma separated pattern list for hiding files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002151 Patterns are regular expressions (see |regexp|)
2152 Example: let g:netrw_list_hide= '.*\.swp$'
2153 default: ""
2154
Bram Moolenaaradc21822011-04-01 18:03:16 +02002155 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002156 ="copy" Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002157 Copies marked files (|netrw-mf|) to target
2158 directory (|netrw-mt|, |netrw-mc|)
2159
Bram Moolenaaradc21822011-04-01 18:03:16 +02002160 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002161 ="move" Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002162 Moves marked files (|netrw-mf|) to target
2163 directory (|netrw-mt|, |netrw-mm|)
2164
Bram Moolenaaradc21822011-04-01 18:03:16 +02002165 *g:netrw_local_mkdir* command for making a local directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002166 default: "mkdir"
2167
Bram Moolenaaradc21822011-04-01 18:03:16 +02002168 *g:netrw_local_rmdir* remove directory command (rmdir)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002169 default: "rmdir"
2170
Bram Moolenaaradc21822011-04-01 18:03:16 +02002171 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
Bram Moolenaar446cb832008-06-24 21:56:24 +00002172 listings fit on 80 column displays.
2173 If your screen is wider, and you have file
2174 or directory names longer than 32 bytes,
2175 you may set this option to keep listings
2176 columnar.
2177
Bram Moolenaaradc21822011-04-01 18:03:16 +02002178 *g:netrw_mkdir_cmd* command for making a remote directory
Bram Moolenaar15146672011-10-20 22:22:38 +02002179 via ssh (also see |g:netrw_remote_mkdir|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002180 default: "ssh USEPORT HOSTNAME mkdir"
2181
Bram Moolenaar251e1912011-06-19 05:09:16 +02002182 *g:netrw_mousemaps* =1 (default) enables mouse buttons while
2183 browsing to:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002184 leftmouse : open file/directory
2185 shift-leftmouse : mark file
2186 middlemouse : same as P
2187 rightmouse : remove file/directory
2188 =0: disables mouse maps
2189
Bram Moolenaar15146672011-10-20 22:22:38 +02002190 *g:netrw_nobeval* doesn't exist (default)
2191 If this variable exists, then balloon
2192 evaluation will be suppressed
2193 (see |'ballooneval'|)
2194
2195 *g:netrw_remote_mkdir* command for making a local directory
2196 via ftp (also see |g:netrw_mkdir_cmd|)
2197 default: "mkdir"
2198
Bram Moolenaaradc21822011-04-01 18:03:16 +02002199 *g:netrw_retmap* if it exists and is set to one, then:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002200 * if in a netrw-selected file, AND
2201 * no normal-mode <2-leftmouse> mapping exists,
2202 then the <2-leftmouse> will be mapped for easy
Bram Moolenaar446cb832008-06-24 21:56:24 +00002203 return to the netrw browser window.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002204 example: click once to select and open a file,
2205 double-click to return.
2206
2207 Note that one may instead choose to:
2208 * let g:netrw_retmap= 1, AND
2209 * nmap <silent> YourChoice <Plug>NetrwReturn
2210 and have another mapping instead of
2211 <2-leftmouse> to invoke the return.
2212
2213 You may also use the |:Rexplore| command to do
2214 the same thing.
2215
Bram Moolenaar446cb832008-06-24 21:56:24 +00002216 default: =0
2217
Bram Moolenaaradc21822011-04-01 18:03:16 +02002218 *g:netrw_rm_cmd* command for removing files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002219 default: "ssh USEPORT HOSTNAME rm"
2220
Bram Moolenaaradc21822011-04-01 18:03:16 +02002221 *g:netrw_rmdir_cmd* command for removing directories
Bram Moolenaar446cb832008-06-24 21:56:24 +00002222 default: "ssh USEPORT HOSTNAME rmdir"
2223
Bram Moolenaaradc21822011-04-01 18:03:16 +02002224 *g:netrw_rmf_cmd* command for removing softlinks
Bram Moolenaar446cb832008-06-24 21:56:24 +00002225 default: "ssh USEPORT HOSTNAME rm -f"
2226
Bram Moolenaaradc21822011-04-01 18:03:16 +02002227 *g:netrw_sort_by* sort by "name", "time", or "size"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002228 default: "name"
2229
Bram Moolenaaradc21822011-04-01 18:03:16 +02002230 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002231 default: "normal"
2232
Bram Moolenaaradc21822011-04-01 18:03:16 +02002233 *g:netrw_sort_options* sorting is done using |:sort|; this
Bram Moolenaarc236c162008-07-13 17:41:49 +00002234 variable's value is appended to the
2235 sort command. Thus one may ignore case,
2236 for example, with the following in your
2237 .vimrc: >
2238 let g:netrw_sort_options="i"
2239< default: ""
2240
Bram Moolenaaradc21822011-04-01 18:03:16 +02002241 *g:netrw_sort_sequence* when sorting by name, first sort by the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002242 comma-separated pattern sequence. Note that
2243 the filigree added to indicate filetypes
2244 should be accounted for in your pattern.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002245 default: '[\/]$,*,\.bak$,\.o$,\.h$,
2246 \.info$,\.swp$,\.obj$'
2247
Bram Moolenaaradc21822011-04-01 18:03:16 +02002248 *g:netrw_special_syntax* If true, then certain files will be shown
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002249 in special syntax in the browser:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002250
2251 netrwBak : *.bak
2252 netrwCompress: *.gz *.bz2 *.Z *.zip
2253 netrwData : *.dat
2254 netrwHdr : *.h
2255 netrwLib : *.a *.so *.lib *.dll
2256 netrwMakefile: [mM]akefile *.mak
2257 netrwObj : *.o *.obj
2258 netrwTags : tags ANmenu ANtags
Bram Moolenaaradc21822011-04-01 18:03:16 +02002259 netrwTilde : *~
Bram Moolenaar446cb832008-06-24 21:56:24 +00002260 netrwTmp : tmp* *tmp
2261
2262 These syntax highlighting groups are linked
2263 to Folded or DiffChange by default
2264 (see |hl-Folded| and |hl-DiffChange|), but
2265 one may put lines like >
2266 hi link netrwCompress Visual
2267< into one's <.vimrc> to use one's own
2268 preferences.
2269
Bram Moolenaaradc21822011-04-01 18:03:16 +02002270 *g:netrw_ssh_cmd* One may specify an executable command
Bram Moolenaar446cb832008-06-24 21:56:24 +00002271 to use instead of ssh for remote actions
2272 such as listing, file removal, etc.
2273 default: ssh
2274
Bram Moolenaaradc21822011-04-01 18:03:16 +02002275 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002276 messages, banners, and whatnot that one doesn't
2277 want masquerading as "directories" and "files".
2278 Use this pattern to remove such embedded
2279 messages. By default its value is:
2280 '^total\s\+\d\+$'
2281
2282
Bram Moolenaaradc21822011-04-01 18:03:16 +02002283 *g:netrw_tmpfile_escape* =' &;'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002284 escape() is applied to all temporary files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002285 to escape these characters.
2286
Bram Moolenaaradc21822011-04-01 18:03:16 +02002287 *g:netrw_timefmt* specify format string to vim's strftime().
Bram Moolenaar446cb832008-06-24 21:56:24 +00002288 The default, "%c", is "the preferred date
2289 and time representation for the current
2290 locale" according to my manpage entry for
2291 strftime(); however, not all are satisfied
2292 with it. Some alternatives:
2293 "%a %d %b %Y %T",
2294 " %a %Y-%m-%d %I-%M-%S %p"
2295 default: "%c"
2296
Bram Moolenaaradc21822011-04-01 18:03:16 +02002297 *g:netrw_use_noswf* netrw normally avoids writing swapfiles
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002298 for browser buffers. However, under some
Bram Moolenaar446cb832008-06-24 21:56:24 +00002299 systems this apparently is causing nasty
2300 ml_get errors to appear; if you're getting
2301 ml_get errors, try putting
2302 let g:netrw_use_noswf= 0
2303 in your .vimrc.
2304
Bram Moolenaaradc21822011-04-01 18:03:16 +02002305 *g:netrw_winsize* specify initial size of new windows made with
Bram Moolenaar446cb832008-06-24 21:56:24 +00002306 "o" (see |netrw-o|), "v" (see |netrw-v|),
Bram Moolenaar251e1912011-06-19 05:09:16 +02002307 |:Hexplore| or |:Vexplore|. The g:netrw_winsize
2308 is an integer describing the percentage of the
2309 current netrw buffer's window to be used for
2310 the new window.
Bram Moolenaar15146672011-10-20 22:22:38 +02002311 If g:netrw_winsize is less than zero, then
2312 the absolute value of g:netrw_winsize lines
2313 or columns will be used for the new window.
Bram Moolenaar251e1912011-06-19 05:09:16 +02002314 default: 50 (for 50%)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002315
Bram Moolenaaradc21822011-04-01 18:03:16 +02002316 *g:netrw_xstrlen* Controls how netrw computes string lengths,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002317 including multi-byte characters' string
Bram Moolenaar446cb832008-06-24 21:56:24 +00002318 length. (thanks to N Weibull, T Mechelynck)
2319 =0: uses Vim's built-in strlen()
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002320 =1: number of codepoints (Latin a + combining
Bram Moolenaar446cb832008-06-24 21:56:24 +00002321 circumflex is two codepoints) (DEFAULT)
2322 =2: number of spacing codepoints (Latin a +
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002323 combining circumflex is one spacing
Bram Moolenaar446cb832008-06-24 21:56:24 +00002324 codepoint; a hard tab is one; wide and
2325 narrow CJK are one each; etc.)
2326 =3: virtual length (counting tabs as anything
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002327 between 1 and |'tabstop'|, wide CJK as 2
Bram Moolenaar446cb832008-06-24 21:56:24 +00002328 rather than 1, Arabic alif as zero when
2329 immediately preceded by lam, one
2330 otherwise, etc)
2331
Bram Moolenaaradc21822011-04-01 18:03:16 +02002332 *g:NetrwTopLvlMenu* This variable specifies the top level
Bram Moolenaar446cb832008-06-24 21:56:24 +00002333 menu name; by default, it's "Netrw.". If
2334 you wish to change this, do so in your
2335 .vimrc.
2336
2337NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2
2338
2339Netrw has been designed to handle user options by saving them, setting the
2340options to something that's compatible with netrw's needs, and then restoring
2341them. However, the autochdir option: >
2342 :set acd
2343is problematical. Autochdir sets the current directory to that containing the
2344file you edit; this apparently also applies to directories. In other words,
2345autochdir sets the current directory to that containing the "file" (even if
2346that "file" is itself a directory).
2347
Bram Moolenaar15146672011-10-20 22:22:38 +02002348NETRW SETTINGS WINDOW *netrw-settings-window* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002349
2350With the NetrwSettings.vim plugin, >
2351 :NetrwSettings
2352will bring up a window with the many variables that netrw uses for its
Bram Moolenaar1afcace2005-11-25 19:54:28 +00002353settings. You may change any of their values; when you save the file, the
2354settings therein will be used. One may also press "?" on any of the lines for
2355help on what each of the variables do.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002356
Bram Moolenaar446cb832008-06-24 21:56:24 +00002357(also see: |netrw-browser-var| |netrw-protocol| |netrw-var| |netrw-variables|)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002358
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002359
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00002360==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00002361OBTAINING A FILE *netrw-O* {{{2
2362
2363If there are no marked files:
2364
2365 When browsing a remote directory, one may obtain a file under the cursor
2366 (ie. get a copy on your local machine, but not edit it) by pressing the O
2367 key.
2368
2369If there are marked files:
2370
2371 The marked files will be obtained (ie. a copy will be transferred to your
2372 local machine, but not set up for editing).
2373
2374Only ftp and scp are supported for this operation (but since these two are
2375available for browsing, that shouldn't be a problem). The status bar will
2376then show, on its right hand side, a message like "Obtaining filename". The
2377statusline will be restored after the transfer is complete.
2378
2379Netrw can also "obtain" a file using the local browser. Netrw's display
2380of a directory is not necessarily the same as Vim's "current directory",
2381unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
2382a file using the local browser (by putting the cursor on it) and pressing
2383"O" will then "obtain" the file; ie. copy it to Vim's current directory.
2384
2385Related topics:
2386 * To see what the current directory is, use |:pwd|
2387 * To make the currently browsed directory the current directory, see |netrw-c|
2388 * To automatically make the currently browsed directory the current
2389 directory, see |g:netrw_keepdir|.
2390
Bram Moolenaaradc21822011-04-01 18:03:16 +02002391 *netrw-createfile*
Bram Moolenaarc236c162008-07-13 17:41:49 +00002392OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
2393
2394To open a file in netrw's current directory, press "%". This map will
2395query the user for a new filename; an empty file by that name will be
2396placed in the netrw's current directory (ie. b:netrw_curdir).
2397
2398
Bram Moolenaar446cb832008-06-24 21:56:24 +00002399PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2
2400
2401One may use a preview window by using the "p" key when the cursor is atop the
2402desired filename to be previewed. The display will then split to show both
2403the browser (where the cursor will remain) and the file (see |:pedit|).
2404By default, the split will be taken horizontally; one may use vertical
2405splitting if one has set |g:netrw_preview| first.
2406
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002407An interesting set of netrw settings is: >
2408
2409 let g:netrw_preview = 1
2410 let g:netrw_liststyle = 3
2411 let g:netrw_winsize = 30
2412
2413These will:
2414 1. Make vertical splitting the default for previewing files
2415 2. Make the default listing style "tree"
2416 3. When a vertical preview window is opened, the directory listing
2417 will use only 30 columns; the rest of the window is used for the
2418 preview window.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002419
2420PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
2421
2422To edit a file or directory in the previously used (last accessed) window (see
2423:he |CTRL-W_p|), press a "P". If there's only one window, then the one window
Bram Moolenaar15146672011-10-20 22:22:38 +02002424will be horizontally split (by default).
Bram Moolenaar446cb832008-06-24 21:56:24 +00002425
2426If there's more than one window, the previous window will be re-used on
2427the selected file/directory. If the previous window's associated buffer
2428has been modified, and there's only one window with that buffer, then
2429the user will be asked if s/he wishes to save the buffer first (yes,
2430no, or cancel).
2431
Bram Moolenaar15146672011-10-20 22:22:38 +02002432Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-T| |netrw-v|
2433Associated setting variables:
2434 |g:netrw_alto| control above/below splitting
2435 |g:netrw_altv| control right/left splitting
2436 |g:netrw_preview| control horizontal vs vertical splitting
2437 |g:netrw_winsize| control initial sizing
2438
Bram Moolenaar446cb832008-06-24 21:56:24 +00002439
2440REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2
2441
2442To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
2443hit the <cr> when atop the ./ directory entry in the listing. One may also
2444refresh a local directory by using ":e .".
2445
2446
2447RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2
2448
2449If there are no marked files: (see |netrw-mf|)
2450
2451 Renaming/moving files and directories involves moving the cursor to the
2452 file/directory to be moved (renamed) and pressing "R". You will then be
2453 queried for where you want the file/directory to be moved. You may select
2454 a range of lines with the "V" command (visual selection), and then
2455 pressing "R".
2456
2457If there are marked files: (see |netrw-mf|)
2458
2459 Marked files will be renamed (moved). You will be queried as above in
2460 order to specify where you want the file/directory to be moved.
2461
2462 WARNING:~
2463
2464 Note that moving files is a dangerous operation; copies are safer. That's
2465 because a "move" for remote files is actually a copy + delete -- and if
2466 the copy fails and the delete does not, you may lose the file.
2467
2468The g:netrw_rename_cmd variable is used to implement renaming. By default its
2469value is:
2470
2471 ssh HOSTNAME mv
2472
2473One may rename a block of files and directories by selecting them with
2474the V (|linewise-visual|).
2475
2476
2477REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2
2478
2479One may toggle between normal and reverse sorting order by pressing the
2480"r" key.
2481
2482Related topics: |netrw-s|
2483Associated setting variable: |g:netrw_sort_direction|
2484
2485
2486SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
2487
2488One may select the sorting style by name, time, or (file) size. The "s" map
2489allows one to circulate amongst the three choices; the directory listing will
2490automatically be refreshed to reflect the selected style.
2491
2492Related topics: |netrw-r| |netrw-S|
2493Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
2494
2495
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002496SETTING EDITING WINDOW *netrw-C* {{{2
2497
2498One may select a netrw window for editing with the "C" mapping, or by setting
2499g:netrw_chgwin to the selected window number. Subsequent selection of a file
2500to edit (|netrw-cr|) will use that window.
2501
2502Related topics: |netrw-cr|
2503Associated setting variables: |g:netrw_chgwin|
2504
2505
Bram Moolenaar446cb832008-06-24 21:56:24 +0000250610. Problems and Fixes *netrw-problems* {{{1
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002507
2508 (This section is likely to grow as I get feedback)
2509 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00002510 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002511 P1. I use windows 95, and my ftp dumps four blank lines at the
2512 end of every read.
2513
2514 See |netrw-fixup|, and put the following into your
2515 <.vimrc> file:
2516
2517 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002518
Bram Moolenaar488c6512005-08-11 20:09:58 +00002519 *netrw-p2*
Bram Moolenaar9964e462007-05-05 17:54:07 +00002520 P2. I use Windows, and my network browsing with ftp doesn't sort by
2521 time or size! -or- The remote system is a Windows server; why
2522 don't I get sorts by time or size?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002523
2524 Windows' ftp has a minimal support for ls (ie. it doesn't
2525 accept sorting options). It doesn't support the -F which
2526 gives an explanatory character (ABC/ for "ABC is a directory").
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002527 Netrw then uses "dir" to get both its thin and long listings.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002528 If you think your ftp does support a full-up ls, put the
2529 following into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002530
Bram Moolenaar9964e462007-05-05 17:54:07 +00002531 let g:netrw_ftp_list_cmd = "ls -lF"
2532 let g:netrw_ftp_timelist_cmd= "ls -tlF"
2533 let g:netrw_ftp_sizelist_cmd= "ls -slF"
2534<
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002535 Alternatively, if you have cygwin on your Windows box, put
Bram Moolenaar9964e462007-05-05 17:54:07 +00002536 into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002537
2538 let g:netrw_cygwin= 1
Bram Moolenaar9964e462007-05-05 17:54:07 +00002539<
2540 This problem also occurs when the remote system is Windows.
2541 In this situation, the various g:netrw_ftp_[time|size]list_cmds
2542 are as shown above, but the remote system will not correctly
2543 modify its listing behavior.
2544
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002545
Bram Moolenaar488c6512005-08-11 20:09:58 +00002546 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002547 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
2548 used ssh! That wasn't what I asked for...
2549
2550 Netrw has two methods for browsing remote directories: ssh
2551 and ftp. Unless you specify ftp specifically, ssh is used.
2552 When it comes time to do download a file (not just a directory
2553 listing), netrw will use the given protocol to do so.
2554
Bram Moolenaar488c6512005-08-11 20:09:58 +00002555 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002556 P4. I would like long listings to be the default.
2557
Bram Moolenaar446cb832008-06-24 21:56:24 +00002558 Put the following statement into your |.vimrc|: >
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002559
Bram Moolenaar446cb832008-06-24 21:56:24 +00002560 let g:netrw_liststyle= 1
2561<
2562 Check out |netrw-browser-var| for more customizations that
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002563 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002564
Bram Moolenaar488c6512005-08-11 20:09:58 +00002565 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002566 P5. My times come up oddly in local browsing
2567
2568 Does your system's strftime() accept the "%c" to yield dates
2569 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
2570 and find out what option should be used. Then put it into
Bram Moolenaar446cb832008-06-24 21:56:24 +00002571 your |.vimrc|: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002572
Bram Moolenaar446cb832008-06-24 21:56:24 +00002573 let g:netrw_timefmt= "%X" (where X is the option)
2574<
Bram Moolenaar488c6512005-08-11 20:09:58 +00002575 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002576 P6. I want my current directory to track my browsing.
2577 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002578
Bram Moolenaar446cb832008-06-24 21:56:24 +00002579 Put the following line in your |.vimrc|:
2580>
Bram Moolenaar433f7c82006-03-21 21:29:36 +00002581 let g:netrw_keepdir= 0
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002582<
Bram Moolenaar9964e462007-05-05 17:54:07 +00002583 *netrw-p7*
2584 P7. I use Chinese (or other non-ascii) characters in my filenames, and
2585 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002586
Bram Moolenaar9964e462007-05-05 17:54:07 +00002587 (taken from an answer provided by Wu Yongwei on the vim
2588 mailing list)
2589 I now see the problem. You code page is not 936, right? Vim
2590 seems only able to open files with names that are valid in the
2591 current code page, as are many other applications that do not
2592 use the Unicode version of Windows APIs. This is an OS-related
2593 issue. You should not have such problems when the system
2594 locale uses UTF-8, such as modern Linux distros.
2595
2596 (...it is one more reason to recommend that people use utf-8!)
2597
2598 *netrw-p8*
2599 P8. I'm getting "ssh is not executable on your system" -- what do I
2600 do?
2601
2602 (Dudley Fox) Most people I know use putty for windows ssh. It
2603 is a free ssh/telnet application. You can read more about it
2604 here:
2605
2606 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also:
2607
2608 (Marlin Unruh) This program also works for me. It's a single
2609 executable, so he/she can copy it into the Windows\System32
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002610 folder and create a shortcut to it.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002611
2612 (Dudley Fox) You might also wish to consider plink, as it
2613 sounds most similar to what you are looking for. plink is an
2614 application in the putty suite.
2615
2616 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink
2617
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002618 (Vissale Neang) Maybe you can try OpenSSH for windows, which
Bram Moolenaar9964e462007-05-05 17:54:07 +00002619 can be obtained from:
2620
2621 http://sshwindows.sourceforge.net/
2622
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002623 It doesn't need the full Cygwin package.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002624
2625 (Antoine Mechelynck) For individual Unix-like programs needed
2626 for work in a native-Windows environment, I recommend getting
2627 them from the GnuWin32 project on sourceforge if it has them:
2628
2629 http://gnuwin32.sourceforge.net/
2630
2631 Unlike Cygwin, which sets up a Unix-like virtual machine on
2632 top of Windows, GnuWin32 is a rewrite of Unix utilities with
2633 Windows system calls, and its programs works quite well in the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002634 cmd.exe "Dos box".
Bram Moolenaar9964e462007-05-05 17:54:07 +00002635
2636 (dave) Download WinSCP and use that to connect to the server.
2637 In Preferences > Editors, set gvim as your editor:
2638
2639 - Click "Add..."
2640 - Set External Editor (adjust path as needed, include
2641 the quotes and !.! at the end):
2642 "c:\Program Files\Vim\vim70\gvim.exe" !.!
2643 - Check that the filetype in the box below is
2644 {asterisk}.{asterisk} (all files), or whatever types
2645 you want (cec: change {asterisk} to * ; I had to
2646 write it that way because otherwise the helptags
Bram Moolenaar446cb832008-06-24 21:56:24 +00002647 system thinks it's a tag)
2648 - Make sure it's at the top of the listbox (click it,
2649 then click "Up" if it's not)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002650 If using the Norton Commander style, you just have to hit <F4>
2651 to edit a file in a local copy of gvim.
2652
2653 (Vit Gottwald) How to generate public/private key and save
2654 public key it on server: >
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002655 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready
2656 (8.3 Getting ready for public key authentication)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002657<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002658 How to use a private key with 'pscp': >
2659
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002660 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html
2661 (5.2.4 Using public key authentication with PSCP)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002662<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002663 (Ben Schmidt) I find the ssh included with cwRsync is
2664 brilliant, and install cwRsync or cwRsyncServer on most
2665 Windows systems I come across these days. I guess COPSSH,
2666 packed by the same person, is probably even better for use as
2667 just ssh on Windows, and probably includes sftp, etc. which I
2668 suspect the cwRsync doesn't, though it might
2669
Bram Moolenaar9964e462007-05-05 17:54:07 +00002670 (cec) To make proper use of these suggestions above, you will
2671 need to modify the following user-settable variables in your
2672 .vimrc:
2673
Bram Moolenaar446cb832008-06-24 21:56:24 +00002674 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd|
2675 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
Bram Moolenaar9964e462007-05-05 17:54:07 +00002676
2677 The first one (|g:netrw_ssh_cmd|) is the most important; most
2678 of the others will use the string in g:netrw_ssh_cmd by
2679 default.
2680 *netrw-p9* *netrw-ml_get*
2681 P9. I'm browsing, changing directory, and bang! ml_get errors
2682 appear and I have to kill vim. Any way around this?
2683
2684 Normally netrw attempts to avoid writing swapfiles for
2685 its temporary directory buffers. However, on some systems
2686 this attempt appears to be causing ml_get errors to
2687 appear. Please try setting |g:netrw_use_noswf| to 0
2688 in your <.vimrc>: >
2689 let g:netrw_use_noswf= 0
2690<
Bram Moolenaar446cb832008-06-24 21:56:24 +00002691 *netrw-p10*
2692 P10. I'm being pestered with "[something] is a directory" and
2693 "Press ENTER or type command to continue" prompts...
2694
2695 The "[something] is a directory" prompt is issued by Vim,
2696 not by netrw, and there appears to be no way to work around
2697 it. Coupled with the default cmdheight of 1, this message
2698 causes the "Press ENTER..." prompt. So: read |hit-enter|;
2699 I also suggest that you set your |'cmdheight'| to 2 (or more) in
2700 your <.vimrc> file.
2701
2702 *netrw-p11*
2703 P11. I want to have two windows; a thin one on the left and my editing
Bram Moolenaar251e1912011-06-19 05:09:16 +02002704 window on the right. How may I accomplish this?
Bram Moolenaar446cb832008-06-24 21:56:24 +00002705
2706 * Put the following line in your <.vimrc>:
2707 let g:netrw_altv = 1
2708 * Edit the current directory: :e .
2709 * Select some file, press v
2710 * Resize the windows as you wish (see |CTRL-W_<| and
2711 |CTRL-W_>|). If you're using gvim, you can drag
2712 the separating bar with your mouse.
2713 * When you want a new file, use ctrl-w h to go back to the
2714 netrw browser, select a file, then press P (see |CTRL-W_h|
2715 and |netrw-P|). If you're using gvim, you can press
2716 <leftmouse> in the browser window and then press the
2717 <middlemouse> to select the file.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002718
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002719 *netrw-p12*
2720 P12. My directory isn't sorting correctly, or unwanted letters are
2721 appearing in the listed filenames, or things aren't lining
2722 up properly in the wide listing, ...
2723
2724 This may be due to an encoding problem. I myself usually use
2725 utf-8, but really only use ascii (ie. bytes from 32-126).
2726 Multibyte encodings use two (or more) bytes per character.
2727 You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
2728
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002729 *netrw-p13*
2730 P13. I'm a Windows + putty + ssh user, and when I attempt to browse,
2731 the directories are missing trailing "/"s so netrw treats them
2732 as file transfers instead of as attempts to browse
2733 subdirectories. How may I fix this?
2734
2735 (mikeyao) If you want to use vim via ssh and putty under Windows,
2736 try combining the use of pscp/psftp with plink. pscp/psftp will
2737 be used to connect and plink will be used to execute commands on
2738 the server, for example: list files and directory using 'ls'.
2739
2740 These are the settings I use to do this:
2741>
2742 " list files, it's the key setting, if you haven't set,
2743 " you will get a blank buffer
2744 let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"
2745 " if you haven't add putty directory in system path, you should
2746 " specify scp/sftp command. For examples:
2747 "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
2748 "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
2749<
Bram Moolenaar251e1912011-06-19 05:09:16 +02002750 *netrw-p14*
2751 P14. I'd would like to speed up writes using Nwrite and scp/ssh
2752 style connections. How? (Thomer M. Gil)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002753
Bram Moolenaar251e1912011-06-19 05:09:16 +02002754 Try using ssh's ControlMaster and ControlPath (see the ssh_config
2755 man page) to share multiple ssh connections over a single network
2756 connection. That cuts out the cryptographic handshake on each
2757 file write, sometimes speeding it up by an order of magnitude.
2758 (see http://thomer.com/howtos/netrw_ssh.html)
2759 (included by permission)
2760
2761 Add the following to your ~/.ssh/config: >
2762
2763 # you change "*" to the hostname you care about
2764 Host *
2765 ControlMaster auto
2766 ControlPath /tmp/%r@%h:%p
2767
2768< Then create an ssh connection to the host and leave it running: >
2769
2770 ssh -N host.domain.com
2771
2772< Now remotely open a file with Vim's Netrw and enjoy the
2773 zippiness: >
2774
2775 vim scp://host.domain.com//home/user/.bashrc
2776<
2777 *netrw-p15*
2778 P15. How may I use a double-click instead of netrw's usual single click
2779 to open a file or directory? (Ben Fritz)
2780
2781 First, disable netrw's mapping with >
2782 let g:netrw_mousemaps= 0
2783< and then create a netrw buffer only mapping in
2784 $HOME/.vim/after/ftplugin/netrw.vim: >
2785 nmap <buffer> <2-leftmouse> <CR>
2786< Note that setting g:netrw_mousemaps to zero will turn off
2787 all netrw's mouse mappings, not just the <leftmouse> one.
2788 (see |g:netrw_mousemaps|)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002789
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002790==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000279111. Debugging Netrw Itself *netrw-debug* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00002792
Bram Moolenaaradc21822011-04-01 18:03:16 +02002793The <netrw.vim> script is typically available as something like:
Bram Moolenaar488c6512005-08-11 20:09:58 +00002794>
Bram Moolenaar446cb832008-06-24 21:56:24 +00002795 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
2796 /usr/local/share/vim/vim7x/autoload/netrw.vim
Bram Moolenaaradc21822011-04-01 18:03:16 +02002797< -or- >
2798 /usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
2799 /usr/local/share/vim/vim6x/autoload/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00002800<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002801which is loaded automatically at startup (assuming :set nocp).
2802
2803 1. Get the <Decho.vim> script, available as:
2804
Bram Moolenaar446cb832008-06-24 21:56:24 +00002805 http://mysite.verizon.net/astronaut/vim/index.html#DECHO
Bram Moolenaar071d4272004-06-13 20:20:40 +00002806 or
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00002807 http://vim.sourceforge.net/scripts/script.php?script_id=120
Bram Moolenaar071d4272004-06-13 20:20:40 +00002808
Bram Moolenaar446cb832008-06-24 21:56:24 +00002809 It now comes as a "vimball"; if you're using vim 7.0 or earlier,
2810 you'll need to update vimball, too. See
2811 http://mysite.verizon.net/astronaut/vim/index.html#VIMBALL
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002812
Bram Moolenaar446cb832008-06-24 21:56:24 +00002813 2. Edit the <netrw.vim> file by typing: >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002814
2815 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00002816 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002817 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00002818<
2819 To restore to normal non-debugging behavior, re-edit <netrw.vim>
2820 and type >
Bram Moolenaar071d4272004-06-13 20:20:40 +00002821
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002822 vim netrw.vim
2823 :DechoOff
2824 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00002825<
Bram Moolenaard4755bb2004-09-02 19:12:26 +00002826 This command, provided by <Decho.vim>, will comment out all
2827 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
2828
Bram Moolenaar446cb832008-06-24 21:56:24 +00002829 3. Then bring up vim and attempt to evoke the problem by doing a
2830 transfer or doing some browsing. A set of messages should appear
2831 concerning the steps that <netrw.vim> took in attempting to
2832 read/write your file over the network in a separate tab.
Bram Moolenaar071d4272004-06-13 20:20:40 +00002833
Bram Moolenaar9964e462007-05-05 17:54:07 +00002834 To save the file, use >
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002835 :tabnext
Bram Moolenaar9964e462007-05-05 17:54:07 +00002836 :set bt=
2837 :w! DBG
2838< Please send that information to <netrw.vim>'s maintainer, >
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00002839 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar9964e462007-05-05 17:54:07 +00002840<
Bram Moolenaar071d4272004-06-13 20:20:40 +00002841==============================================================================
Bram Moolenaar9964e462007-05-05 17:54:07 +0000284212. History *netrw-history* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00002843
Bram Moolenaar15146672011-10-20 22:22:38 +02002844 v143: Jun 01, 2011 * |g:netrw_winsize| will accept a negative
2845 number; the absolute value of it will then
2846 be used to specify lines/columns instead of
2847 a percentage.
2848 Jul 05, 2011 * the "d" map now supports mkdir via ftp
2849 See |netrw-d| and |g:netrw_remote_mkdir|
2850 Jul 11, 2011 * Changed Explore!, Sexplore!, and Vexplore
2851 to use a percentage of |winwidth()| instead
2852 of a percentage of |winheight()|.
2853 Jul 11, 2011 * included support for https://... I'm just
2854 beginning to test this, however.
2855 Aug 01, 2011 * changed RestoreOptions to also restore
2856 cursor position in netrw buffers.
2857 Aug 12, 2011 * added a note about "%" to the balloon
2858 Aug 30, 2011 * if |g:netrw_nobeval| exists, then balloon
2859 evaluation is suppressed.
2860 Aug 31, 2011 * (Benjamin R Haskell) provided a patch that
2861 implements non-standard port handling for
2862 files opened via the remote browser.
2863 Aug 31, 2011 * Fixed a **//pattern Explorer bug
2864 Sep 15, 2011 * (reported by Francesco Campana) netrw
2865 now permits the "@" to be part of the
2866 user id (if there's an @ that appears
2867 to the right).
Bram Moolenaar251e1912011-06-19 05:09:16 +02002868 v142: Apr 06, 2011 * I modified NetrwRemoteListing() to use
2869 shellescape(fnameescape(s:path),1) for
2870 the benefit of those using scp://.../
2871 with subdirectories having spaces.
2872 Problem reported by: Gilles Charron
2873 Apr 18, 2011 * s:NetrwMethod() attempts to issue an
2874 error message when given a malformed url
2875 Apr 29, 2011 * converted most mousemaps to use <Plug>s
2876 * |g:netrw_winsize|'s meaning changed
Bram Moolenaaradc21822011-04-01 18:03:16 +02002877 v141: Aug 28, 2010 * added -s:... support for Windows ftp
2878 * restored 2-leftmouse for :Rex-like return
2879 * added balloon help for banner
2880 Oct 26, 2010 * :Texplore changed to start from netrw's idea
2881 of the current directory, not pwd's
2882 Feb 10, 2011 * netrwPlugin modified to use BufReadCmd
2883 when the "filename" ends with a "/" or a "\"
2884 Avoids "... is a directory" message, works
2885 inside a try-catch-endtry clause.
2886 Feb 22, 2011 * for menus, &go =~# used to insure correct case
Bram Moolenaar251e1912011-06-19 05:09:16 +02002887 Apr 01, 2011 * changed g:netrw_cursorcolumn to g:netrw_cursor
2888 In addition, there's more supported settings for
2889 it.
Bram Moolenaar477db062010-07-28 18:17:41 +02002890 v140: Jul 27, 2010 * (Lech Lorens) unexpected change of window
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002891 v139: May 14, 2010 * when viewing remote directory listings and
2892 changing listing style, going to tree listing
2893 mode was issuing two rather useless messages
2894 about the buffer name. They have now been
2895 silenced.
2896 * (Jean Johner) with "behave mswin", clicking
2897 on a filename in wide mode opened a new file
2898 with a missing first letter
2899 * (Britton Kerin) wanted netrw listings to be
2900 buflisted; the |g:netrw_bufsettings| option
2901 permits that.
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002902 Jun 18, 2010 * (Jan Steffens) added support for xz compression
2903 Jun 23, 2010 * vimdiff dir1 dir2 now works
Bram Moolenaar477db062010-07-28 18:17:41 +02002904 Jul 27, 2010 * (John Orr) pointed out that the intended maparg
2905 test for gx was actually testing for g rather
2906 than gx. Fixed.
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002907 v138: May 01, 2010 * added the bomb setting to the Save-Set-Restore
2908 option handling (for Tony M)
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02002909 May 14, 2010 * (Bram Moolenaar) netrw optionally sets cursorline
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002910 (and sometimes cursorcolumn) for its display.
2911 This option setting was leaking through with
2912 remote file handling.
2913 v137: Dec 28, 2009 * modified the preview window handling for
2914 vertically split windows. The preview
2915 window will take up all but g:netrw_winsize
Bram Moolenaaradc21822011-04-01 18:03:16 +02002916 columns of the original window; those
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002917 g:netrw_winsize columns will be used for
2918 the netrw listing.
2919 * (Simon Dambe) removed "~" from
2920 |g:netrw_glob_escape| under Windows
2921 * (Bram Moolenaar) modified test for status bar
2922 click with leftmouse. Moved code to
2923 s:NetrwLeftmouse().
2924 Feb 24, 2010 * (for Jean Johner) added insert-mode maps; one
2925 can get into insert mode with netrw via
2926 ctrl-o :e .
2927 Mar 15, 2010 * (Dominique Pellé) Directory with backslashes such
2928 as foo\bar were not being entered/left properly
2929 Mar 15, 2010 * Using :Explore .. and causing two FocusGained
2930 events caused the directory to change. Fixed.
2931 Mar 22, 2010 * Last fix caused problems for *//pat and */filepat
2932 searches.
2933 Mar 30, 2010 * With :set hidden and changing listing styles 8
2934 times, the tree listing buffer was being marked
2935 as modified upon exit. Fixed.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002936 v136: Jan 14, 2009 * extended |g:Netrw_funcref| to also handle lists
2937 of function references
2938 Jan 14, 2009 * (reported by Marvin Renich) with spell check
2939 enabled, some filenamess will still being
2940 displayed as spelling errors.
2941 Apr 13, 2009 * (Björn Winckler) writing a file using
2942 remote scp caused syntax highlighting problem.
2943 Solution: avoid syntax/syntax.vim's
2944 au Filetype * syntax setting autocommand by
2945 checking that the current buffer has the
2946 netrw filetype before attempting a doau
2947 in s:NetrwSafeOptions().
2948 Apr 14, 2009 * (asgeo1) suggested the "T" map (|netrw-T|)
2949 Apr 14, 2009 * marking wasn't working on executable and
2950 other special filenames
2951 Apr 20, 2009 * (Dennis Benzinger) files opened via http have
2952 their syntax filetype auto-detected
2953 Jun 19, 2009 * (Yukihiro Nakadaira) help document improvements
2954 Jul 22, 2009 * g:netrw_browse_split will honor the
2955 |'equalalways'| setting.
2956 Jul 29, 2009 * implemented "I" mapping to toggle banner
2957 (this is experimental and still being debugged)
2958 Sep 19, 2009 * (Mike McEwan) writes via ftp now send both
2959 g:netrw_ftpmode and g:netrw_ftpextracmd (if the
2960 latter exists)
2961 Dec 02, 2009 * netrw uses vimgrep several places; it now uses
2962 "noautocmd vimgrep" (should be speedier).
2963 Dec 03, 2009 * changed back to using -source instead of -dump
2964 for elinks-using commands. (requested by James
2965 Vega and Karsten Hopp)
2966 v135: Oct 29, 2008 * using |simplify()| on directory names
2967 (supporting handling ".."s in directory names)
2968 Oct 31, 2008 * added special file highlighting for core dumps
2969 under Unix/Linux. The default sorting sequence
2970 now also gives core dumps priority.
2971 Nov 10, 2008 * uses a call to netrw#Nread() instead of Nread
2972 to avoid having to use fnameescape()
2973 * fixed a tree redrawing problem (open directory,
2974 open subdir, close subdir, close dir)
2975 Nov 19, 2008 * sprinkled some histdel("/",-1)s through the code
2976 in an attempt to prevent netrw from changing
2977 the search history.
2978 Jan 02, 2009 * |g:Netrw_funcref| included
2979 Jan 05, 2009 * Explore */ **/ *// **// all clear explorer
2980 variables
2981 Jan 05, 2009 * (Panagiotis Louridas) extended s:WinPath()
2982 to remove cygdrive from non-cygwin Windows
2983 paths. Improved the determination as to
2984 whether or not to do so.
2985 Jan 13, 2009 * included contains=@NoSpell in every syntax
2986 group for syntax/netrw.vim .
2987 v134: Sep 30, 2008 * (Sander Marechal) provided a bugfix involving
2988 the use of the |netrw-t| command with a remote
2989 directory.
2990 Sep 30, 2008 * using "x" on a remote jpg was failing; fixed.
2991 Oct 03, 2008 * bookmarks now go on a list and are stored to
2992 the first directory on the |'runtimepath'| in
2993 the hopes of making their retention reliable.
2994 History now also goes to that directory.
2995 Oct 07, 2008 * Included check that vim 7.0 or later is in use.
2996 Oct 07, 2008 * Improved |g:netrw_retmap| handling.
2997 Oct 12, 2008 * Based upon Sébastien Migniot's suggestion, if
2998 cadaver isn't available then netrw will try to
2999 use curl for the dav://... protocol.
3000 Oct 13, 2008 * added @*/ to netrw buffers' |'iskeyword'|setting
3001 This lets mf (|netrw-mf|) mark directories, links
3002 and executables.
3003 Oct 13, 2008 * avoids a second NetrwBrowse() refresh when
3004 g:netrw_fastbrowse is <= 1 (slow, medium speed)
3005 Oct 22, 2008 * |g:netrw_http_xcmd| may now be overridden
3006 independently of |g:netrw_http_cmd|.
3007 Oct 23, 2008 * [N] added to the various Explore commands to
3008 let users specify the width/height of new
3009 explorer windows, overriding |g:netrw_winsize|.
3010 v133: Aug 10, 2008 * NetReadFixup() for win95 was missing some "a:"s
3011 Aug 12, 2008 * (Jan Minář) an error condition in NetrwMethod()
3012 wasn't being used, resulting in "b:netrw_fname
3013 undefined" errors
3014 Aug 12, 2008 * (François Ingeirest) asked that "hi link" be
3015 changed to hi default link in the netrw syntax
3016 files.
3017 Aug 12, 2008 * using s:NetrwUnmarkList() more often. Filenames
3018 were being left on the global list when removed
3019 from the buffer-local lists.
3020 Aug 14, 2008 * (Joshua Clayton) an errant extra ")" was left in
3021 the rcp-handling portion of NetRead().
3022 Sep 03, 2008 * added |'cursorline'| highlighting to thin, long,
3023 and tree displays.
Bram Moolenaared39e1d2008-08-09 17:55:22 +00003024 v132: Aug 06, 2008 * Fixed marked file-based obtain
3025 Aug 08, 2008 * sourcing a file via ftp from a netrw-generated
3026 buffer (or any buffer with |'nobl'|) left an
3027 empty no-name buffer in its wake. Fixed.
Bram Moolenaare37d50a2008-08-06 17:06:04 +00003028 v130: Jul 31, 2008 * trying out elinks/links for http://host/
3029 requests. One problem: in-page links
3030 (such as with ...#LABEL) are not supported
3031 * verified that Bram's modified netrwPlugin works
3032 Aug 01, 2008 * fixed a bug: when sourcing a file via ftp, the
3033 "filter window" was left behind.
3034 v129: Jul 31, 2008 * bug found in non-mouse enabled vim and some
3035 local maps
3036 v128: Jul 30, 2008 * much work done in using shellescape() and
3037 fnameescape()
Bram Moolenaarc236c162008-07-13 17:41:49 +00003038 v126: Jun 30, 2008 * after having gone to a remote directory,
3039 <f1> was no longer taking one to the correct
3040 entry in the help (|netrw-quickhelp|). Fixed.
3041 Jul 01, 2008 * extracting the last filename from a wide listing
3042 missed the last letter when |'virtualedit'| not
3043 enabled.
3044 Jul 01, 2008 * vim foo/bar was creating [Scratch] buffers,
3045 where bar was also a directory
3046 Jul 01, 2008 * numerous additional changes were made to netrw
3047 to use fnameescape() and shellescape() instead
3048 of escape(). Not all changes have been tested
3049 as yet...
3050 Jul 01, 2008 * (James Vega reported) some problems with
3051 :NetrwSettings (due to no longer used setting
3052 variables).
3053 Jul 07, 2008 * Additional numerous changes to support security;
3054 shellescape(arg,1), etc.
Bram Moolenaar446cb832008-06-24 21:56:24 +00003055 v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he
3056 noted that gx was failing since its call to
3057 netrw#NetBrowseX() wasn't updated to
3058 netrw#NetrwBrowseX().
3059 * (Stanis Trendelenburg) ST provides a patch to
3060 supports davs: (dav + ssl)
3061 * (Rick Choi) noted that directory names comprised
3062 of three digits were not being displayed by
3063 the internal browser. Fixed.
3064 * (Erik Falor) provided a patch to handle problems
3065 with changing directory and |'acd'| option.
3066 * (James Vega, Teemu Likonen) noted that netrw
3067 wasn't handling multi-byte filenames/directories
3068 correctly. Fixed.
3069 * (Rick) found problem with g:netrw_maxfilenamelen
3070 being overridden.
3071 * (James Vega) pointed out that netrw was
3072 misidentifying all files in a symbolically linked
3073 directory as being symbolically linked
3074 themselves. This particular problem was fixed;
3075 however, there are now situations where
3076 symbolically linked files will not be detected.
3077 Really need an internal vim function to do this
3078 identification.
3079 Apr 17, 2008 * When g:netrw_keepdir==0, current directory
3080 doesn't necessarily equal b:netrw_curdir
3081 initially. Problem is due to the patch directly
3082 above.
3083 * Fixed qf to handle case where b:netrw_curdir
3084 isn't the same as the current directory under
3085 linux/macosx.
3086 * New: |netrw-mg| (apply vimgrep to marked files)
3087 May 05, 2008 * (Rick) pointed out that a "setlocal ts=32" was
3088 interfering with g:netrw_maxfilenamelen
3089 May 05, 2008 * (James Vega) a file inside a linked directory
3090 was showing up as a symbolic link itself.
3091 May 22, 2008 * symbolic links, fifos, and sockets are now
3092 indicated by a trailing @, |, or =, respectively.
3093 Jun 06, 2008 * Removed numerous bugs from the marked file
3094 move and copy. Tested these changes under
3095 Unix only thus far.
3096 * :Rexplore returns to the screen position in the
3097 netrw listing from whence the file was edited
3098 v124: Apr 02, 2008 * (Adrian Rollett) change the line supporting the
3099 "x" action for mac to use g:netrw_shq
3100 v123: Feb 27, 2008 * Marked files now keeps a "global" marked file
3101 list. The global marked file list is used to
3102 support tag processing and vimdiff'ing
3103 (|netrw-md| |netrw-mt|)
3104 * Been insuring that mm and mc works with various
3105 combinations of local and remote directories
3106 * (Stefan Bittner) http://.../ should always have
3107 filetype "html" -- fixed.
3108 * (Stefan Bittner) a "?" in a http://.../ request
3109 wasn't being handled correctly. Fixed by
3110 removing ? from default |g:netrw_tmpfile_escape|.
3111 * (Nico Weber) % codes in http://.../ requests
3112 weren't being handled correctly. Fixed by
3113 including % in default |g:netrw_fname_escape|.
3114 * (Stefan Bittner) attempts to update Buffers.Refresh
3115 were failing because locale use changed the menu
3116 names. I implemented a workaround.
3117 v122: Feb 12, 2008 * bugfix - first sorting sequence match now has
3118 priority
3119 Feb 14, 2008 * bugfix - sorting sequence was effectively ignoring
3120 sequencing priority of anything following '*'
3121 * toggling a marked file was showing incorrect list
3122 (list was correct, but displayed matches weren't)
3123 * |g:netrw_special_syntax| implemented
3124 v121: Feb 11, 2008 * Bram M reported that :e file ... :e . would not
3125 retain the alternate file. Fixed -- I hope!
3126 * bugfix -- apparently v120 broke an explicit
3127 :Explore dirname
3128 v120: Jan 21, 2008 * |netrw-mt| changed to allow for target selection
3129 based on whether or not word under cursor is a
3130 directory or file, or if cursor is in banner
3131 area.
3132 * |netrw-mh| included (hiding by marked-file suffix)
3133 * functions moved about a bit (improved
3134 categorization)
3135 * executable files now displayed with trailing (*)
3136 * symbolically linked files now displayed with
3137 trailing (@)
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003138 * Somewhen, s:NetrwMarkFileMove() got damaged. It
3139 * is now restored (missing an endif, for example).
Bram Moolenaar446cb832008-06-24 21:56:24 +00003140 * |netrw-mu| implemented (unmarking marked files)
3141 * many bugs have been removed from the marked file
3142 system (tnx to Mark S. for feedback)
3143 * |netrw-ms| implemented (sourcing marked files)
3144 * fixed use of P with tree listing style
3145 * multiple tree listing now supported
3146 * ./ suppressed
3147 * changed q -> qb (query bookmarks)
3148 * implemented |netrw-qf|
3149 * Explore now has four special list-generation
3150 modes: */filepat **/filepat
3151 *//pattern **//pattern
3152 * gh (|netrw-gh|) is a shortcut for toggling the
3153 hiding of files and directories beginning with a
3154 dot
3155 v119: Jan 10, 2008 * When g:netrw_keepdir is false,
3156 NetrwOptionsRestore() had a problem
3157 (Bill McCarthy)
3158 Jan 11, 2008 * Netrw now shows symbolic links with a trailing
3159 "@" and special highlighting.
3160 Jan 15, 2008 * Changed g:netrw_noretmap -> |g:netrw_retmap|.
3161 Changed: disabled by default at Bram's
3162 preference.
3163 v118: Jan 02, 2008 * Fixed a problem with Windows;
3164 :Explore c:/path/ would not work,
3165 but :Explore c:/path would.
3166 * Fixed a bug in s:NetrwOptionRestore() - lcd's
3167 argument wasn't being properly escaped so it
3168 wouldn't handle spaces in directory names.
3169 (Gary Johnson)
3170 v117: Jan 02, 2008 * Fixed a problem with P; had to include
3171 a b:netrw_curdir bypass (Bram Moolenaar)
3172 v116: Nov 27, 2007 * netrw#LocalBrowseCheck() has &ft=="netrw"
3173 check to prevent doing a directory listing
3174 (was getting unexpected directory refreshes
3175 in the middle of some function calls)
3176 * NetrwOptionRestore moved after e! filename
3177 in order to retain user options for editing
3178 in s:NetrwBrowseChgDir()
3179 Dec 12, 2007 * Bug fix -- netrw does a better job of retaining
3180 user options when editing files under the aegis
3181 of the browser
3182 v115: Oct 04, 2007 * Erik Remmelzwaal pointed out that the use of
3183 shellslash in s:GetTempfile() was incorrect
3184 Oct 11, 2007 * Tracked down and eliminated a bug with editing
3185 remote *.tar.gz and *.tar.bz2 files
3186 Oct 11, 2007 * g:netrw_localmovecmd wasn't being initialized
3187 properly, and g:netrw_localcopycmd was being
3188 overwritten.
3189 Oct 12, 2007 * Placed all :Rexplore and <2-leftmouse> setup
3190 in a new support function (s:SetRexDir()).
3191 Oct 15, 2007 * new: g:netrw_browse_split == 4; means <cr>
3192 based selection will use previous window
3193 Oct 20, 2007 * also checks on |'shellxquote'| to set g:netrw_shq
3194 Oct 24, 2007 * Explore handles path/**/filename
3195 Oct 27, 2007 * sourcing remote files often didn't work with ftp,
3196 turns out that b:netrw_method was undefined, so
3197 s:SaveBufVars and s:RestoreBufVars() fixed it.
3198 v114: Sep 28, 2007 * mT, the map that invokes tags, has been improved
3199 to support use of remote tags files.
3200 Oct 02, 2007 * changed Netrw menu to use more submenus
3201 v113: Sep 07, 2007 * worked out why the cursor position wasn't being
3202 saved and restored as intended after doing such
3203 things as deleting and renaming files.
3204 Sep 11, 2007 * Fixed bug which effectively disabled <c-l> and
3205 <c-h> maps
3206 Sep 18, 2007 * there used to be one NetrwOptionRestore() call at
3207 the end of the s:NetrwBrowseChgDir() function;
3208 they're now at the end of every if..elseif..else
3209 block. The edit-a-file one is not quite at the end
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003210 of its block; instead, it's just before the edit.
Bram Moolenaar446cb832008-06-24 21:56:24 +00003211 Restores user options, then this new placement
3212 allows ftplugins, autocmds, etc to change settings
3213 (ex. ftplugin/cpp.vim sets cindent).
3214 Sep 19, 2007 * changed all strlen() calls to use s:Strlen(), a
3215 function which handles utf-8 wide characters
3216 correctly.
3217 Sep 20, 2007 * (Nico Weber) the "x" command has been extended
3218 to Mac's OS/X (macunix); it now uses open to
3219 handle |netrw-x| browsing with special files.
3220 Sep 22, 2007 * Added g:netrw_noretmap to netrw at Tony M's
3221 request.
3222 * Included path to NetrwRemoteRmFile()
3223 v112: Aug 18, 2007 * added mx (|netrw-mx|) for executing arbitrary
3224 commands on marked files
3225 Aug 22, 2007 * more option save/restore work for
3226 s:NetrwBrowseChgDir(); s:NetrwOptionSave()
3227 and s:NetrwOptionRestore() now take a parameter
3228 specifying the type of variables to be used for
3229 saving and restoring (either "w:" or "s:")
3230 Sep 04, 2007 * added the :NetrwClean[!] command
3231 v111: Jul 25, 2007 * using Windows but not using Cygwin, netrw does a
3232 "file bufname" where the bufname uses /s
3233 instead of \s; Vim "fixes" it by changing the
3234 bufname to use \s anyway. This meant that
3235 NetrwGetBuffer() didn't find the appropriately
3236 named buffer, and so would generate a new
3237 buffer listing; hence the cursor would appear
3238 to have been moved when doing a preview.
3239 * added <2-leftmouse> map to return to netrw's
3240 browser display
3241 Aug 16, 2007 * added the mark-file system, including
3242 maps for mf mp mt mz and mu. Modifications
3243 made to maps for a D O and R to support
3244 marked files.
3245 v110: May 10, 2007 * added [ and ] maps to NetrwTreeListing
3246 May 25, 2007 * |g:netrw_preview| included
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003247 May 29, 2007 * modified netrw#NetBrowseX to consistently use
Bram Moolenaarc236c162008-07-13 17:41:49 +00003248 g:netrw_shq instead of hardcoded quotes,
Bram Moolenaar446cb832008-06-24 21:56:24 +00003249 and modified the snippet that sets up redir
3250 so Windows machines use "nul" instead of
3251 "/dev/null".
3252 Jun 01, 2007 * fixed bug -- NetGetBuffer() wasn't always
3253 recognizing a buffer name match when it should,
3254 thus resulting in [Scratch] buffers.
3255 Jun 04, 2007 * Gary Johnson found a bugfix for the "c" mapping
3256 when the directory is to be made current but
3257 the name contains spaces.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003258 v109: Mar 26, 2007 * if a directory name includes a "$" character,
3259 Explore() will use expand() in an attempt to
3260 decipher the name.
3261 May 07, 2007 * g:netrw_use_errorwindow now allows one to
Bram Moolenaar446cb832008-06-24 21:56:24 +00003262 have error messages go to a reliable window
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003263 or to use a less reliable but recallable
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003264 echoerr method
3265 May 07, 2007 * g:netrw_scpport and g:netrw_sshport support
Bram Moolenaar446cb832008-06-24 21:56:24 +00003266 use of -P and -p, respectively, to set port
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003267 for scp/ssh.
Bram Moolenaar9964e462007-05-05 17:54:07 +00003268 v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting
3269 remote browsing
3270 * netrw can now source remote files
3271 Jan 26, 2007 * Colton Jamieson noted that remote directory
3272 browsing did not support alternate port
3273 selection. This feature has now been extended
3274 to apply to all remote browsing commands via ssh.
3275 (list, remove/delete, rename)
3276 Jan 31, 2007 * Luis Florit reported that @* was an invalid
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003277 register. The @* register is now only saved and
3278 restored if |'guioptions'| contains "a".
Bram Moolenaar9964e462007-05-05 17:54:07 +00003279 Feb 02, 2007 * Fixed a bug that cropped up when writing files
3280 via scp using cygwin
3281 Feb 08, 2007 * tree listing mode managed to stop working again;
3282 fixed again!
3283 Feb 15, 2007 * Guido Van Hoecke reported that netrw didn't
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003284 handle browsing well with M$ ftp servers. He even
Bram Moolenaar9964e462007-05-05 17:54:07 +00003285 set up a temporary account for me to test with
3286 (thanks!). Netrw now can browse M$ ftp servers.
3287 v107: Oct 12, 2006 * bypassed the autowrite option
3288 Oct 24, 2006 * handles automatic decompression of *.gz and *.bz2
3289 files
3290 Nov 03, 2006 * Explore will highlight matching files when
3291 **/pattern is used (and if the |'hls'| option
3292 is set)
3293 Nov 09, 2006 * a debugging line, when enabled, was inadvertently
3294 bringing up help instead of simply reporting on
3295 list contents
3296 Nov 21, 2006 * tree listing improved (cursor remains put)
3297 Nov 27, 2006 * fixed b:netrw_curdir bug when repeated "i"s were
3298 pressed.
3299 Dec 15, 2006 * considerable qty of changes, mostly to share more
3300 code between local and remote browsing. Includes
3301 support for tree-style listing for both remote
3302 and local browsing.
3303 Dec 15, 2006 * Included Peter Bengtsson's modifications to
3304 support the Amiga.
3305 v106: Sep 21, 2006 * removed old v:version<700 code as netrw now
3306 requires vim 7.0
3307 * worked around a bug where register * was
3308 overwritten during local browsing
3309 v104: Sep 05, 2006 * as suggested by Rodolfo Borges, :Explore and
3310 variants will position the cursor on the file
3311 just having been edited
3312 * changed default |g:netrw_sort_sequence| order
3313 * changed b, Nb to simply mb (see |netrw-mb|)
3314 * changed B, NB to simply gb (see |netrw-gb|)
3315 * tree listing style (see |g:netrw_liststyle|)
3316 * attempts to retain the alternate file
3317 v103: Jul 26, 2006 * used Yakov Lerner's tip#1289 to improve netrw
3318 error message display
3319 * wide listings didn't handle files with backslashes
3320 in their names properly. A symptom was an
3321 inability to open files.
3322 Aug 09, 2006 * included "t" mapping for opening tabbed windows,
3323 both for remote and local browsing
3324 * changed netrw_longlist to netrw_liststyle
3325 Aug 15, 2006 * fixed one of the NB maps
3326 Aug 22, 2006 * changed *Explore commands to use -nargs=* instead
3327 of -nargs=?. Allows both -complete=dir _and_ the
3328 starstar arguments to work (-nargs=? seems to
3329 require one or the other).
3330 Aug 23, 2006 * copied all w:.. variables across splits to
3331 new windows
3332 Aug 25, 2006 * when g:netrw_browsex_viewer was '-'
3333 (see |g:netrw_browsex_viewer|) it wasn't causing
3334 netrwFileHandlers#Invoke() to be called as it
3335 was expected to. (tnx Steve Dugaro)
3336 Aug 29, 2006 * changed NetBrowseX() to use "setlocal ... noswf"
3337 instead of "set ... noswf" (tnx Benji Fisher)
3338 Aug 31, 2006 * tabs and fastbrowse<=1 didn't work together.
3339 v102: Jun 15, 2006 * chgd netrwPlugin to call netrw#LocalBrowseCheck()
3340 * bugfix: g:netrw_keepdir==0 had stopped working
3341 Jul 06, 2006 * bugfix: NetOptionSave/Restore now saves/restores
3342 the unnamed register (|registers|)
3343 Jul 07, 2006 * |g:netrw_menu| support included
3344 Jul 13, 2006 * :Texplore command implemented
3345 Jul 17, 2006 * NetSplit and (Local|Net)BrowseChgDir() were both
3346 splitting windows. This affected o, v, and
3347 g:netrw_browse_split.
3348 Jul 20, 2006 * works around wildignore setting (was causing
3349 netrw's local browser not to list wildignore'd
3350 files)
3351 Jul 24, 2006 * <leftmouse> acts as a <cr> for selecting a file
3352 <rightmouse> acts as a <del> for deleting a file
3353 v100: May 14, 2006 * when using Windows and shell==cmd.exe, the
3354 default for g:netrw_ignorenetrc is now 1
3355 * bugfix: unwanted ^Ms now removed
3356 (affected shell==cmd.exe - Windows)
3357 * added Bookmarks and History to the menu
3358 * an error message about non-existing
3359 w:netrw_longlist was appearing during attempts to
3360 Explore (fixed)
3361 * g:netrw_shq now available to make netrw use
3362 specified style of quotes for commands
3363 May 29, 2006 * user NFH_*() functions were inadvertently being
3364 ignored
3365 * fixed a Windows non-cygwin ftp handling problem.
3366 * hiding pattern candidate separators included some
3367 characters it shouldn't have (tnx to Osei Poku)
3368 Jun 01, 2006 * for browsing, netrw was supposed to use "dir"
3369 instead of "ls -lF" when using
3370 ftp+non-cygwin+windows. Fixed.
3371 * an inadvertently left-in-place debugging statement
3372 was preventing use of the "x" key with browsing.
3373 Jun 05, 2006 * g:netrw_nogx available to prevent making the gx
3374 map (see |g:netrw_nogx|)
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003375 * bugfix, Explore wouldn't change directory
Bram Moolenaar9964e462007-05-05 17:54:07 +00003376 properly (vim ., :Explore subdirname)
3377 Jun 06, 2006 * moved history to 2nd line in Netrw menu
3378 * fixed delete for unix-based systems
3379 Jun 07, 2006 * x key now works for windows-noncygwin-ftp
3380 Jun 08, 2006 * Explore */pat and **//pat now wraps
3381 v99: May 09, 2006 * g:netrw_browse_split=3 for opening files in new
3382 tabs implemented.
3383 May 12, 2006 * deletes temporary file at end of NetRead()
3384 * visual mode based Obtain implemented
3385 * added -complete=dir to the various Explore
3386 commands
3387 v98: May 02, 2006 * the "p" key didn't work properly when the browsing
3388 directory name had spaces in it.
3389 v97: May 01, 2006 * exists("&acd") now used to determine if
3390 the 'acd' option exists
3391 * "obtain" now works again under Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00003392 v96: * bugfix - the |'acd'| option is not always defined
3393 but is now bypassed only when it is
3394 v95: * bugfix - Hiding mode worked correctly (don't show
3395 any file matching any of the g:netrw_hide
3396 patterns), but showing mode was showing only those
3397 files that didn't match any of the g:netrw_hide
3398 patterns. Instead, it now shows all files that
3399 match any of the g:netrw_hide patterns (the
3400 difference between a logical and and logical or).
3401 v94: * bugfix - a Decho() had a missing quote; only
3402 affects things when debugging was enabled.
3403 v93: * bugfix - removed FocusGained event from causing a
3404 slow-browser refresh for Windows
3405 v92: * :Explore **//pattern implemented
3406 (**/filepattern was already taken)
3407 v91: * :Explore */pattern implemented
3408 * |'acd'| option bypassed
3409 v90: * mark ', as suggested by Yegappan Lakshmanan, used
3410 to help guarantee entry into the jump list when
3411 appropriate.
3412 * <s-down> and <s-up> are no longer defined until a
3413 :Explore **/pattern is used (if the user already
3414 has a map for them). They will be defined for new
3415 browser windows from that point forward.
3416 v89: * A <s-down>, <s-up>, :Nexplore, or a :Pexplore
3417 without having first done an :Explore **/pattern
3418 (see |netrw-starstar|) caused
3419 a lot of unhelpful error messages to appear
3420 v88: * moved DrChip.Netrw menu to Netrw. Now has
3421 priority 80 by default.
3422 g:NetrwTopLvlMenu == "Netrw" and can be changed
3423 by the user to suit. The priority is given by
3424 g:NetrwMenuPriority.
3425 * Changed filetype for browser displays from
3426 netrwlist to netrw.
3427 v87: * bug fix -- menus were partially disappearing
3428 v85: * bug fix -- missing an endif
3429 * bug fix -- handles spaces in names and directories
3430 when using ftp-based browsing
3431 v83: * disabled stop-acd handling; the change in directory
3432 handling may allow acd to be used again.
3433 * D was refusing to delete remote files/directories
3434 in wide listing mode.
3435 v81: * FocusGained also used to refresh/wipe local browser
3436 directory buffers
3437 * (bugfix) netrw was leaving [Scratch] buffers behind
3438 when the user had the "hidden" option set. The
3439 'hidden' option is now bypassed.
3440 v80: * ShellCmdPost event used in conjunction with
3441 g:netrw_fastbrowse to refresh/wipe local browser
3442 directory buffers.
3443 v79: * directories are now displayed with nowrap
3444 * (bugfix) if the column width was smaller than the
3445 largest file's name, then netrw would hang when
3446 using wide-listing mode - fixed
3447 * g:netrw_fastbrowse introduced
3448 v78: * progress has been made on allowing spaces inside
3449 directory names for remote work (reading, writing,
3450 browsing). (scp)
3451 v77: * Mikolaj Machowski fixed a bug in a substitute cmd
3452 * g:netrw_browsex_viewer implemented
3453 * Mikolaj Machowski pointed out that gnome-open is
3454 often executable under KDE systems, although it is
3455 effectively not functional. NetBrowseX now looks
3456 for "kicker" as a running process to determine if
3457 KDE is actually running.
3458 * Explorer's O functionality was inadvertently left
3459 out. Netrw now does the same thing, but with the
3460 "P" key.
3461 * added g:netrw_browse_split option
3462 * fixed a bug where the directory contained a "." but
3463 the file didn't (was treating the dirname from "."
3464 onwards as a suffix)
3465 v76: * "directory is missing" error message now restores
3466 echo highlighting
3467 v75: * file://... now conforms to RFC2396 (thanks to
3468 S. Zacchiroli)
3469 * if the binary option is set, then NetWrite() will
3470 only write the whole file (line numbers don't make
3471 sense with this). Supports writing of tar and zip
3472 files.
3473 v74: * bugfix (vim, then :Explore) now works
3474 * ctrl-L keeps cursor at same screen location (both
3475 local and remote browsing)
3476 * netrw now can read remote zip and tar files
3477 * Obtain now uses WinXP ftp+.netrc successfully
3478 v73: * bugfix -- scp://host/path/file was getting named
3479 incorrectly
3480 * netrw detects use of earlier-than-7.0 version of
3481 vim and issues a pertinent error message.
3482 * netrwSettings.vim is now uses autoloading. Only
3483 <netrwPlugin.vim> is needed as a pure plugin
3484 (ie. always loaded).
3485 v72: * bugfix -- formerly, one could prevent the loading
3486 of netrw by "let g:loaded_netrw=1"; when
3487 autoloading became supported, this feature was
3488 lost. It is now restored.
3489 v71: * bugfix -- made some "set nomodifiable"s into
3490 setlocal variants (allows :e somenewfile to be
3491 modifiable as usual)
3492 * NetrwSettings calls a netrw function, thereby
3493 assuring that netrw has loaded. However, if netrw
3494 does not load for whatever reason, then
3495 NetrwSettings will now issue a warning message.
3496 * For what reason I don't recall, when wget and fetch
3497 are both not present, and an attempt to read a
3498 http://... url is made, netrw exited. It now only
3499 returns.
3500 * When ch=1, on the second and subsequent uses of
3501 browsing Netrw would issue a blank line to clear
3502 the echo'd messages. This caused an annoying
3503 "Hit-Enter" prompt; now a blank line message
3504 is echo'd only if &ch>1.
3505 v70: * when using |netrw-O|, the "Obtaining filename"
3506 message is now shown using |hl-User9|. If User9
3507 has not been defined, netrw itself will define it.
3508 v69: * Bugfix: win95/98 machines were experiencing a
3509 "E121: Undefined variable: g:netrw_win95ftp"
3510 message
3511 v68: * double-click-leftmouse selects word under mouse
3512 v67: * Passwords which contain blanks will now be
3513 surrounded by double-quotes automatically (Yongwei)
3514 v66: * Netrw now seems to work with a few more Windows
3515 situations
3516 * O now obtains a file: remote browsing
3517 file -> local copy, locally browsing
3518 file -> current directory (see :pwd)
3519 * i now cycles between thin, long, and wide listing
3520 styles
3521 * NB and Nb are maps that are always available;
3522 corresponding B and b maps are only available when
3523 not using wide listing in order to allow them to
3524 be used for motions
3525 v65: * Browser functions now use NetOptionSave/Restore; in
3526 particular, netrw now works around the report
3527 setting
3528 v64: * Bugfix - browsing a "/" directory (Unix) yielded
3529 buffers named "[Scratch]" instead of "/"
3530 * Bugfix - remote browsing with ftp was omitting
3531 the ./ and ../
3532 v63: * netrw now takes advantage of autoload (needs 7.0)
3533 * Bugfix - using r (to reverse sort) working again
3534 v62: * Bugfix - spaces allowed again in directory names
3535 with g:netrw_keepdir=0. In fact, I've tested netrw
3536 with most ANSI punctuation marks for directory
3537 names.
3538 * Bugfix - NetrwSettings gave errors when
3539 g:netrw_silent had not be set.
3540 v61: * Document upgrade -- netrw variable-based settings
3541 all should have tags. Supports NetrwSettings cmd.
3542 * Several important variables are window-oriented.
3543 Netrw has to transfer these across a window split.
3544 See s:BufWinVars() and s:UseBufWinVars().
3545 v60: * When using the i map to switch between long and
3546 short listings, netrw will now keep cursor on same
3547 line
3548 * "Match # of #" now uses status line
3549 * :Explore **/*.c will now work from a
3550 non-netrw-browser window
3551 * :Explore **/patterns can now be run in separate
3552 browser windows
3553 * active banner (hit <cr> will cause various things
3554 to happen)
3555 v59: * bugfix -- another keepalt work-around installed
3556 (for vim6.3)
3557 * "Match # of #" for Explore **/pattern matches
3558 v58: * Explore and relatives can now handle
3559 **/somefilepattern (v7)
3560 * Nexplore and Pexplore introduced (v7). shift-down
3561 and shift-up cursor keys will invoke Nexplore and
3562 Pexplore, respectively.
3563 * bug fixed with o and v
3564 * autochdir only worked around for vim when it has
3565 been compiled with either
3566 |+netbeans_intg| or |+sun_workshop|
3567 * Under Windows, all directories and files were
3568 being preceded with a "/" when local browsing.
3569 Fixed.
3570 * When: syntax highlighting is off, laststatus=2, and
3571 remote browsing is used, sometimes the laststatus
3572 highlighting bleeds into the entire display. Work
3573 around - do an extra redraw in that case.
3574 * Bugfix: when g:netrw_keepdir=0, due to re-use of
3575 buffers, netrw didn't change the directory when it
3576 should've
3577 * Bugfix: D and R commands work again
3578 v57: * Explore and relatives can now handle RO files
3579 * reverse sort restored with vim7's sort command
3580 * g:netrw_keepdir now being used to keep the current
3581 directory unchanged as intended (sense change)
3582 * vim 6.3 still supported
3583 v56: * LocalBrowse now saves autochdir setting, unsets it,
3584 and restores it before returning.
3585 * using vim's rename() instead of system +
3586 local_rename variable
3587 * avoids changing directory when g:netrw_keepdir is
3588 false
3589 v55: * -bar used with :Explore :Sexplore etc to allow
3590 multiple commands to be separated by |s
3591 * browser listings now use the "nowrap" option
3592 * browser: some unuseful error messages now
3593 suppressed
3594 v54: * For backwards compatibility, Explore and Sexplore
3595 have been implemented. In addition, Hexplore and
3596 Vexplore commands are available, too.
3597 * <amatch> used instead of <afile> in the
3598 transparency support (BufReadCmd, FileReadCmd,
3599 FileWriteCmd)
3600 * ***netrw*** prepended to various error messages
3601 netrw may emit
3602 * g:netrw_port used instead of b:netrw_port for scp
3603 * any leading [:#] is removed from port numbers
3604 v53: * backslashes as well as slashes placed in various
3605 patterns (ex. g:netrw_sort_sequence) to better
3606 support Windows
3607 v52: * nonumber'ing now set for browsing buffers
3608 * when the hiding list hid all files, error messages
3609 ensued. Fixed
3610 * when browsing, swf is set, but directory is not
3611 set, when netrw was attempting to restore options,
3612 vim wanted to save a swapfile to a local directory
3613 using an url-style path. Fixed
3614 v51: * cygwin detection now automated
3615 (using windows and &shell is bash)
3616 * customizable browser "file" rejection patterns
3617 * directory history
3618 * :[range]w url now supported (ie. netrw uses a
3619 FileWriteCmd event)
3620 * error messages have a "Press <cr> to continue" to
3621 allow them to be seen
3622 * directory browser displays no longer bother the
3623 swapfile
3624 * u/U commands to go up and down the history stack
3625 * history stack may be saved with viminfo with it's
3626 "!" option
3627 * bugfixes associated with unwanted [No Files]
3628 entries
3629 v50: * directories now displayed using buftype=nofile;
3630 should keep the directory names as-is
3631 * attempts to remove empty "[No File]" buffers
3632 leftover from :file ..name.. commands
3633 * bugfix: a "caps-lock" editing difficulty left in
3634 v49 was fixed
3635 * syntax highlighting for "Showing:" the hiding list
3636 included
3637 * bookmarks can now be retained if "!" is in the
3638 viminfo option
3639 v49: * will use ftp for http://.../ browsing
3640 v48: * One may use ftp to do remote host file browsing
3641 * (windows and !cygwin) remote browsing with ftp can
3642 now use the "dir" command internally to provide
3643 listings
3644 * g:netrw_keepdir now allows one to keep the initial
3645 current directory as the current directory
3646 (normally the local file browser makes the
3647 currently viewed directory the current directory)
3648 * g:netrw_alto and g:netrw_altv now support
3649 alternate placement of windows started with o or v
3650 * Nread ? and Nwrite ? now uses echomsg (instead of
3651 echo) so :messages can repeat showing the help
3652 * bugfix: avoids problems with partial matches of
3653 directory names to prior buffers with longer names
3654 * one can suppress error messages with g:netrw_quiet
3655 ctrl-h used
3656 * instead of <Leader>h for editing hiding list one
3657 may edit the sorting sequence with the S map, which
3658 now allows confirmation of deletion with
3659 [y(es) n(o) a(ll) q(uit)]
3660 * the "x" map now handles special file viewing with:
3661 (windows) rundll32 url.dll (gnome) gnome-open (kde)
3662 kfmclient If none of these are on the executable
3663 path, then netrwFileHandlers.vim is used.
3664 * directory bookmarking during both local and remote
3665 browsing implemented
3666 * one may view all, use the hiding list to suppress,
3667 or use the hiding list to show-only remote and
3668 local file/directory listings
3669 * improved unusual file and directory name handling
3670 preview window support
3671 v47: * now handles local browsing.
3672 v46: * now handles remote browsing
3673 * g:netrw_silent (if 1) will cause all transfers to
3674 be silent
3675 v45: * made the [user@]hostname:path form a bit more
3676 restrictive to better handle errors in using
3677 protocols (e.g. scp:usr@host:file was being
3678 recognized as an rcp request)
3679 v44: * changed from "rsync -a" to just "rsync"
3680 * somehow an editing error messed up the test to
3681 recognize use of the fetch method for NetRead.
3682 * more debugging statements included
3683 v43: * moved "Explanation" comments to <pi_netrw.txt> help
3684 file as "Network Reference" (|netrw-ref|)
3685 * <netrw.vim> now uses Dfunc() Decho() and Dret() for
3686 debugging
3687 * removed superfluous NetRestorePosn() calls
3688 v42: * now does BufReadPre and BufReadPost events on
3689 file:///* and file://localhost/*
3690 v41: * installed file:///* and file://localhost/* handling
3691 v40: * prevents redraw when a protocol error occurs so
3692 that the user may see it
3693 v39: * sftp support
3694 v38: * Now uses NetRestorePosn() calls with Nread/Nwrite
3695 commands
3696 * Temporary files now removed via bwipe! instead of
3697 bwipe (thanks to Dave Roberts)
3698 v37: * Claar's modifications which test if ftp is
3699 successful, otherwise give an error message
3700 * After a read, the alternate file was pointing to
3701 the temp file. The temp file buffer is now wiped
3702 out.
3703 * removed silent from transfer methods so user can
3704 see what's happening
Bram Moolenaar071d4272004-06-13 20:20:40 +00003705
3706
3707==============================================================================
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100370813. Todo *netrw-todo* {{{1
3709
371007/29/09 : banner :|g:netrw_banner| can be used to suppress the
3711 suppression banner. This feature is new and experimental,
3712 so its in the process of being debugged.
371309/04/09 : "gp" : See if it can be made to work for remote systems.
3714 : See if it can be made to work with marked files.
3715
3716==============================================================================
371714. Credits *netrw-credits* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00003718
3719 Vim editor by Bram Moolenaar (Thanks, Bram!)
3720 dav support by C Campbell
3721 fetch support by Bram Moolenaar and C Campbell
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003722 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
Bram Moolenaar071d4272004-06-13 20:20:40 +00003723 http support by Bram Moolenaar <bram@moolenaar.net>
3724 rcp
3725 rsync support by C Campbell (suggested by Erik Warendorph)
3726 scp support by raf <raf@comdyn.com.au>
3727 sftp support by C Campbell
3728
3729 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
3730
3731 Jérôme Augé -- also using new buffer method with ftp+.netrc
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003732 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003733 fetch,...
Bram Moolenaar071d4272004-06-13 20:20:40 +00003734 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
3735 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
3736 variables, rsync etc)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003737 Doug Claar -- modifications to test for success with ftp
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003738 operation
Bram Moolenaar071d4272004-06-13 20:20:40 +00003739
3740==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00003741Modelines: {{{1
Bram Moolenaar83bab712005-08-01 21:58:57 +00003742 vim:tw=78:ts=8:ft=help:norl:fdm=marker