Mercurial > vim
annotate runtime/doc/pi_netrw.txt @ 8761:f8707ec9efe4 v7.4.1669
commit https://github.com/vim/vim/commit/8b877ac38e96424a08a8b8eb713ef4b3cf0064be
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 28 19:16:20 2016 +0200
patch 7.4.1669
Problem: When writing buffer lines to a pipe Vim may block.
Solution: Avoid blocking, write more lines later.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 28 Mar 2016 19:30:05 +0200 |
parents | f5da459c5698 |
children | 0bdeaf7092bc |
rev | line source |
---|---|
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1 *pi_netrw.txt* For Vim version 7.4. Last change: 2016 Feb 16 |
4339 | 2 |
3 ------------------------------------------------ | |
4 NETRW REFERENCE MANUAL by Charles E. Campbell | |
5 ------------------------------------------------ | |
6 Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM> | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
7 (remove NOSPAM from Campbell's email first) |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
8 |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
9 Copyright: Copyright (C) 2016 Charles E Campbell *netrw-copyright* |
3456 | 10 The VIM LICENSE applies to the files in this package, including |
11 netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and | |
12 syntax/netrw.vim. Like anything else that's free, netrw.vim and its | |
13 associated files are provided *as is* and comes with no warranty of | |
14 any kind, either expressed or implied. No guarantees of | |
15 merchantability. No guarantees of suitability for any purpose. By | |
16 using this plugin, you agree that in no event will the copyright | |
17 holder be liable for any damages resulting from the use of this | |
18 software. Use at your own risk! | |
7 | 19 |
559 | 20 |
6476 | 21 *netrw* |
2152 | 22 *dav* *ftp* *netrw-file* *rcp* *scp* |
23 *davs* *http* *netrw.vim* *rsync* *sftp* | |
6476 | 24 *fetch* *network* |
7 | 25 |
26 ============================================================================== | |
1621 | 27 1. Contents *netrw-contents* {{{1 |
7 | 28 |
4339 | 29 1. Contents..............................................|netrw-contents| |
30 2. Starting With Netrw...................................|netrw-start| | |
31 3. Netrw Reference.......................................|netrw-ref| | |
32 EXTERNAL APPLICATIONS AND PROTOCOLS.................|netrw-externapp| | |
33 READING.............................................|netrw-read| | |
34 WRITING.............................................|netrw-write| | |
35 SOURCING............................................|netrw-source| | |
36 DIRECTORY LISTING...................................|netrw-dirlist| | |
37 CHANGING THE USERID AND PASSWORD....................|netrw-chgup| | |
38 VARIABLES AND SETTINGS..............................|netrw-variables| | |
39 PATHS...............................................|netrw-path| | |
40 4. Network-Oriented File Transfer........................|netrw-xfer| | |
41 NETRC...............................................|netrw-netrc| | |
42 PASSWORD............................................|netrw-passwd| | |
43 5. Activation............................................|netrw-activate| | |
44 6. Transparent Remote File Editing.......................|netrw-transparent| | |
45 7. Ex Commands...........................................|netrw-ex| | |
46 8. Variables and Options.................................|netrw-variables| | |
47 9. Browsing..............................................|netrw-browse| | |
48 Introduction To Browsing............................|netrw-intro-browse| | |
49 Quick Reference: Maps...............................|netrw-browse-maps| | |
50 Quick Reference: Commands...........................|netrw-browse-cmds| | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
51 Banner Display......................................|netrw-I| |
4339 | 52 Bookmarking A Directory.............................|netrw-mb| |
53 Browsing............................................|netrw-cr| | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
54 Squeezing the Current Tree-Listing Directory........|netrw-s-cr| |
4339 | 55 Browsing With A Horizontally Split Window...........|netrw-o| |
56 Browsing With A New Tab.............................|netrw-t| | |
57 Browsing With A Vertically Split Window.............|netrw-v| | |
58 Change Listing Style.(thin wide long tree)..........|netrw-i| | |
59 Changing To A Bookmarked Directory..................|netrw-gb| | |
60 Changing To A Predecessor Directory.................|netrw-u| | |
61 Changing To A Successor Directory...................|netrw-U| | |
6476 | 62 Customizing Browsing With A Special Handler.........|netrw-x| |
4339 | 63 Deleting Bookmarks..................................|netrw-mB| |
64 Deleting Files Or Directories.......................|netrw-D| | |
65 Directory Exploring Commands........................|netrw-explore| | |
66 Exploring With Stars and Patterns...................|netrw-star| | |
67 Displaying Information About File...................|netrw-qf| | |
68 Edit File Or Directory Hiding List..................|netrw-ctrl-h| | |
69 Editing The Sorting Sequence........................|netrw-S| | |
70 Forcing treatment as a file or directory............|netrw-gd| |netrw-gf| | |
71 Going Up............................................|netrw--| | |
72 Hiding Files Or Directories.........................|netrw-a| | |
73 Improving Browsing..................................|netrw-ssh-hack| | |
74 Listing Bookmarks And History.......................|netrw-qb| | |
75 Making A New Directory..............................|netrw-d| | |
76 Making The Browsing Directory The Current Directory.|netrw-c| | |
77 Marking Files.......................................|netrw-mf| | |
78 Unmarking Files.....................................|netrw-mF| | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
79 Marking Files By Location List......................|netrw-qL| |
4339 | 80 Marking Files By QuickFix List......................|netrw-qF| |
81 Marking Files By Regular Expression.................|netrw-mr| | |
6476 | 82 Marked Files: Arbitrary Shell Command...............|netrw-mx| |
83 Marked Files: Arbitrary Shell Command, En Bloc......|netrw-mX| | |
84 Marked Files: Arbitrary Vim Command.................|netrw-mv| | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
85 Marked Files: Argument List.........................|netrw-ma| |netrw-mA| |
4339 | 86 Marked Files: Compression And Decompression.........|netrw-mz| |
87 Marked Files: Copying...............................|netrw-mc| | |
88 Marked Files: Diff..................................|netrw-md| | |
89 Marked Files: Editing...............................|netrw-me| | |
90 Marked Files: Grep..................................|netrw-mg| | |
91 Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh| | |
92 Marked Files: Moving................................|netrw-mm| | |
93 Marked Files: Printing..............................|netrw-mp| | |
94 Marked Files: Sourcing..............................|netrw-ms| | |
95 Marked Files: Setting the Target Directory..........|netrw-mt| | |
96 Marked Files: Tagging...............................|netrw-mT| | |
97 Marked Files: Target Directory Using Bookmarks......|netrw-Tb| | |
98 Marked Files: Target Directory Using History........|netrw-Th| | |
99 Marked Files: Unmarking.............................|netrw-mu| | |
100 Netrw Browser Variables.............................|netrw-browser-var| | |
101 Netrw Browsing And Option Incompatibilities.........|netrw-incompatible| | |
102 Netrw Settings Window...............................|netrw-settings-window| | |
103 Obtaining A File....................................|netrw-O| | |
104 Preview Window......................................|netrw-p| | |
105 Previous Window.....................................|netrw-P| | |
106 Refreshing The Listing..............................|netrw-ctrl-l| | |
107 Reversing Sorting Order.............................|netrw-r| | |
108 Renaming Files Or Directories.......................|netrw-R| | |
109 Selecting Sorting Style.............................|netrw-s| | |
110 Setting Editing Window..............................|netrw-C| | |
111 10. Problems and Fixes....................................|netrw-problems| | |
112 11. Debugging Netrw Itself................................|netrw-debug| | |
113 12. History...............................................|netrw-history| | |
114 13. Todo..................................................|netrw-todo| | |
115 14. Credits...............................................|netrw-credits| | |
7 | 116 |
117 {Vi does not have any of this} | |
118 | |
119 ============================================================================== | |
1621 | 120 2. Starting With Netrw *netrw-start* {{{1 |
121 | |
122 Netrw makes reading files, writing files, browsing over a network, and | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
123 local browsing easy! First, make sure that you have plugins enabled, so |
1621 | 124 you'll need to have at least the following in your <.vimrc>: |
125 (or see |netrw-activate|) > | |
650 | 126 |
1121 | 127 set nocp " 'compatible' is not set |
128 filetype plugin on " plugins are enabled | |
650 | 129 < |
130 (see |'cp'| and |:filetype-plugin-on|) | |
131 | |
132 Netrw supports "transparent" editing of files on other machines using urls | |
133 (see |netrw-transparent|). As an example of this, let's assume you have an | |
1621 | 134 account on some other machine; if you can use scp, try: > |
650 | 135 |
136 vim scp://hostname/path/to/file | |
137 < | |
1621 | 138 Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|! |
139 | |
140 So, what if you have ftp, not ssh/scp? That's easy, too; try > | |
650 | 141 |
142 vim ftp://hostname/path/to/file | |
143 < | |
144 Want to make ftp simpler to use? See if your ftp supports a file called | |
145 <.netrc> -- typically it goes in your home directory, has read/write | |
146 permissions for only the user to read (ie. not group, world, other, etc), | |
147 and has lines resembling > | |
148 | |
149 machine HOSTNAME login USERID password "PASSWORD" | |
150 machine HOSTNAME login USERID password "PASSWORD" | |
151 ... | |
1121 | 152 default login USERID password "PASSWORD" |
650 | 153 < |
3456 | 154 Windows' ftp doesn't support .netrc; however, one may have in one's .vimrc: > |
155 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
156 let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\MyUserName\MACHINE' |
3920 | 157 < |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
158 Netrw will substitute the host's machine name for "MACHINE" from the url it is |
3456 | 159 attempting to open, and so one may specify > |
160 userid | |
161 password | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
162 for each site in a separate file: c:\Users\MyUserName\MachineName. |
3456 | 163 |
1621 | 164 Now about browsing -- when you just want to look around before editing a |
650 | 165 file. For browsing on your current host, just "edit" a directory: > |
166 | |
167 vim . | |
168 vim /home/userid/path | |
169 < | |
170 For browsing on a remote host, "edit" a directory (but make sure that | |
171 the directory name is followed by a "/"): > | |
172 | |
173 vim scp://hostname/ | |
174 vim ftp://hostname/path/to/dir/ | |
175 < | |
176 See |netrw-browse| for more! | |
177 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
178 There are more protocols supported by netrw than just scp and ftp, too: see the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
179 next section, |netrw-externapp|, on how to use these external applications with |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
180 netrw and vim. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
181 |
5929 | 182 PREVENTING LOADING *netrw-noload* |
1621 | 183 |
184 If you want to use plugins, but for some reason don't wish to use netrw, then | |
185 you need to avoid loading both the plugin and the autoload portions of netrw. | |
186 You may do so by placing the following two lines in your <.vimrc>: > | |
187 | |
188 :let g:loaded_netrw = 1 | |
189 :let g:loaded_netrwPlugin = 1 | |
190 < | |
650 | 191 |
192 ============================================================================== | |
5929 | 193 3. Netrw Reference *netrw-ref* {{{1 |
1621 | 194 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
195 Netrw supports several protocols in addition to scp and ftp as mentioned |
1621 | 196 in |netrw-start|. These include dav, fetch, http,... well, just look |
197 at the list in |netrw-externapp|. Each protocol is associated with a | |
198 variable which holds the default command supporting that protocol. | |
199 | |
200 EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2 | |
7 | 201 |
5618 | 202 Protocol Variable Default Value |
203 -------- ---------------- ------------- | |
204 dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable | |
205 dav: g:netrw_dav_cmd = "curl -o" elseif curl is available | |
206 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available | |
207 ftp: *g:netrw_ftp_cmd* = "ftp" | |
208 http: *g:netrw_http_cmd* = "elinks" if elinks is available | |
209 http: g:netrw_http_cmd = "links" elseif links is available | |
210 http: g:netrw_http_cmd = "curl" elseif curl is available | |
211 http: g:netrw_http_cmd = "wget" elseif wget is available | |
212 http: g:netrw_http_cmd = "fetch" elseif fetch is available | |
213 http: *g:netrw_http_put_cmd* = "curl -T" | |
214 rcp: *g:netrw_rcp_cmd* = "rcp" | |
215 rsync: *g:netrw_rsync_cmd* = "rsync -a" | |
216 scp: *g:netrw_scp_cmd* = "scp -q" | |
217 sftp: *g:netrw_sftp_cmd* = "sftp" | |
6476 | 218 file: *g:netrw_file_cmd* = "elinks" or "links" |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
219 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
220 *g:netrw_http_xcmd* : the option string for http://... protocols are |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
221 specified via this variable and may be independently overridden. By |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
222 default, the option arguments for the http-handling commands are: > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
223 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
224 elinks : "-source >" |
3920 | 225 links : "-dump >" |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
226 curl : "-o" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
227 wget : "-q -O" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
228 fetch : "-o" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
229 < |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
230 For example, if your system has elinks, and you'd rather see the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
231 page using an attempt at rendering the text, you may wish to have > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
232 let g:netrw_http_xcmd= "-dump >" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
233 < in your .vimrc. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
234 |
5618 | 235 g:netrw_http_put_cmd: this option specifies both the executable and |
236 any needed options. This command does a PUT operation to the url. | |
237 | |
7 | 238 |
1621 | 239 READING *netrw-read* *netrw-nread* {{{2 |
240 | |
241 Generally, one may just use the url notation with a normal editing | |
242 command, such as > | |
243 | |
244 :e ftp://[user@]machine/path | |
245 < | |
246 Netrw also provides the Nread command: | |
247 | |
7 | 248 :Nread ? give help |
22 | 249 :Nread "machine:path" uses rcp |
482 | 250 :Nread "machine path" uses ftp w/ <.netrc> |
22 | 251 :Nread "machine id password path" uses ftp |
252 :Nread "dav://machine[:port]/path" uses cadaver | |
253 :Nread "fetch://[user@]machine/path" uses fetch | |
482 | 254 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> |
22 | 255 :Nread "http://[user@]machine/path" uses http uses wget |
256 :Nread "rcp://[user@]machine/path" uses rcp | |
257 :Nread "rsync://[user@]machine[:port]/path" uses rsync | |
258 :Nread "scp://[user@]machine[[:#]port]/path" uses scp | |
259 :Nread "sftp://[user@]machine/path" uses sftp | |
7 | 260 |
1621 | 261 WRITING *netrw-write* *netrw-nwrite* {{{2 |
262 | |
263 One may just use the url notation with a normal file writing | |
264 command, such as > | |
265 | |
266 :w ftp://[user@]machine/path | |
267 < | |
268 Netrw also provides the Nwrite command: | |
269 | |
794 | 270 :Nwrite ? give help |
22 | 271 :Nwrite "machine:path" uses rcp |
482 | 272 :Nwrite "machine path" uses ftp w/ <.netrc> |
22 | 273 :Nwrite "machine id password path" uses ftp |
274 :Nwrite "dav://machine[:port]/path" uses cadaver | |
482 | 275 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> |
22 | 276 :Nwrite "rcp://[user@]machine/path" uses rcp |
277 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync | |
278 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp | |
279 :Nwrite "sftp://[user@]machine/path" uses sftp | |
7 | 280 http: not supported! |
281 | |
1621 | 282 SOURCING *netrw-source* {{{2 |
283 | |
284 One may just use the url notation with the normal file sourcing | |
285 command, such as > | |
286 | |
287 :so ftp://[user@]machine/path | |
288 < | |
289 Netrw also provides the Nsource command: | |
290 | |
1121 | 291 :Nsource ? give help |
292 :Nsource "dav://machine[:port]/path" uses cadaver | |
293 :Nsource "fetch://[user@]machine/path" uses fetch | |
294 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> | |
295 :Nsource "http://[user@]machine/path" uses http uses wget | |
296 :Nsource "rcp://[user@]machine/path" uses rcp | |
297 :Nsource "rsync://[user@]machine[:port]/path" uses rsync | |
298 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp | |
299 :Nsource "sftp://[user@]machine/path" uses sftp | |
300 | |
5929 | 301 DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2 |
1621 | 302 |
303 One may browse a directory to get a listing by simply attempting to | |
304 edit the directory: > | |
305 | |
306 :e scp://[user]@hostname/path/ | |
307 :e ftp://[user]@hostname/path/ | |
308 < | |
2908 | 309 For remote directory listings (ie. those using scp or ftp), that |
310 trailing "/" is necessary (the slash tells netrw to treat the argument | |
311 as a directory to browse instead of as a file to download). | |
312 | |
313 The Nread command may also be used to accomplish this (again, that | |
314 trailing slash is necessary): > | |
315 | |
316 :Nread [protocol]://[user]@hostname/path/ | |
317 < | |
1621 | 318 *netrw-login* *netrw-password* |
319 CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2 | |
1209 | 320 |
7 | 321 Attempts to use ftp will prompt you for a user-id and a password. |
3153 | 322 These will be saved in global variables |g:netrw_uid| and |
323 |s:netrw_passwd|; subsequent use of ftp will re-use those two strings, | |
324 thereby simplifying use of ftp. However, if you need to use a | |
325 different user id and/or password, you'll want to call |NetUserPass()| | |
1209 | 326 first. To work around the need to enter passwords, check if your ftp |
327 supports a <.netrc> file in your home directory. Also see | |
328 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how | |
3153 | 329 to not need to use passwords for scp, look at |netrw-ssh-hack|). |
7 | 330 |
331 :NetUserPass [uid [password]] -- prompts as needed | |
332 :call NetUserPass() -- prompts for uid and password | |
333 :call NetUserPass("uid") -- prompts for password | |
334 :call NetUserPass("uid","password") -- sets global uid and password | |
335 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
336 (Related topics: |ftp| |netrw-userpass| |netrw-start|) |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
337 |
1621 | 338 NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2 |
3456 | 339 (Also see: |
340 |netrw-browser-var| : netrw browser option variables | |
341 |netrw-protocol| : file transfer protocol option variables | |
342 |netrw-settings| : additional file transfer options | |
343 |netrw-browser-options| : these options affect browsing directories | |
344 ) | |
1621 | 345 |
346 Netrw provides a lot of variables which allow you to customize netrw to your | |
347 preferences. One way to look at them is via the command :NetrwSettings (see | |
348 |netrw-settings|) which will display your current netrw settings. Most such | |
349 settings are described below, in |netrw-browser-options|, and in | |
350 |netrw-externapp|: | |
1121 | 351 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
352 *b:netrw_lastfile* last file Network-read/written retained on a |
3456 | 353 per-buffer basis (supports plain :Nw ) |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
354 |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
355 *g:netrw_bufsettings* the settings that netrw buffers have |
6476 | 356 (default) noma nomod nonu nowrap ro nobl |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
357 |
5929 | 358 *g:netrw_chgwin* specifies a window number where subsequent file edits |
359 will take place. (also see |netrw-C|) | |
360 (default) -1 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
361 |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
362 *g:Netrw_funcref* specifies a function (or functions) to be called when |
3456 | 363 netrw edits a file. The file is first edited, and |
364 then the function reference (|Funcref|) is called. | |
365 This variable may also hold a |List| of Funcrefs. | |
366 (default) not defined. (the capital in g:Netrw... | |
367 is required by its holding a function reference) | |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
368 > |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
369 Example: place in .vimrc; affects all file opening |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
370 fun! MyFuncRef() |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
371 endfun |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
372 let g:Netrw_funcref= function("MyFuncRef") |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
373 |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
374 < |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
375 *g:Netrw_UserMaps* specifies a function or |List| of functions which can |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
376 be used to set up user-specified maps and functionality. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
377 See |netrw-usermaps| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
378 |
3456 | 379 *g:netrw_ftp* if it doesn't exist, use default ftp |
380 =0 use default ftp (uid password) | |
381 =1 use alternate ftp method (user uid password) | |
382 If you're having trouble with ftp, try changing the | |
383 value of this variable to see if the alternate ftp | |
384 method works for your setup. | |
385 | |
5929 | 386 *g:netrw_ftp_options* Chosen by default, these options are supposed to |
387 turn interactive prompting off and to restrain ftp | |
388 from attempting auto-login upon initial connection. | |
3456 | 389 However, it appears that not all ftp implementations |
390 support this (ex. ncftp). | |
391 ="-i -n" | |
482 | 392 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
393 *g:netrw_ftpextracmd* default: doesn't exist |
3456 | 394 If this variable exists, then any string it contains |
395 will be placed into the commands set to your ftp | |
396 client. As an example: | |
397 ="passive" | |
1121 | 398 |
482 | 399 *g:netrw_ftpmode* ="binary" (default) |
3456 | 400 ="ascii" |
482 | 401 |
1121 | 402 *g:netrw_ignorenetrc* =0 (default for linux, cygwin) |
3456 | 403 =1 If you have a <.netrc> file but it doesn't work and |
404 you want it ignored, then set this variable as | |
405 shown. (default for Windows + cmd.exe) | |
1121 | 406 |
407 *g:netrw_menu* =0 disable netrw's menu | |
3456 | 408 =1 (default) netrw's menu enabled |
1121 | 409 |
410 *g:netrw_nogx* if this variable exists, then the "gx" map will not | |
3456 | 411 be available (see |netrw-gx|) |
482 | 412 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
413 *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis |
6476 | 414 *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis |
1621 | 415 |
416 *g:netrw_preview* =0 (default) preview window shown in a horizontally | |
3456 | 417 split window |
418 =1 preview window shown in a vertically split window. | |
5929 | 419 Also affects the "previous window" (see |netrw-P|) |
420 in the same way. | |
6476 | 421 The |g:netrw_alto| variable may be used to provide |
422 additional splitting control: | |
423 g:netrw_preview g:netrw_alto result | |
424 0 0 |:aboveleft| | |
425 0 1 |:belowright| | |
426 1 0 |:topleft| | |
427 1 1 |:botright| | |
428 To control sizing, see |g:netrw_winsize| | |
3456 | 429 |
430 *g:netrw_scpport* = "-P" : option to use to set port for scp | |
431 *g:netrw_sshport* = "-p" : option to use to set port for ssh | |
432 | |
6476 | 433 *g:netrw_sepchr* =\0xff |
3456 | 434 =\0x01 for enc == euc-jp (and perhaps it should be for |
435 others, too, please let me know) | |
436 Separates priority codes from filenames internally. | |
437 See |netrw-p12|. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
438 |
1621 | 439 *g:netrw_silent* =0 : transfers done normally |
3456 | 440 =1 : transfers done silently |
1621 | 441 |
1209 | 442 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one |
3456 | 443 line window. This window provides reliable |
2432
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
444 delivery of messages. (default) |
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
445 =0 : messages from netrw will use echoerr ; |
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
446 messages don't always seem to show up this |
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
447 way, but one doesn't have to quit the window. |
1209 | 448 |
482 | 449 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank |
3456 | 450 lines that o/s's ftp "provides" on transfers |
451 =0 force normal ftp behavior (no trailing line removal) | |
452 | |
6476 | 453 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also |
3456 | 454 permits network browsing to use ls with time and |
455 size sorting (default if windows) | |
456 =0 assume Windows' scp accepts windows-style paths | |
457 Network browsing uses dir instead of ls | |
458 This option is ignored if you're using unix | |
482 | 459 |
460 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP | |
3456 | 461 =1 use WinNT's rcp in binary mode (default) |
22 | 462 |
1621 | 463 PATHS *netrw-path* {{{2 |
466 | 464 |
482 | 465 Paths to files are generally user-directory relative for most protocols. |
466 It is possible that some protocol will make paths relative to some | |
467 associated directory, however. | |
468 > | |
469 example: vim scp://user@host/somefile | |
470 example: vim scp://user@host/subdir1/subdir2/somefile | |
471 < | |
1621 | 472 where "somefile" is in the "user"'s home directory. If you wish to get a |
482 | 473 file using root-relative paths, use the full path: |
474 > | |
475 example: vim scp://user@host//somefile | |
476 example: vim scp://user@host//subdir1/subdir2/somefile | |
477 < | |
7 | 478 |
479 ============================================================================== | |
1621 | 480 4. Network-Oriented File Transfer *netrw-xfer* {{{1 |
7 | 481 |
482 Network-oriented file transfer under Vim is implemented by a VimL-based script | |
559 | 483 (<netrw.vim>) using plugin techniques. It currently supports both reading and |
484 writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch, | |
7 | 485 dav/cadaver, rsync, or sftp. |
486 | |
487 http is currently supported read-only via use of wget or fetch. | |
488 | |
489 <netrw.vim> is a standard plugin which acts as glue between Vim and the | |
490 various file transfer programs. It uses autocommand events (BufReadCmd, | |
491 FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. > | |
492 | |
493 ex. vim ftp://hostname/path/to/file | |
494 < | |
559 | 495 The characters preceding the colon specify the protocol to use; in the |
1621 | 496 example, it's ftp. The <netrw.vim> script then formulates a command or a |
559 | 497 series of commands (typically ftp) which it issues to an external program |
498 (ftp, scp, etc) which does the actual file transfer/protocol. Files are read | |
499 from/written to a temporary file (under Unix/Linux, /tmp/...) which the | |
500 <netrw.vim> script will clean up. | |
7 | 501 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
502 Now, a word about Jan Minář's "FTP User Name and Password Disclosure"; first, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
503 ftp is not a secure protocol. User names and passwords are transmitted "in |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
504 the clear" over the internet; any snooper tool can pick these up; this is not |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
505 a netrw thing, this is a ftp thing. If you're concerned about this, please |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
506 try to use scp or sftp instead. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
507 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
508 Netrw re-uses the user id and password during the same vim session and so long |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
509 as the remote hostname remains the same. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
510 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
511 Jan seems to be a bit confused about how netrw handles ftp; normally multiple |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
512 commands are performed in a "ftp session", and he seems to feel that the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
513 uid/password should only be retained over one ftp session. However, netrw |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
514 does every ftp operation in a separate "ftp session"; so remembering the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
515 uid/password for just one "ftp session" would be the same as not remembering |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
516 the uid/password at all. IMHO this would rapidly grow tiresome as one |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
517 browsed remote directories, for example. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
518 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
519 On the other hand, thanks go to Jan M. for pointing out the many |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
520 vulnerabilities that netrw (and vim itself) had had in handling "crafted" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
521 filenames. The |shellescape()| and |fnameescape()| functions were written in |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
522 response by Bram Moolenaar to handle these sort of problems, and netrw has |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
523 been modified to use them. Still, my advice is, if the "filename" looks like |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
524 a vim command that you aren't comfortable with having executed, don't open it. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
525 |
1121 | 526 *netrw-putty* *netrw-pscp* *netrw-psftp* |
559 | 527 One may modify any protocol's implementing external application by setting a |
528 variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to | |
794 | 529 "scp -q"). As an example, consider using PuTTY: > |
1121 | 530 |
531 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch' | |
532 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"' | |
794 | 533 < |
3153 | 534 (note: it has been reported that windows 7 with putty v0.6's "-batch" option |
535 doesn't work, so its best to leave it off for that system) | |
536 | |
1121 | 537 See |netrw-p8| for more about putty, pscp, psftp, etc. |
538 | |
7 | 539 Ftp, an old protocol, seems to be blessed by numerous implementations. |
559 | 540 Unfortunately, some implementations are noisy (ie., add junk to the end of the |
541 file). Thus, concerned users may decide to write a NetReadFixup() function | |
542 that will clean up after reading with their ftp. Some Unix systems (ie., | |
543 FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is | |
544 not noisy and more convenient, actually, for <netrw.vim> to use. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
545 Consequently, if "fetch" is available (ie. executable), it may be preferable |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
546 to use it for ftp://... based transfers. |
7 | 547 |
548 For rcp, scp, sftp, and http, one may use network-oriented file transfers | |
459 | 549 transparently; ie. |
7 | 550 > |
551 vim rcp://[user@]machine/path | |
552 vim scp://[user@]machine/path | |
553 < | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
554 If your ftp supports <.netrc>, then it too can be transparently used |
7 | 555 if the needed triad of machine name, user id, and password are present in |
556 that file. Your ftp must be able to use the <.netrc> file on its own, however. | |
557 > | |
558 vim ftp://[user@]machine[[:#]portnumber]/path | |
559 < | |
2751 | 560 Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses |
561 an option, -s:filename (filename can and probably should be a full path) | |
562 which contains ftp commands which will be automatically run whenever ftp | |
563 starts. You may use this feature to enter a user and password for one site: > | |
564 userid | |
565 password | |
5929 | 566 < *netrw-windows-netrc* *netrw-windows-s* |
567 If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines | |
568 only) netrw will substitute the current machine name requested for ftp | |
569 connections for MACHINE. Hence one can have multiple machine.ftp files | |
570 containing login and password for ftp. Example: > | |
2751 | 571 |
4339 | 572 let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE' |
573 vim ftp://myhost.somewhere.net/ | |
5929 | 574 |
2751 | 575 will use a file > |
5929 | 576 |
2751 | 577 C:\Users\Myself\myhost.ftp |
578 < | |
579 Often, ftp will need to query the user for the userid and password. | |
459 | 580 The latter will be done "silently"; ie. asterisks will show up instead of |
7 | 581 the actually-typed-in password. Netrw will retain the userid and password |
582 for subsequent read/writes from the most recent transfer so subsequent | |
583 transfers (read/write) to or from that machine will take place without | |
584 additional prompting. | |
585 | |
586 *netrw-urls* | |
587 +=================================+============================+============+ | |
1121 | 588 | Reading | Writing | Uses | |
7 | 589 +=================================+============================+============+ |
1121 | 590 | DAV: | | | |
591 | dav://host/path | | cadaver | | |
592 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | | |
7 | 593 +---------------------------------+----------------------------+------------+ |
1621 | 594 | DAV + SSL: | | | |
595 | davs://host/path | | cadaver | | |
596 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver | | |
597 +---------------------------------+----------------------------+------------+ | |
1121 | 598 | FETCH: | | | |
599 | fetch://[user@]host/path | | | | |
600 | fetch://[user@]host:http/path | Not Available | fetch | | |
601 | :Nread fetch://[user@]host/path| | | | |
7 | 602 +---------------------------------+----------------------------+------------+ |
1121 | 603 | FILE: | | | |
604 | file:///* | file:///* | | | |
605 | file://localhost/* | file://localhost/* | | | |
7 | 606 +---------------------------------+----------------------------+------------+ |
1121 | 607 | FTP: (*3) | (*3) | | |
608 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) | | |
609 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc | | |
610 | :Nread host path | :Nwrite host path | ftp+.netrc | | |
611 | :Nread host uid pass path | :Nwrite host uid pass path | ftp | | |
7 | 612 +---------------------------------+----------------------------+------------+ |
1121 | 613 | HTTP: wget is executable: (*4) | | | |
614 | http://[user@]host/path | Not Available | wget | | |
7 | 615 +---------------------------------+----------------------------+------------+ |
1121 | 616 | HTTP: fetch is executable (*4) | | | |
617 | http://[user@]host/path | Not Available | fetch | | |
7 | 618 +---------------------------------+----------------------------+------------+ |
1121 | 619 | RCP: | | | |
620 | rcp://[user@]host/path | rcp://[user@]host/path | rcp | | |
7 | 621 +---------------------------------+----------------------------+------------+ |
1121 | 622 | RSYNC: | | | |
623 | rsync://[user@]host/path | rsync://[user@]host/path | rsync | | |
624 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync | | |
625 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp | | |
7 | 626 +---------------------------------+----------------------------+------------+ |
1121 | 627 | SCP: | | | |
628 | scp://[user@]host/path | scp://[user@]host/path | scp | | |
629 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) | | |
7 | 630 +---------------------------------+----------------------------+------------+ |
1121 | 631 | SFTP: | | | |
632 | sftp://[user@]host/path | sftp://[user@]host/path | sftp | | |
633 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) | | |
7 | 634 +=================================+============================+============+ |
635 | |
636 (*1) For an absolute path use scp://machine//path. | |
637 | |
638 (*2) if <.netrc> is present, it is assumed that it will | |
639 work with your ftp client. Otherwise the script will | |
1121 | 640 prompt for user-id and password. |
7 | 641 |
1121 | 642 (*3) for ftp, "machine" may be machine#port or machine:port |
7 | 643 if a different port is needed than the standard ftp port |
644 | |
645 (*4) for http:..., if wget is available it will be used. Otherwise, | |
646 if fetch is available it will be used. | |
647 | |
648 Both the :Nread and the :Nwrite ex-commands can accept multiple filenames. | |
649 | |
650 | |
651 NETRC *netrw-netrc* | |
652 | |
1621 | 653 The <.netrc> file, typically located in your home directory, contains lines |
654 therein which map a hostname (machine name) to the user id and password you | |
655 prefer to use with it. | |
656 | |
7 | 657 The typical syntax for lines in a <.netrc> file is given as shown below. |
799 | 658 Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't. |
7 | 659 > |
660 machine {full machine name} login {user-id} password "{password}" | |
661 default login {user-id} password "{password}" | |
662 | |
663 Your ftp client must handle the use of <.netrc> on its own, but if the | |
664 <.netrc> file exists, an ftp transfer will not ask for the user-id or | |
665 password. | |
666 | |
667 Note: | |
668 Since this file contains passwords, make very sure nobody else can | |
669 read this file! Most programs will refuse to use a .netrc that is | |
670 readable for others. Don't forget that the system administrator can | |
1621 | 671 still read the file! Ie. for Linux/Unix: chmod 600 .netrc |
7 | 672 |
3456 | 673 Even though Windows' ftp clients typically do not support .netrc, netrw has |
674 a work-around: see |netrw-windows-s|. | |
675 | |
7 | 676 |
677 PASSWORD *netrw-passwd* | |
678 | |
679 The script attempts to get passwords for ftp invisibly using |inputsecret()|, | |
2432
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
680 a built-in Vim function. See |netrw-userpass| for how to change the password |
7 | 681 after one has set it. |
682 | |
559 | 683 Unfortunately there doesn't appear to be a way for netrw to feed a password to |
684 scp. Thus every transfer via scp will require re-entry of the password. | |
1621 | 685 However, |netrw-ssh-hack| can help with this problem. |
7 | 686 |
687 | |
688 ============================================================================== | |
1621 | 689 5. Activation *netrw-activate* {{{1 |
7 | 690 |
799 | 691 Network-oriented file transfers are available by default whenever Vim's |
1621 | 692 |'nocompatible'| mode is enabled. Netrw's script files reside in your |
693 system's plugin, autoload, and syntax directories; just the | |
694 plugin/netrwPlugin.vim script is sourced automatically whenever you bring up | |
695 vim. The main script in autoload/netrw.vim is only loaded when you actually | |
696 use netrw. I suggest that, at a minimum, you have at least the following in | |
697 your <.vimrc> customization file: > | |
799 | 698 |
559 | 699 set nocp |
700 if version >= 600 | |
701 filetype plugin indent on | |
702 endif | |
703 < | |
6476 | 704 By also including the following lines in your .vimrc, one may have netrw |
705 immediately activate when using [g]vim without any filenames, showing the | |
706 current directory: > | |
707 | |
708 " Augroup VimStartup: | |
709 augroup VimStartup | |
710 au! | |
711 au VimEnter * if expand("%") == "" | e . | endif | |
712 augroup END | |
713 < | |
7 | 714 |
715 ============================================================================== | |
5929 | 716 6. Transparent Remote File Editing *netrw-transparent* {{{1 |
7 | 717 |
718 Transparent file transfers occur whenever a regular file read or write | |
1621 | 719 (invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd| |
720 events) is made. Thus one may read, write, or source files across networks | |
721 just as easily as if they were local files! > | |
7 | 722 |
723 vim ftp://[user@]machine/path | |
724 ... | |
725 :wq | |
726 | |
559 | 727 See |netrw-activate| for more on how to encourage your vim to use plugins |
728 such as netrw. | |
7 | 729 |
799 | 730 |
7 | 731 ============================================================================== |
1621 | 732 7. Ex Commands *netrw-ex* {{{1 |
7 | 733 |
799 | 734 The usual read/write commands are supported. There are also a few |
1621 | 735 additional commands available. Often you won't need to use Nwrite or |
1121 | 736 Nread as shown in |netrw-transparent| (ie. simply use > |
737 :e url | |
738 :r url | |
739 :w url | |
740 instead, as appropriate) -- see |netrw-urls|. In the explanations | |
741 below, a {netfile} is an url to a remote file. | |
7 | 742 |
2152 | 743 *:Nwrite* *:Nw* |
1621 | 744 :[range]Nw[rite] Write the specified lines to the current |
7 | 745 file as specified in b:netrw_lastfile. |
2152 | 746 (related: |netrw-nwrite|) |
7 | 747 |
1621 | 748 :[range]Nw[rite] {netfile} [{netfile}]... |
7 | 749 Write the specified lines to the {netfile}. |
750 | |
2152 | 751 *:Nread* *:Nr* |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
752 :Nr[ead] Read the lines from the file specified in b:netrw_lastfile |
2152 | 753 into the current buffer. (related: |netrw-nread|) |
7 | 754 |
1621 | 755 :Nr[ead] {netfile} {netfile}... |
7 | 756 Read the {netfile} after the current line. |
757 | |
2152 | 758 *:Nsource* *:Ns* |
1621 | 759 :Ns[ource] {netfile} |
1121 | 760 Source the {netfile}. |
761 To start up vim using a remote .vimrc, one may use | |
762 the following (all on one line) (tnx to Antoine Mechelynck) > | |
763 vim -u NORC -N | |
764 --cmd "runtime plugin/netrwPlugin.vim" | |
765 --cmd "source scp://HOSTNAME/.vimrc" | |
2152 | 766 < (related: |netrw-source|) |
767 | |
768 :call NetUserPass() *NetUserPass()* | |
1621 | 769 If g:netrw_uid and s:netrw_passwd don't exist, |
770 this function will query the user for them. | |
2152 | 771 (related: |netrw-userpass|) |
7 | 772 |
773 :call NetUserPass("userid") | |
1621 | 774 This call will set the g:netrw_uid and, if |
7 | 775 the password doesn't exist, will query the user for it. |
2152 | 776 (related: |netrw-userpass|) |
7 | 777 |
778 :call NetUserPass("userid","passwd") | |
1621 | 779 This call will set both the g:netrw_uid and s:netrw_passwd. |
7 | 780 The user-id and password are used by ftp transfers. One may |
1621 | 781 effectively remove the user-id and password by using empty |
782 strings (ie. ""). | |
2152 | 783 (related: |netrw-userpass|) |
7 | 784 |
1121 | 785 :NetrwSettings This command is described in |netrw-settings| -- used to |
786 display netrw settings and change netrw behavior. | |
482 | 787 |
7 | 788 |
789 ============================================================================== | |
5929 | 790 8. Variables and Options *netrw-var* *netrw-settings* {{{1 |
3153 | 791 |
792 (also see: |netrw-options| |netrw-variables| |netrw-protocol| | |
3456 | 793 |netrw-browser-settings| |netrw-browser-options| ) |
7 | 794 |
1121 | 795 The <netrw.vim> script provides several variables which act as options to |
1621 | 796 affect <netrw.vim>'s file transfer behavior. These variables typically may be |
797 set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|) | |
3153 | 798 *netrw-options* |
1621 | 799 > |
1121 | 800 ------------- |
801 Netrw Options | |
802 ------------- | |
9 | 803 Option Meaning |
804 -------------- ----------------------------------------------- | |
805 < | |
1121 | 806 b:netrw_col Holds current cursor position (during NetWrite) |
807 g:netrw_cygwin =1 assume scp under windows is from cygwin | |
808 (default/windows) | |
809 =0 assume scp under windows accepts windows | |
810 style paths (default/else) | |
811 g:netrw_ftp =0 use default ftp (uid password) | |
812 g:netrw_ftpmode ="binary" (default) | |
813 ="ascii" (your choice) | |
814 g:netrw_ignorenetrc =1 (default) | |
815 if you have a <.netrc> file but you don't | |
7 | 816 want it used, then set this variable. Its |
817 mere existence is enough to cause <.netrc> | |
818 to be ignored. | |
1121 | 819 b:netrw_lastfile Holds latest method/machine/path. |
820 b:netrw_line Holds current line number (during NetWrite) | |
821 g:netrw_silent =0 transfers done normally | |
822 =1 transfers done silently | |
823 g:netrw_uid Holds current user-id for ftp. | |
824 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) | |
825 =1 use WinNT/2K/XP's rcp, binary mode | |
826 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc | |
827 =1 use default method to do ftp > | |
9 | 828 ----------------------------------------------------------------------- |
829 < | |
5929 | 830 *netrw-internal-variables* |
7 | 831 The script will also make use of the following variables internally, albeit |
832 temporarily. | |
9 | 833 > |
834 ------------------- | |
835 Temporary Variables | |
836 ------------------- | |
837 Variable Meaning | |
838 -------- ------------------------------------ | |
839 < | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
840 b:netrw_method Index indicating rcp/ftp+.netrc/ftp |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
841 w:netrw_method (same as b:netrw_method) |
7 | 842 g:netrw_machine Holds machine name parsed from input |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
843 b:netrw_fname Holds filename being accessed > |
9 | 844 ------------------------------------------------------------ |
845 < | |
1621 | 846 *netrw-protocol* |
7 | 847 |
9 | 848 Netrw supports a number of protocols. These protocols are invoked using the |
849 variables listed below, and may be modified by the user. | |
7 | 850 > |
851 ------------------------ | |
1121 | 852 Protocol Control Options |
7 | 853 ------------------------ |
1121 | 854 Option Type Setting Meaning |
855 --------- -------- -------------- --------------------------- | |
5618 | 856 < netrw_ftp variable =doesn't exist userid set by "user userid" |
1121 | 857 =0 userid set by "user userid" |
858 =1 userid set by "userid" | |
859 NetReadFixup function =doesn't exist no change | |
860 =exists Allows user to have files | |
861 read via ftp automatically | |
862 transformed however they wish | |
863 by NetReadFixup() | |
5618 | 864 g:netrw_dav_cmd var ="cadaver" if cadaver is executable |
865 g:netrw_dav_cmd var ="curl -o" elseif curl is executable | |
866 g:netrw_fetch_cmd var ="fetch -o" if fetch is available | |
867 g:netrw_ftp_cmd var ="ftp" | |
868 g:netrw_http_cmd var ="fetch -o" if fetch is available | |
869 g:netrw_http_cmd var ="wget -O" else if wget is available | |
870 g:netrw_http_put_cmd var ="curl -T" | |
6476 | 871 |g:netrw_list_cmd| var ="ssh USEPORT HOSTNAME ls -Fa" |
5618 | 872 g:netrw_rcp_cmd var ="rcp" |
873 g:netrw_rsync_cmd var ="rsync -a" | |
874 g:netrw_scp_cmd var ="scp -q" | |
875 g:netrw_sftp_cmd var ="sftp" > | |
9 | 876 ------------------------------------------------------------------------- |
7 | 877 < |
12 | 878 *netrw-ftp* |
1121 | 879 |
880 The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|) | |
881 specify the external program to use handle the ftp protocol. They may | |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
882 include command line options (such as -p for passive mode). Example: > |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
883 |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
884 let g:netrw_ftp_cmd= "ftp -p" |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
885 < |
1121 | 886 Browsing is supported by using the |g:netrw_list_cmd|; the substring |
887 "HOSTNAME" will be changed via substitution with whatever the current request | |
888 is for a hostname. | |
7 | 889 |
1121 | 890 Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's |
891 that give trouble . In order to best understand how to use these options if | |
892 ftp is giving you troubles, a bit of discussion is provided on how netrw does | |
893 ftp reads. | |
9 | 894 |
895 For ftp, netrw typically builds up lines of one of the following formats in a | |
7 | 896 temporary file: |
897 > | |
898 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1 | |
899 ---------------------------------- ------------------------------ | |
9 | 900 < |
1121 | 901 open machine [port] open machine [port] |
902 user userid password userid password | |
903 [g:netrw_ftpmode] password | |
2432
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
904 [g:netrw_ftpextracmd] [g:netrw_ftpmode] |
1121 | 905 get filename tempfile [g:netrw_extracmd] |
906 get filename tempfile > | |
9 | 907 --------------------------------------------------------------------- |
7 | 908 < |
2432
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
909 The |g:netrw_ftpmode| and |g:netrw_ftpextracmd| are optional. |
1121 | 910 |
7 | 911 Netrw then executes the lines above by use of a filter: |
912 > | |
913 :%! {g:netrw_ftp_cmd} -i [-n] | |
914 < | |
915 where | |
916 g:netrw_ftp_cmd is usually "ftp", | |
917 -i tells ftp not to be interactive | |
918 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>) | |
919 | |
920 If <.netrc> exists it will be used to avoid having to query the user for | |
9 | 921 userid and password. The transferred file is put into a temporary file. |
7 | 922 The temporary file is then read into the main editing session window that |
923 requested it and the temporary file deleted. | |
924 | |
559 | 925 If your ftp doesn't accept the "user" command and immediately just demands a |
926 userid, then try putting "let netrw_ftp=1" in your <.vimrc>. | |
7 | 927 |
12 | 928 *netrw-cadaver* |
929 To handle the SSL certificate dialog for untrusted servers, one may pull | |
930 down the certificate and place it into /usr/ssl/cert.pem. This operation | |
931 renders the server treatment as "trusted". | |
932 | |
794 | 933 *netrw-fixup* *netreadfixup* |
7 | 934 If your ftp for whatever reason generates unwanted lines (such as AUTH |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
935 messages) you may write a NetReadFixup() function: |
7 | 936 > |
937 function! NetReadFixup(method,line1,line2) | |
938 " a:line1: first new line in current file | |
939 " a:line2: last new line in current file | |
940 if a:method == 1 "rcp | |
941 elseif a:method == 2 "ftp + <.netrc> | |
942 elseif a:method == 3 "ftp + machine,uid,password,filename | |
943 elseif a:method == 4 "scp | |
944 elseif a:method == 5 "http/wget | |
945 elseif a:method == 6 "dav/cadaver | |
946 elseif a:method == 7 "rsync | |
947 elseif a:method == 8 "fetch | |
948 elseif a:method == 9 "sftp | |
1121 | 949 else " complain |
7 | 950 endif |
951 endfunction | |
952 > | |
559 | 953 The NetReadFixup() function will be called if it exists and thus allows you to |
954 customize your reading process. As a further example, <netrw.vim> contains | |
955 just such a function to handle Windows 95 ftp. For whatever reason, Windows | |
956 95's ftp dumps four blank lines at the end of a transfer, and so it is | |
957 desirable to automate their removal. Here's some code taken from <netrw.vim> | |
958 itself: | |
7 | 959 > |
960 if has("win95") && g:netrw_win95ftp | |
9 | 961 fun! NetReadFixup(method, line1, line2) |
7 | 962 if method == 3 " ftp (no <.netrc>) |
1121 | 963 let fourblanklines= line2 - 3 |
964 silent fourblanklines.",".line2."g/^\s*/d" | |
7 | 965 endif |
966 endfunction | |
967 endif | |
968 > | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
969 (Related topics: |ftp| |netrw-userpass| |netrw-start|) |
7 | 970 |
971 ============================================================================== | |
1621 | 972 9. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
973 *netrw-browser* *netrw-dir* *netrw-list* |
1621 | 974 |
975 INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2 | |
976 (Quick References: |netrw-quickmaps| |netrw-quickcoms|) | |
977 | |
978 Netrw supports the browsing of directories on your local system and on remote | |
979 hosts; browsing includes listing files and directories, entering directories, | |
980 editing files therein, deleting files/directories, making new directories, | |
981 moving (renaming) files and directories, copying files and directories, etc. | |
982 One may mark files and execute any system command on them! The Netrw browser | |
983 generally implements the previous explorer's maps and commands for remote | |
984 directories, although details (such as pertinent global variable names) | |
985 necessarily differ. To browse a directory, simply "edit" it! > | |
986 | |
987 vim /your/directory/ | |
988 vim . | |
989 vim c:\your\directory\ | |
990 < | |
991 (Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t| | |
992 |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| ) | |
22 | 993 |
994 The Netrw remote file and directory browser handles two protocols: ssh and | |
1621 | 995 ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp |
996 in its remote browsing. Specifying any other protocol will cause it to be | |
997 used for file transfers; but the ssh protocol will be used to do remote | |
998 browsing. | |
999 | |
1000 To use Netrw's remote directory browser, simply attempt to read a "file" with | |
1001 a trailing slash and it will be interpreted as a request to list a directory: | |
1002 > | |
9 | 1003 vim [protocol]://[user@]hostname/path/ |
1621 | 1004 < |
1005 where [protocol] is typically scp or ftp. As an example, try: > | |
1006 | |
1007 vim ftp://ftp.home.vim.org/pub/vim/ | |
719 | 1008 < |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1009 For local directories, the trailing slash is not required. Again, because it's |
1621 | 1010 easy to miss: to browse remote directories, the url must terminate with a |
1011 slash! | |
1012 | |
1013 If you'd like to avoid entering the password repeatedly for remote directory | |
1014 listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with | |
1015 ftp, see |netrw-netrc| (if your ftp supports it). | |
1016 | |
1017 There are several things you can do to affect the browser's display of files: | |
1018 | |
1019 * To change the listing style, press the "i" key (|netrw-i|). | |
1020 Currently there are four styles: thin, long, wide, and tree. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1021 To make that change "permanent", see |g:netrw_liststyle|. |
1621 | 1022 |
1023 * To hide files (don't want to see those xyz~ files anymore?) see | |
1024 |netrw-ctrl-h|. | |
1025 | |
1026 * Press s to sort files by name, time, or size. | |
1027 | |
1028 See |netrw-browse-cmds| for all the things you can do with netrw! | |
1029 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1030 *netrw-getftype* *netrw-filigree* *netrw-ftype* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1031 The |getftype()| function is used to append a bit of filigree to indicate |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1032 filetype to locally listed files: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1033 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1034 directory : / |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1035 executable : * |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1036 fifo : | |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1037 links : @ |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1038 sockets : = |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1039 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1040 The filigree also affects the |g:netrw_sort_sequence|. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1041 |
1621 | 1042 |
1043 QUICK HELP *netrw-quickhelp* {{{2 | |
1044 (Use ctrl-] to select a topic)~ | |
1045 Intro to Browsing...............................|netrw-intro-browse| | |
1046 Quick Reference: Maps.........................|netrw-quickmap| | |
1047 Quick Reference: Commands.....................|netrw-browse-cmds| | |
1048 Hiding | |
1049 Edit hiding list..............................|netrw-ctrl-h| | |
1050 Hiding Files or Directories...................|netrw-a| | |
1051 Hiding/Unhiding by suffix.....................|netrw-mh| | |
1052 Hiding dot-files.............................|netrw-gh| | |
1053 Listing Style | |
1054 Select listing style (thin/long/wide/tree)....|netrw-i| | |
1055 Associated setting variable...................|g:netrw_liststyle| | |
1056 Shell command used to perform listing.........|g:netrw_list_cmd| | |
1057 Quick file info...............................|netrw-qf| | |
1058 Sorted by | |
1059 Select sorting style (name/time/size).........|netrw-s| | |
1060 Editing the sorting sequence..................|netrw-S| | |
1668 | 1061 Sorting options...............................|g:netrw_sort_options| |
1621 | 1062 Associated setting variable...................|g:netrw_sort_sequence| |
1063 Reverse sorting order.........................|netrw-r| | |
1064 | |
1065 | |
1066 *netrw-quickmap* *netrw-quickmaps* | |
1067 QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 | |
466 | 1068 > |
1621 | 1069 --- ----------------- ---- |
1070 Map Quick Explanation Link | |
1071 --- ----------------- ---- | |
1072 < <F1> Causes Netrw to issue help | |
1073 <cr> Netrw will enter the directory or read the file |netrw-cr| | |
1074 <del> Netrw will attempt to remove the file/directory |netrw-del| | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1075 <c-h> Edit file hiding list |netrw-ctrl-h| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1076 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1077 <c-r> Browse using a gvim server |netrw-ctrl-r| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1078 <c-tab> Shrink/expand a netrw/explore window |netrw-c-tab| |
1621 | 1079 - Makes Netrw go up one directory |netrw--| |
1080 a Toggles between normal display, |netrw-a| | |
5929 | 1081 hiding (suppress display of files matching g:netrw_list_hide) |
1082 showing (display only files which match g:netrw_list_hide) | |
1621 | 1083 c Make browsing directory the current directory |netrw-c| |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1084 C Setting the editing window |netrw-C| |
1621 | 1085 d Make a directory |netrw-d| |
1086 D Attempt to remove the file(s)/directory(ies) |netrw-D| | |
1087 gb Go to previous bookmarked directory |netrw-gb| | |
6476 | 1088 gd Force treatment as directory |netrw-gd| |
1089 gf Force treatment as file |netrw-gf| | |
1621 | 1090 gh Quick hide/unhide of dot-files |netrw-gh| |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1091 gn Make top of tree the directory below the cursor |netrw-gn| |
1621 | 1092 i Cycle between thin, long, wide, and tree listings |netrw-i| |
1093 mb Bookmark current directory |netrw-mb| | |
1094 mc Copy marked files to marked-file target directory |netrw-mc| | |
1095 md Apply diff to marked files (up to 3) |netrw-md| | |
1096 me Place marked files on arg list and edit them |netrw-me| | |
1097 mf Mark a file |netrw-mf| | |
6476 | 1098 mF Unmark files |netrw-mF| |
1099 mg Apply vimgrep to marked files |netrw-mg| | |
1621 | 1100 mh Toggle marked file suffices' presence on hiding list |netrw-mh| |
1101 mm Move marked files to marked-file target directory |netrw-mm| | |
1102 mp Print marked files |netrw-mp| | |
6476 | 1103 mr Mark files using a shell-style |regexp| |netrw-mr| |
1621 | 1104 mt Current browsing directory becomes markfile target |netrw-mt| |
1105 mT Apply ctags to marked files |netrw-mT| | |
1106 mu Unmark all marked files |netrw-mu| | |
6476 | 1107 mv Apply arbitrary vim command to marked files |netrw-mv| |
1621 | 1108 mx Apply arbitrary shell command to marked files |netrw-mx| |
6476 | 1109 mX Apply arbitrary shell command to marked files en bloc|netrw-mX| |
1621 | 1110 mz Compress/decompress marked files |netrw-mz| |
1111 o Enter the file/directory under the cursor in a new |netrw-o| | |
5929 | 1112 browser window. A horizontal split is used. |
1621 | 1113 O Obtain a file specified by cursor |netrw-O| |
1114 p Preview the file |netrw-p| | |
1115 P Browse in the previously used window |netrw-P| | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1116 qb List bookmarked directories and history |netrw-qb| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1117 qf Display information on file |netrw-qf| |
6476 | 1118 qF Mark files using a quickfix list |netrw-qF| |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1119 qL Mark files using a |location-list| |netrw-qL| |
1621 | 1120 r Reverse sorting order |netrw-r| |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1121 R Rename the designated file(s)/directory(ies) |netrw-R| |
1621 | 1122 s Select sorting style: by name, time, or file size |netrw-s| |
1123 S Specify suffix priority for name-sorting |netrw-S| | |
1124 t Enter the file/directory under the cursor in a new tab|netrw-t| | |
1125 u Change to recently-visited directory |netrw-u| | |
1126 U Change to subsequently-visited directory |netrw-U| | |
1127 v Enter the file/directory under the cursor in a new |netrw-v| | |
5929 | 1128 browser window. A vertical split is used. |
1621 | 1129 x View file with an associated program |netrw-x| |
3920 | 1130 X Execute filename under cursor via |system()| |netrw-X| |
1621 | 1131 |
1668 | 1132 % Open a new file in netrw's current directory |netrw-%| |
1133 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1134 *netrw-mouse* *netrw-leftmouse* *netrw-middlemouse* *netrw-rightmouse* |
1621 | 1135 <leftmouse> (gvim only) selects word under mouse as if a <cr> |
1136 had been pressed (ie. edit file, change directory) | |
1137 <middlemouse> (gvim only) same as P selecting word under mouse; | |
1138 see |netrw-P| | |
1139 <rightmouse> (gvim only) delete file/directory using word under | |
1140 mouse | |
1141 <2-leftmouse> (gvim only) when: | |
5929 | 1142 * in a netrw-selected file, AND |
6476 | 1143 * |g:netrw_retmap| == 1 AND |
5929 | 1144 * the user doesn't already have a <2-leftmouse> |
4339 | 1145 mapping defined before netrw is autoloaded, |
1621 | 1146 then a double clicked leftmouse button will return |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1147 to the netrw browser window. See |g:netrw_retmap|. |
5618 | 1148 <s-leftmouse> (gvim only) like mf, will mark files. Dragging |
1149 the shifted leftmouse will mark multiple files. | |
1150 (see |netrw-mf|) | |
1621 | 1151 |
2152 | 1152 (to disable mouse buttons while browsing: |g:netrw_mousemaps|) |
1153 | |
1621 | 1154 *netrw-quickcom* *netrw-quickcoms* |
1155 QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2 | |
5618 | 1156 :NetrwClean[!]............................................|netrw-clean| |
1157 :NetrwSettings............................................|netrw-settings| | |
1158 :Ntree....................................................|netrw-ntree| | |
1621 | 1159 :Explore[!] [dir] Explore directory of current file......|netrw-explore| |
1160 :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore| | |
6476 | 1161 :Lexplore[!] [dir] Left Explorer Toggle...................|netrw-explore| |
1621 | 1162 :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| |
1163 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| | |
1164 :Rexplore Return to Explorer.....................|netrw-explore| | |
1165 :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore| | |
1166 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore| | |
1167 :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| | |
1168 | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1169 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1170 BANNER DISPLAY *netrw-I* |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1171 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1172 One may toggle the banner display on and off by pressing "I". |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1173 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1174 Also See: |g:netrw_banner| |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1175 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1176 |
6476 | 1177 BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2 |
1178 | |
1179 One may easily "bookmark" the currently browsed directory by using > | |
1621 | 1180 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1181 mb |
839 | 1182 < |
6476 | 1183 *.netrwbook* |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1184 Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1185 kept in sorted order. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1186 |
6476 | 1187 If there are marked files and/or directories, mb will add them to the bookmark |
1188 list. | |
1189 | |
1190 *netrw-:NetrwMB* | |
1191 Addtionally, one may use :NetrwMB to bookmark files or directories. > | |
1192 | |
1193 :NetrwMB[!] [files/directories] | |
1194 | |
1195 < No bang: enters files/directories into Netrw's bookmark system | |
1196 | |
1197 No argument and in netrw buffer: | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1198 if there are marked files : bookmark marked files |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1199 otherwise : bookmark file/directory under cursor |
6476 | 1200 No argument and not in netrw buffer: bookmarks current open file |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1201 Has arguments : |glob()|s each arg and bookmarks them |
6476 | 1202 |
1203 With bang: deletes files/directories from Netrw's bookmark system | |
1204 | |
1205 The :NetrwMB command is available outside of netrw buffers (once netrw has been | |
1206 invoked in the session). | |
1207 | |
1208 The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By | |
1209 default, its stored on the first directory on the user's |'runtimepath'|. | |
1210 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1211 Related Topics: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1212 |netrw-gb| how to return (go) to a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1213 |netrw-mB| how to delete bookmarks |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1214 |netrw-qb| how to list bookmarks |
6476 | 1215 |g:netrw_home| controls where .netrwbook is kept |
1621 | 1216 |
1217 | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1218 BROWSING *netrw-enter* *netrw-cr* {{{2 |
12 | 1219 |
9 | 1220 Browsing is simple: move the cursor onto a file or directory of interest. |
11 | 1221 Hitting the <cr> (the return key) will select the file or directory. |
1222 Directories will themselves be listed, and files will be opened using the | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1223 protocol given in the original read request. |
559 | 1224 |
1621 | 1225 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that |
1226 two or more spaces delimit filenames and directory names for the long and | |
1227 wide listing formats. Thus, if your filename or directory name has two or | |
1228 more sequential spaces embedded in it, or any trailing spaces, then you'll | |
1229 need to use the "thin" format to select it. | |
519 | 1230 |
650 | 1231 The |g:netrw_browse_split| option, which is zero by default, may be used to |
1621 | 1232 cause the opening of files to be done in a new window or tab instead of the |
1233 default. When the option is one or two, the splitting will be taken | |
1234 horizontally or vertically, respectively. When the option is set to three, a | |
1235 <cr> will cause the file to appear in a new tab. | |
1236 | |
1237 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1238 When using the gui (gvim), one may select a file by pressing the <leftmouse> |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1239 button. In addition, if |
1621 | 1240 |
6476 | 1241 * |g:netrw_retmap| == 1 AND (its default value is 0) |
1621 | 1242 * in a netrw-selected file, AND |
1243 * the user doesn't already have a <2-leftmouse> mapping defined before | |
1244 netrw is loaded | |
1245 | |
1246 then a doubly-clicked leftmouse button will return to the netrw browser | |
1247 window. | |
1248 | |
1249 Netrw attempts to speed up browsing, especially for remote browsing where one | |
1250 may have to enter passwords, by keeping and re-using previously obtained | |
1251 directory listing buffers. The |g:netrw_fastbrowse| variable is used to | |
1252 control this behavior; one may have slow browsing (no buffer re-use), medium | |
1253 speed browsing (re-use directory buffer listings only for remote directories), | |
1254 and fast browsing (re-use directory buffer listings as often as possible). | |
1255 The price for such re-use is that when changes are made (such as new files | |
1256 are introduced into a directory), the listing may become out-of-date. One may | |
1257 always refresh directory listing buffers by pressing ctrl-L (see | |
1258 |netrw-ctrl-l|). | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1259 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1260 *netrw-s-cr* |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1261 Squeezing the Current Tree-Listing Directory~ |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1262 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1263 When the tree listing style is enabled (see |netrw-i|) and one is using |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1264 gvim, then the <s-cr> mapping may be used to squeeze (close) the |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1265 directory currently containing the cursor. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1266 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1267 Otherwise, one may remap a key combination of one's own choice to get |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1268 this effect: > |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1269 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1270 nmap <buffer> <silent> <nowait> YOURKEYCOMBO <Plug>NetrwTreeSqueeze |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1271 < |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1272 Put this line in $HOME/ftplugin/netrw/netrw.vim; it needs to be generated |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1273 for netrw buffers only. |
5734 | 1274 |
6476 | 1275 Related topics: |
1276 |netrw-ctrl-r| |netrw-o| |netrw-p| | |
1277 |netrw-P| |netrw-t| |netrw-v| | |
1278 Associated setting variables: | |
1279 |g:netrw_browse_split| |g:netrw_fastbrowse| | |
1280 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd| | |
1281 |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_browse_reject| | |
1282 |g:netrw_ssh_cmd| |g:netrw_use_noswf| | |
1621 | 1283 |
1284 | |
1285 BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2 | |
1286 | |
1287 Normally one enters a file or directory using the <cr>. However, the "o" map | |
1288 allows one to open a new window to hold the new directory listing or file. A | |
1289 horizontal split is used. (for vertical splitting, see |netrw-v|) | |
1290 | |
1291 Normally, the o key splits the window horizontally with the new window and | |
3153 | 1292 cursor at the top. |
1621 | 1293 |
1294 Associated setting variables: |g:netrw_alto| |g:netrw_winsize| | |
1295 | |
6476 | 1296 Related topics: |
1297 |netrw-ctrl-r| |netrw-o| |netrw-p| | |
1298 |netrw-P| |netrw-t| |netrw-v| | |
3153 | 1299 Associated setting variables: |
1300 |g:netrw_alto| control above/below splitting | |
1301 |g:netrw_winsize| control initial sizing | |
1621 | 1302 |
6476 | 1303 BROWSING WITH A NEW TAB *netrw-t* {{{2 |
1621 | 1304 |
1305 Normally one enters a file or directory using the <cr>. The "t" map | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1306 allows one to open a new window holding the new directory listing or file in |
4339 | 1307 a new tab. |
1308 | |
1309 If you'd like to have the new listing in a background tab, use |gT|. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1310 |
6476 | 1311 Related topics: |
1312 |netrw-ctrl-r| |netrw-o| |netrw-p| | |
1313 |netrw-P| |netrw-t| |netrw-v| | |
3153 | 1314 Associated setting variables: |
1315 |g:netrw_winsize| control initial sizing | |
1621 | 1316 |
1317 BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2 | |
1318 | |
1319 Normally one enters a file or directory using the <cr>. However, the "v" map | |
1320 allows one to open a new window to hold the new directory listing or file. A | |
1321 vertical split is used. (for horizontal splitting, see |netrw-o|) | |
1322 | |
1323 Normally, the v key splits the window vertically with the new window and | |
3153 | 1324 cursor at the left. |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1325 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1326 There is only one tree listing buffer; using "v" on a displayed subdirectory |
1621 | 1327 will split the screen, but the same buffer will be shown twice. |
1328 | |
6476 | 1329 Related topics: |
1330 |netrw-ctrl-r| |netrw-o| |netrw-p| | |
1331 |netrw-P| |netrw-t| |netrw-v| | |
3153 | 1332 Associated setting variables: |
1333 |g:netrw_altv| control right/left splitting | |
1334 |g:netrw_winsize| control initial sizing | |
1335 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1336 |
6476 | 1337 BROWSING USING A GVIM SERVER *netrw-ctrl-r* {{{2 |
1338 | |
1339 One may keep a browsing gvim separate from the gvim being used to edit. | |
1340 Use the <c-r> map on a file (not a directory) in the netrw browser, and it | |
1341 will use a gvim server (see |g:netrw_servername|). Subsequent use of <cr> | |
1342 (see |netrw-cr|) will re-use that server for editing files. | |
1343 | |
1344 Related topics: | |
1345 |netrw-ctrl-r| |netrw-o| |netrw-p| | |
1346 |netrw-P| |netrw-t| |netrw-v| | |
1347 Associated setting variables: | |
1348 |g:netrw_servername| : sets name of server | |
1349 |g:netrw_browse_split| : controls how <cr> will open files | |
1350 | |
1351 | |
1352 CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2 | |
519 | 1353 |
1121 | 1354 The "i" map cycles between the thin, long, wide, and tree listing formats. |
12 | 1355 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1356 The thin listing format gives just the files' and directories' names. |
519 | 1357 |
15 | 1358 The long listing is either based on the "ls" command via ssh for remote |
559 | 1359 directories or displays the filename, file size (in bytes), and the time and |
1360 date of last modification for local directories. With the long listing | |
1361 format, netrw is not able to recognize filenames which have trailing spaces. | |
1362 Use the thin listing format for such files. | |
519 | 1363 |
1121 | 1364 The wide listing format uses two or more contiguous spaces to delineate |
1365 filenames; when using that format, netrw won't be able to recognize or use | |
1366 filenames which have two or more contiguous spaces embedded in the name or any | |
1367 trailing spaces. The thin listing format will, however, work with such files. | |
5929 | 1368 The wide listing format is the most compact. |
1121 | 1369 |
1370 The tree listing format has a top directory followed by files and directories | |
5929 | 1371 preceded by one or more "|"s, which indicate the directory depth. One may |
1372 open and close directories by pressing the <cr> key while atop the directory | |
1373 name. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1374 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1375 One may make a preferred listing style your default; see |g:netrw_liststyle|. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1376 As an example, by putting the following line in your .vimrc, > |
6476 | 1377 let g:netrw_liststyle= 3 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1378 the tree style will become your default listing style. |
15 | 1379 |
3456 | 1380 One typical way to use the netrw tree display is to: > |
1381 | |
1382 vim . | |
1383 (use i until a tree display shows) | |
1384 navigate to a file | |
1385 v (edit as desired in vertically split window) | |
1386 ctrl-w h (to return to the netrw listing) | |
1387 P (edit newly selected file in the previous window) | |
1388 ctrl-w h (to return to the netrw listing) | |
1389 P (edit newly selected file in the previous window) | |
1390 ...etc... | |
1391 < | |
1621 | 1392 Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen| |
1393 |g:netrw_timefmt| |g:netrw_list_cmd| | |
1394 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1395 CHANGE FILE PERMISSION *netrw-gp* {{{2 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1396 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1397 "gp" will ask you for a new permission for the file named under the cursor. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1398 Currently, this only works for local files. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1399 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1400 Associated setting variables: |g:netrw_chgperm| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1401 |
1621 | 1402 |
1403 CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2 | |
1404 | |
1405 To change directory back to a bookmarked directory, use | |
1406 | |
1407 {cnt}gb | |
1408 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1409 Any count may be used to reference any of the bookmarks. |
4339 | 1410 Note that |netrw-qb| shows both bookmarks and history; to go |
1411 to a location stored in the history see |netrw-u| and |netrw-U|. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1412 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1413 Related Topics: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1414 |netrw-mB| how to delete bookmarks |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1415 |netrw-mb| how to make a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1416 |netrw-qb| how to list bookmarks |
1621 | 1417 |
1418 | |
2152 | 1419 CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2 |
36 | 1420 |
1421 Every time you change to a new directory (new for the current session), | |
1422 netrw will save the directory in a recently-visited directory history | |
2751 | 1423 list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the |
36 | 1424 "u" map, one can change to an earlier directory (predecessor). To do |
1425 the opposite, see |netrw-U|. | |
1426 | |
4339 | 1427 The "u" map also accepts counts to go back in the history several slots. |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1428 For your convenience, qb (see |netrw-qb|) lists the history number which may |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1429 be used in that count. |
4339 | 1430 |
6476 | 1431 *.netrwhist* |
4339 | 1432 See |g:netrw_dirhistmax| for how to control the quantity of history stack |
6476 | 1433 slots. The file ".netrwhist" holds history when netrw (and vim) is not |
1434 active. By default, its stored on the first directory on the user's | |
1435 |'runtimepath'|. | |
1436 | |
1437 Related Topics: | |
1438 |netrw-U| changing to a successor directory | |
1439 |g:netrw_home| controls where .netrwhist is kept | |
4339 | 1440 |
36 | 1441 |
1621 | 1442 CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2 |
36 | 1443 |
1444 With the "U" map, one can change to a later directory (successor). | |
1445 This map is the opposite of the "u" map. (see |netrw-u|) Use the | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1446 qb map to list both the bookmarks and history. (see |netrw-qb|) |
1621 | 1447 |
4339 | 1448 The "U" map also accepts counts to go forward in the history several slots. |
1449 | |
1450 See |g:netrw_dirhistmax| for how to control the quantity of history stack | |
1451 slots. | |
1452 | |
1621 | 1453 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1454 CHANGING TREE TOP *netrw-ntree* *:Ntree* *netrw-gn* {{{2 |
5618 | 1455 |
1456 One may specify a new tree top for tree listings using > | |
1457 | |
1458 :Ntree [dirname] | |
1459 | |
1460 Without a "dirname", the current line is used (and any leading depth | |
1461 information is elided). | |
1462 With a "dirname", the specified directory name is used. | |
1463 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1464 The "gn" map will take the word below the cursor and use that for |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1465 changing the top of the tree listing. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1466 |
5618 | 1467 |
6476 | 1468 NETRW CLEAN *netrw-clean* *:NetrwClean* {{{2 |
1621 | 1469 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1470 With NetrwClean one may easily remove netrw from one's home directory; |
1621 | 1471 more precisely, from the first directory on your |'runtimepath'|. |
1472 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1473 With NetrwClean!, netrw will attempt to remove netrw from all directories on |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1474 your |'runtimepath'|. Of course, you have to have write/delete permissions |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1475 correct to do this. |
1621 | 1476 |
1477 With either form of the command, netrw will first ask for confirmation | |
1478 that the removal is in fact what you want to do. If netrw doesn't have | |
1479 permission to remove a file, it will issue an error message. | |
36 | 1480 |
1121 | 1481 *netrw-gx* |
6476 | 1482 CUSTOMIZING BROWSING WITH A SPECIAL HANDLER *netrw-x* *netrw-handler* {{{2 |
1121 | 1483 (also see |netrw_filehandler|) |
650 | 1484 |
1485 Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are | |
6476 | 1486 best seen with a special handler (ie. a tool provided with your computer's |
1487 operating system). Netrw allows one to invoke such special handlers by: > | |
12 | 1488 |
650 | 1489 * when Exploring, hit the "x" key |
1490 * when editing, hit gx with the cursor atop the special filename | |
6476 | 1491 < (latter not available if the |g:netrw_nogx| variable exists) |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1492 |
650 | 1493 Netrw determines which special handler by the following method: |
1494 | |
1495 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to | |
1496 view files. Examples of useful settings (place into your <.vimrc>): > | |
1497 | |
1498 :let g:netrw_browsex_viewer= "kfmclient exec" | |
1499 < or > | |
6476 | 1500 :let g:netrw_browsex_viewer= "xdg-open" |
650 | 1501 < |
6476 | 1502 If g:netrw_browsex_viewer == '-', then netrwFileHandlers#Invoke() will be |
1503 used instead (see |netrw_filehandler|). | |
12 | 1504 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1505 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used. |
650 | 1506 * for Gnome (with gnome-open): gnome-open is used. |
6476 | 1507 * for KDE (with kfmclient) : kfmclient is used |
1621 | 1508 * for Mac OS X : open is used. |
559 | 1509 * otherwise the netrwFileHandler plugin is used. |
482 | 1510 |
1511 The file's suffix is used by these various approaches to determine an | |
559 | 1512 appropriate application to use to "handle" these files. Such things as |
1513 OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps, | |
1514 *.eps) can be handled. | |
482 | 1515 |
6476 | 1516 The gx mapping extends to all buffers; apply "gx" while atop a word and netrw |
1517 will apply a special handler to it (like "x" works when in a netrw buffer). | |
1518 One may also use visual mode (see |visual-start|) to select the text that the | |
1519 special handler will use. Normally gx uses expand("<cfile>") to pick up the | |
1520 text under the cursor; one may change what |expand()| uses via the | |
1521 |g:netrw_gx| variable. Alternatively, one may select the text to be used by | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1522 gx via first making a visual selection (see |visual-block|) or by changing |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1523 the |'isfname'| option (which is global, so netrw doesn't modify it). |
6476 | 1524 |
1525 Associated setting variables: | |
1526 |g:netrw_gx| control how gx picks up the text under the cursor | |
1527 |g:netrw_nogx| prevent gx map while editing | |
1528 | |
650 | 1529 *netrw_filehandler* |
1121 | 1530 |
6476 | 1531 When |g:netrw_browsex_viewer| exists and is "-", then netrw will attempt to |
1532 handle the special file with a vim function. The "x" map applies a function | |
1533 to a file, based on its extension. Of course, the handler function must exist | |
1534 for it to be called! | |
12 | 1535 > |
6476 | 1536 Ex. mypgm.html x -> NFH_html("scp://user@host/some/path/mypgm.html") |
1537 | |
1538 < Users may write their own netrw File Handler functions to | |
1539 support more suffixes with special handling. See | |
1540 <autoload/netrwFileHandlers.vim> for examples on how to make | |
1541 file handler functions. As an example: > | |
12 | 1542 |
1121 | 1543 " NFH_suffix(filename) |
1544 fun! NFH_suffix(filename) | |
1545 ..do something special with filename.. | |
1546 endfun | |
1547 < | |
1548 These functions need to be defined in some file in your .vim/plugin | |
1549 (vimfiles\plugin) directory. Vim's function names may not have punctuation | |
1550 characters (except for the underscore) in them. To support suffices that | |
1551 contain such characters, netrw will first convert the suffix using the | |
1552 following table: > | |
650 | 1553 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1554 @ -> AT ! -> EXCLAMATION % -> PERCENT |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1555 : -> COLON = -> EQUAL ? -> QUESTION |
1121 | 1556 , -> COMMA - -> MINUS ; -> SEMICOLON |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1557 $ -> DOLLAR + -> PLUS ~ -> TILDE |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1558 < |
1121 | 1559 So, for example: > |
650 | 1560 |
1121 | 1561 file.rcs,v -> NFH_rcsCOMMAv() |
1562 < | |
1563 If more such translations are necessary, please send me email: > | |
1564 NdrOchip at ScampbellPfamily.AbizM - NOSPAM | |
1565 with a request. | |
482 | 1566 |
1621 | 1567 Associated setting variable: |g:netrw_browsex_viewer| |
1568 | |
1569 *netrw-curdir* | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1570 DELETING BOOKMARKS *netrw-mB* {{{2 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1571 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1572 To delete a bookmark, use > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1573 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1574 {cnt}mB |
6476 | 1575 |
1576 If there are marked files, then mB will remove them from the | |
1577 bookmark list. | |
1578 | |
1579 Alternatively, one may use :NetrwMB! (see |netrw-:NetrwMB|). > | |
1580 | |
1581 :NetrwMB! [files/directories] | |
1582 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1583 Related Topics: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1584 |netrw-gb| how to return (go) to a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1585 |netrw-mb| how to make a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1586 |netrw-qb| how to list bookmarks |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1587 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1588 |
1621 | 1589 DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2 |
1590 | |
1591 If files have not been marked with |netrw-mf|: (local marked file list) | |
1592 | |
1593 Deleting/removing files and directories involves moving the cursor to the | |
1594 file/directory to be deleted and pressing "D". Directories must be empty | |
1595 first before they can be successfully removed. If the directory is a | |
1596 softlink to a directory, then netrw will make two requests to remove the | |
1597 directory before succeeding. Netrw will ask for confirmation before doing | |
1598 the removal(s). You may select a range of lines with the "V" command | |
1599 (visual selection), and then pressing "D". | |
1600 | |
1601 If files have been marked with |netrw-mf|: (local marked file list) | |
1602 | |
1603 Marked files (and empty directories) will be deleted; again, you'll be | |
1604 asked to confirm the deletion before it actually takes place. | |
1605 | |
5929 | 1606 A further approach is to delete files which match a pattern. |
1607 | |
1608 * use :MF pattern (see |netrw-:MF|); then press "D". | |
1609 | |
1610 * use mr (see |netrw-mr|) which will prompt you for pattern. | |
1611 This will cause the matching files to be marked. Then, | |
1612 press "D". | |
1613 | |
1621 | 1614 The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are |
5929 | 1615 used to control the attempts to remove remote files and directories. The |
1621 | 1616 g:netrw_rm_cmd is used with files, and its default value is: |
1617 | |
1618 g:netrw_rm_cmd: ssh HOSTNAME rm | |
1619 | |
1620 The g:netrw_rmdir_cmd variable is used to support the removal of directories. | |
1621 Its default value is: | |
1622 | |
5929 | 1623 |g:netrw_rmdir_cmd|: ssh HOSTNAME rmdir |
1621 | 1624 |
1625 If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt | |
1626 to remove it again using the g:netrw_rmf_cmd variable. Its default value is: | |
1627 | |
5929 | 1628 |g:netrw_rmf_cmd|: ssh HOSTNAME rm -f |
1621 | 1629 |
3153 | 1630 Related topics: |netrw-d| |
3456 | 1631 Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd| |
1621 | 1632 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd| |
1633 | |
1634 | |
1635 *netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore* | |
5618 | 1636 *netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore* *netrw-lexplore* |
1621 | 1637 DIRECTORY EXPLORATION COMMANDS {{{2 |
1638 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1639 :[N]Explore[!] [dir]... Explore directory of current file *:Explore* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1640 :[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore* |
6476 | 1641 :[N]Lexplore[!] [dir]... Left Explorer Toggle *:Lexplore* |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1642 :[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1643 :[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore* |
6476 | 1644 :Texplore [dir]... Tab & Explore *:Texplore* |
1645 :Rexplore ... Return to/from Explorer *:Rexplore* | |
1621 | 1646 |
1647 Used with :Explore **/pattern : (also see |netrw-starstar|) | |
1648 :Nexplore............. go to next matching file *:Nexplore* | |
1649 :Pexplore............. go to previous matching file *:Pexplore* | |
1650 | |
5734 | 1651 *netrw-:Explore* |
1621 | 1652 :Explore will open the local-directory browser on the current file's |
1653 directory (or on directory [dir] if specified). The window will be | |
6476 | 1654 split only if the file has been modified and |'hidden'| is not set, |
1655 otherwise the browsing window will take over that window. Normally | |
1656 the splitting is taken horizontally. | |
5734 | 1657 Also see: |netrw-:Rexplore| |
1621 | 1658 :Explore! is like :Explore, but will use vertical splitting. |
6476 | 1659 |
5734 | 1660 *netrw-:Hexplore* |
1621 | 1661 :Hexplore [dir] does an :Explore with |:belowright| horizontal splitting. |
1662 :Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting. | |
6476 | 1663 |
1664 *netrw-:Lexplore* | |
1665 :[N]Lexplore [dir] toggles a full height Explorer window on the left hand side | |
1666 of the current tab. It will open a netrw window on the current | |
1667 directory if [dir] is omitted; a :Lexplore [dir] will show the | |
1668 specified directory in the left-hand side browser display no matter | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1669 from which window the command is issued. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1670 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1671 By default, :Lexplore will change an uninitialized |g:netrw_chgwin| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1672 to 2; edits will thus preferentially be made in window#2. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1673 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1674 The [N] specifies a |g:netrw_winsize| just for the new :Lexplore |
6476 | 1675 window. |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1676 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1677 Those who like this method often also often like tree style displays; |
6476 | 1678 see |g:netrw_liststyle|. |
1679 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1680 Also see: |netrw-C| |g:netrw_browse_split| |g:netrw_wiw| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1681 |netrw-p| |netrw-P| |g:netrw_chgwin| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1682 |netrw-c-tab| |g:netrw_winsize| |
6476 | 1683 |
1684 :[N]Lexplore! is like :Lexplore, except that the full-height Explorer window | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
1685 will open on the right hand side and an uninitialized |g:netrw_chgwin| |
6476 | 1686 will be set to 1. |
1687 | |
1688 *netrw-:Sexplore* | |
1689 :[N]Sexplore will always split the window before invoking the local-directory | |
1690 browser. As with Explore, the splitting is normally done | |
1691 horizontally. | |
1692 :[N]Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically. | |
1693 | |
5734 | 1694 *netrw-:Texplore* |
5618 | 1695 :Texplore [dir] does a |:tabnew| before generating the browser window |
1621 | 1696 |
6476 | 1697 *netrw-:Vexplore* |
1698 :[N]Vexplore [dir] does an :Explore with |:leftabove| vertical splitting. | |
1699 :[N]Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting. | |
1700 | |
1701 The optional parameters are: | |
1702 | |
1703 [N]: This parameter will override |g:netrw_winsize| to specify the quantity of | |
1704 rows and/or columns the new explorer window should have. | |
1705 Otherwise, the |g:netrw_winsize| variable, if it has been specified by the | |
1706 user, is used to control the quantity of rows and/or columns new | |
1707 explorer windows should have. | |
1708 | |
1709 [dir]: By default, these explorer commands use the current file's directory. | |
1710 However, one may explicitly provide a directory (path) to use instead; | |
1711 ie. > | |
1712 | |
1713 :Explore /some/path | |
1714 < | |
5734 | 1715 *netrw-:Rexplore* |
6476 | 1716 :Rexplore This command is a little different from the other Explore commands |
1717 as it doesn't necessarily open an Explorer window. | |
5734 | 1718 |
1719 Return to Explorer~ | |
6476 | 1720 When one edits a file using netrw which can occur, for example, |
1721 when pressing <cr> while the cursor is atop a filename in a netrw | |
1722 browser window, a :Rexplore issued while editing that file will | |
1723 return the display to that of the last netrw browser display in | |
1724 that window. | |
5734 | 1725 |
1726 Return from Explorer~ | |
1727 Conversely, when one is editing a directory, issuing a :Rexplore | |
5929 | 1728 will return to editing the file that was last edited in that |
5734 | 1729 window. |
1730 | |
1731 The <2-leftmouse> map (which is only available under gvim and | |
1732 cooperative terms) does the same as :Rexplore. | |
1621 | 1733 |
5618 | 1734 Also see: |g:netrw_alto| |g:netrw_altv| |g:netrw_winsize| |
1735 | |
1621 | 1736 |
6476 | 1737 *netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat* *netrw-grep* |
1738 EXPLORING WITH STARS AND PATTERNS {{{2 | |
1621 | 1739 |
1740 When Explore, Sexplore, Hexplore, or Vexplore are used with one of the | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1741 following four patterns Explore generates a list of files which satisfy the |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1742 request for the local file system. These exploration patterns will not work |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
1743 with remote file browsing. |
1621 | 1744 |
1745 */filepat files in current directory which satisfy filepat | |
1746 **/filepat files in current directory or below which satisfy the | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1747 file pattern |
1621 | 1748 *//pattern files in the current directory which contain the |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1749 pattern (vimgrep is used) |
1621 | 1750 **//pattern files in the current directory or below which contain |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1751 the pattern (vimgrep is used) |
464 | 1752 < |
1621 | 1753 The cursor will be placed on the first file in the list. One may then |
1754 continue to go to subsequent files on that list via |:Nexplore| or to | |
1755 preceding files on that list with |:Pexplore|. Explore will update the | |
1756 directory and place the cursor appropriately. | |
1757 | |
1758 A plain > | |
1759 :Explore | |
1760 will clear the explore list. | |
1761 | |
1762 If your console or gui produces recognizable shift-up or shift-down sequences, | |
1763 then you'll likely find using shift-downarrow and shift-uparrow convenient. | |
6476 | 1764 They're mapped by netrw as follows: |
1621 | 1765 |
1766 <s-down> == Nexplore, and | |
1767 <s-up> == Pexplore. | |
1768 | |
1769 As an example, consider | |
1770 > | |
1771 :Explore */*.c | |
1772 :Nexplore | |
1773 :Nexplore | |
1774 :Pexplore | |
1775 < | |
1776 The status line will show, on the right hand side of the status line, a | |
1777 message like "Match 3 of 20". | |
1778 | |
5734 | 1779 Associated setting variables: |
1780 |g:netrw_keepdir| |g:netrw_browse_split| | |
1781 |g:netrw_fastbrowse| |g:netrw_ftp_browse_reject| | |
1782 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd| | |
1783 |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd| | |
1784 |g:netrw_liststyle| | |
1621 | 1785 |
1786 | |
1787 DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2 | |
1788 | |
1789 With the cursor atop a filename, pressing "qf" will reveal the file's size | |
1790 and last modification timestamp. Currently this capability is only available | |
1791 for local files. | |
1792 | |
1793 | |
1794 EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2 | |
1795 | |
1796 The "<ctrl-h>" map brings up a requestor allowing the user to change the | |
1797 file/directory hiding list contained in |g:netrw_list_hide|. The hiding list | |
1798 consists of one or more patterns delimited by commas. Files and/or | |
1799 directories satisfying these patterns will either be hidden (ie. not shown) or | |
1800 be the only ones displayed (see |netrw-a|). | |
1801 | |
1802 The "gh" mapping (see |netrw-gh|) quickly alternates between the usual | |
1803 hiding list and the hiding of files or directories that begin with ".". | |
1804 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1805 As an example, > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1806 let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+' |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1807 Effectively, this makes the effect of a |netrw-gh| command the initial setting. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1808 What it means: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1809 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1810 \(^\|\s\s\) : if the line begins with the following, -or- |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1811 two consecutive spaces are encountered |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1812 \zs : start the hiding match now |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1813 \. : if it now begins with a dot |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1814 \S\+ : and is followed by one or more non-whitespace |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1815 characters |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1816 |
1621 | 1817 Associated setting variables: |g:netrw_hide| |g:netrw_list_hide| |
1818 Associated topics: |netrw-a| |netrw-gh| |netrw-mh| | |
1819 | |
3153 | 1820 *netrw-sort-sequence* |
1621 | 1821 EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2 |
1822 | |
1823 When "Sorted by" is name, one may specify priority via the sorting sequence | |
1824 (g:netrw_sort_sequence). The sorting sequence typically prioritizes the | |
1825 name-listing by suffix, although any pattern will do. Patterns are delimited | |
1826 by commas. The default sorting sequence is (all one line): | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1827 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1828 For Unix: > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1829 '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1830 \.info$,\.swp$,\.bak$,\~$' |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1831 < |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1832 Otherwise: > |
1621 | 1833 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$, |
1834 \.swp$,\.bak$,\~$' | |
1835 < | |
1836 The lone * is where all filenames not covered by one of the other patterns | |
1837 will end up. One may change the sorting sequence by modifying the | |
1838 g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by | |
1839 using the "S" map. | |
1840 | |
1668 | 1841 Related topics: |netrw-s| |netrw-S| |
1842 Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options| | |
1621 | 1843 |
1844 | |
6476 | 1845 EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X* {{{2 |
3920 | 1846 |
1847 Pressing X while the cursor is atop an executable file will yield a prompt | |
1848 using the filename asking for any arguments. Upon pressing a [return], netrw | |
1849 will then call |system()| with that command and arguments. The result will | |
1850 be displayed by |:echomsg|, and so |:messages| will repeat display of the | |
1851 result. Ansi escape sequences will be stripped out. | |
1852 | |
1853 | |
2751 | 1854 FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2 |
1855 | |
1856 Remote symbolic links (ie. those listed via ssh or ftp) are problematic | |
1857 in that it is difficult to tell whether they link to a file or to a | |
1858 directory. | |
1859 | |
1860 To force treatment as a file: use > | |
3920 | 1861 gf |
2751 | 1862 < |
1863 To force treatment as a directory: use > | |
3920 | 1864 gd |
2751 | 1865 < |
1866 | |
1621 | 1867 GOING UP *netrw--* {{{2 |
1868 | |
1869 To go up a directory, press "-" or press the <cr> when atop the ../ directory | |
1870 entry in the listing. | |
1871 | |
1872 Netrw will use the command in |g:netrw_list_cmd| to perform the directory | |
1873 listing operation after changing HOSTNAME to the host specified by the | |
5734 | 1874 user-prpvided url. By default netrw provides the command as: > |
1621 | 1875 |
1876 ssh HOSTNAME ls -FLa | |
5734 | 1877 < |
1621 | 1878 where the HOSTNAME becomes the [user@]hostname as requested by the attempt to |
1879 read. Naturally, the user may override this command with whatever is | |
1880 preferred. The NetList function which implements remote browsing | |
1881 expects that directories will be flagged by a trailing slash. | |
1882 | |
1883 | |
1884 HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2 | |
1885 | |
1886 Netrw's browsing facility allows one to use the hiding list in one of three | |
1887 ways: ignore it, hide files which match, and show only those files which | |
1888 match. | |
1889 | |
1890 If no files have been marked via |netrw-mf|: | |
1891 | |
1892 The "a" map allows the user to cycle through the three hiding modes. | |
1893 | |
1894 The |g:netrw_list_hide| variable holds a comma delimited list of patterns | |
1895 based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list. | |
1896 (also see |netrw-ctrl-h|) To set the hiding list, use the <c-h> map. As an | |
1897 example, to hide files which begin with a ".", one may use the <c-h> map to | |
1898 set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*' | |
1899 in one's <.vimrc>). One may then use the "a" key to show all files, hide | |
1900 matching files, or to show only the matching files. | |
1901 | |
1902 Example: \.[ch]$ | |
1903 This hiding list command will hide/show all *.c and *.h files. | |
1904 | |
1905 Example: \.c$,\.h$ | |
1906 This hiding list command will also hide/show all *.c and *.h | |
1907 files. | |
1908 | |
1909 Don't forget to use the "a" map to select the mode (normal/hiding/show) you | |
1910 want! | |
1911 | |
1912 If files have been marked using |netrw-mf|, then this command will: | |
1913 | |
1914 if showing all files or non-hidden files: | |
1915 modify the g:netrw_list_hide list by appending the marked files to it | |
1916 and showing only non-hidden files. | |
1917 | |
1918 else if showing hidden files only: | |
1919 modify the g:netrw_list_hide list by removing the marked files from it | |
1920 and showing only non-hidden files. | |
1921 endif | |
1922 | |
1923 *netrw-gh* *netrw-hide* | |
1924 As a quick shortcut, one may press > | |
1925 gh | |
1926 to toggle between hiding files which begin with a period (dot) and not hiding | |
1927 them. | |
1928 | |
5618 | 1929 Associated setting variables: |g:netrw_list_hide| |g:netrw_hide| |
1621 | 1930 Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh| |
1931 | |
5618 | 1932 *netrw-gitignore* |
1933 Netrw provides a helper function 'netrw_gitignore#Hide()' that, when used with | |
1934 |g:netrw_list_hide| automatically hides all git-ignored files. | |
1935 | |
6476 | 1936 'netrw_gitignore#Hide' searches for patterns in the following files: > |
1937 | |
5618 | 1938 './.gitignore' |
1939 './.git/info/exclude' | |
1940 global gitignore file: `git config --global core.excludesfile` | |
1941 system gitignore file: `git config --system core.excludesfile` | |
6476 | 1942 < |
5618 | 1943 Files that do not exist, are ignored. |
1944 Git-ignore patterns are taken from existing files, and converted to patterns for | |
1945 hiding files. For example, if you had '*.log' in your '.gitignore' file, it | |
1946 would be converted to '.*\.log'. | |
1947 | |
6476 | 1948 To use this function, simply assign its output to |g:netrw_list_hide| option. > |
5618 | 1949 |
1950 Example: let g:netrw_list_hide= netrw_gitignore#Hide() | |
1951 Git-ignored files are hidden in Netrw. | |
1952 | |
1953 Example: let g:netrw_list_hide= netrw_gitignore#Hide('my_gitignore_file') | |
1954 Function can take additional files with git-ignore patterns. | |
1955 | |
1956 Example: g:netrw_list_hide= netrw_gitignore#Hide() . '.*\.swp$' | |
1957 Combining 'netrw_gitignore#Hide' with custom patterns. | |
6476 | 1958 < |
5618 | 1959 |
1621 | 1960 IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2 |
12 | 1961 |
1962 Especially with the remote directory browser, constantly entering the password | |
1963 is tedious. | |
1964 | |
1121 | 1965 For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength |
1209 | 1966 tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip |
1967 for setting up no-password ssh and scp and discusses associated security | |
1121 | 1968 issues. It used to be available at http://hacks.oreilly.com/pub/h/66 , |
1969 but apparently that address is now being redirected to some "hackzine". | |
1698 | 1970 I'll attempt a summary based on that article and on a communication from |
1971 Ben Schmidt: | |
1972 | |
1973 1. Generate a public/private key pair on the local machine | |
1974 (ssh client): > | |
1975 ssh-keygen -t rsa | |
1976 (saving the file in ~/.ssh/id_rsa as prompted) | |
1977 < | |
1978 2. Just hit the <CR> when asked for passphrase (twice) for no | |
1979 passphrase. If you do use a passphrase, you will also need to use | |
1980 ssh-agent so you only have to type the passphrase once per session. | |
1981 If you don't use a passphrase, simply logging onto your local | |
1982 computer or getting access to the keyfile in any way will suffice | |
1983 to access any ssh servers which have that key authorized for login. | |
1984 | |
1985 3. This creates two files: > | |
1986 ~/.ssh/id_rsa | |
1987 ~/.ssh/id_rsa.pub | |
1988 < | |
1989 4. On the target machine (ssh server): > | |
1990 cd | |
1991 mkdir -p .ssh | |
1992 chmod 0700 .ssh | |
1993 < | |
1994 5. On your local machine (ssh client): (one line) > | |
1995 ssh {serverhostname} | |
1996 cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub | |
1997 < | |
1998 or, for OpenSSH, (one line) > | |
1999 ssh {serverhostname} | |
2000 cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub | |
2001 < | |
2002 You can test it out with > | |
2003 ssh {serverhostname} | |
2004 and you should be log onto the server machine without further need to type | |
2005 anything. | |
2006 | |
2007 If you decided to use a passphrase, do: > | |
2008 ssh-agent $SHELL | |
2009 ssh-add | |
2010 ssh {serverhostname} | |
2011 You will be prompted for your key passphrase when you use ssh-add, but not | |
2012 subsequently when you use ssh. For use with vim, you can use > | |
2013 ssh-agent vim | |
2014 and, when next within vim, use > | |
2015 :!ssh-add | |
2016 Alternatively, you can apply ssh-agent to the terminal you're planning on | |
2017 running vim in: > | |
2018 ssh-agent xterm & | |
2019 and do ssh-add whenever you need. | |
9 | 2020 |
1121 | 2021 For Windows, folks on the vim mailing list have mentioned that Pageant helps |
2022 with avoiding the constant need to enter the password. | |
794 | 2023 |
1621 | 2024 Kingston Fung wrote about another way to avoid constantly needing to enter |
2025 passwords: | |
2026 | |
2027 In order to avoid the need to type in the password for scp each time, you | |
2028 provide a hack in the docs to set up a non password ssh account. I found a | |
2029 better way to do that: I can use a regular ssh account which uses a | |
2030 password to access the material without the need to key-in the password | |
2031 each time. It's good for security and convenience. I tried ssh public key | |
2032 authorization + ssh-agent, implementing this, and it works! Here are two | |
2033 links with instructions: | |
2034 | |
2035 http://www.ibm.com/developerworks/library/l-keyc2/ | |
2036 http://sial.org/howto/openssh/publickey-auth/ | |
2037 | |
2038 | |
5618 | 2039 Ssh hints: |
2040 | |
2041 Thomer Gil has provided a hint on how to speed up netrw+ssh: | |
2042 http://thomer.com/howtos/netrw_ssh.html | |
2043 | |
2044 Alex Young has several hints on speeding ssh up: | |
2045 http://usevim.com/2012/03/16/editing-remote-files/ | |
2046 | |
2047 | |
1621 | 2048 LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2 |
2049 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2050 Pressing "qb" (query bookmarks) will list both the bookmarked directories and |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2051 directory traversal history. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2052 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2053 Related Topics: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2054 |netrw-gb| how to return (go) to a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2055 |netrw-mb| how to make a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2056 |netrw-mB| how to delete bookmarks |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2057 |netrw-u| change to a predecessor directory via the history stack |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2058 |netrw-U| change to a successor directory via the history stack |
1621 | 2059 |
2060 MAKING A NEW DIRECTORY *netrw-d* {{{2 | |
2061 | |
2062 With the "d" map one may make a new directory either remotely (which depends | |
2063 on the global variable g:netrw_mkdir_cmd) or locally (which depends on the | |
3456 | 2064 global variable g:netrw_localmkdir). Netrw will issue a request for the new |
1621 | 2065 directory's name. A bare <CR> at that point will abort the making of the |
2066 directory. Attempts to make a local directory that already exists (as either | |
2067 a file or a directory) will be detected, reported on, and ignored. | |
2068 | |
3153 | 2069 Related topics: |netrw-D| |
5618 | 2070 Associated setting variables: |g:netrw_localmkdir| |g:netrw_mkdir_cmd| |
2071 |g:netrw_remote_mkdir| |netrw-%| | |
1621 | 2072 |
2073 | |
2074 MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2 | |
2075 | |
2076 By default, |g:netrw_keepdir| is 1. This setting means that the current | |
4339 | 2077 directory will not track the browsing directory. (done for backwards |
2078 compatibility with v6's file explorer). | |
2079 | |
2080 Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory | |
1621 | 2081 track netrw's browsing directory. |
2082 | |
2083 However, given the default setting for g:netrw_keepdir of 1 where netrw | |
2084 maintains its own separate notion of the current directory, in order to make | |
2085 the two directories the same, use the "c" map (just type c). That map will | |
2086 set Vim's notion of the current directory to netrw's current browsing | |
2087 directory. | |
2088 | |
2089 Associated setting variable: |g:netrw_keepdir| | |
2090 | |
5734 | 2091 MARKING FILES *netrw-:MF* *netrw-mf* {{{2 |
1621 | 2092 (also see |netrw-mr|) |
2093 | |
6476 | 2094 Netrw provides several ways to mark files: |
5734 | 2095 |
2096 * One may mark files with the cursor atop a filename and | |
5929 | 2097 then pressing "mf". |
5734 | 2098 |
2099 * With gvim, in addition one may mark files with | |
5929 | 2100 <s-leftmouse>. (see |netrw-mouse|) |
5734 | 2101 |
2102 * One may use the :MF command, which takes a list of | |
5929 | 2103 files (for local directories, the list may include |
2104 wildcards -- see |glob()|) > | |
5734 | 2105 |
2106 :MF *.c | |
2107 < | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2108 (Note that :MF uses |<f-args>| to break the line |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2109 at spaces) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2110 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2111 * Mark files using the |argument-list| (|netrw-mA|) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2112 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2113 * Mark files based upon a |location-list| (|netrw-qL|) |
5929 | 2114 |
2115 * Mark files based upon the quickfix list (|netrw-qF|) | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2116 (|quickfix-error-lists|) |
5734 | 2117 |
2118 The following netrw maps make use of marked files: | |
1621 | 2119 |
2120 |netrw-a| Hide marked files/directories | |
2121 |netrw-D| Delete marked files/directories | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2122 |netrw-ma| Move marked files' names to |arglist| |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2123 |netrw-mA| Move |arglist| filenames to marked file list |
6476 | 2124 |netrw-mb| Append marked files to bookmarks |
2125 |netrw-mB| Delete marked files from bookmarks | |
1621 | 2126 |netrw-mc| Copy marked files to target |
2127 |netrw-md| Apply vimdiff to marked files | |
2128 |netrw-me| Edit marked files | |
4339 | 2129 |netrw-mF| Unmark marked files |
1621 | 2130 |netrw-mg| Apply vimgrep to marked files |
5734 | 2131 |netrw-mm| Move marked files to target |
1621 | 2132 |netrw-mp| Print marked files |
2133 |netrw-mt| Set target for |netrw-mm| and |netrw-mc| | |
2134 |netrw-mT| Generate tags using marked files | |
6476 | 2135 |netrw-mv| Apply vim command to marked files |
1621 | 2136 |netrw-mx| Apply shell command to marked files |
6476 | 2137 |netrw-mX| Apply shell command to marked files, en bloc |
1621 | 2138 |netrw-mz| Compress/Decompress marked files |
2139 |netrw-O| Obtain marked files | |
2140 |netrw-R| Rename marked files | |
2141 | |
2142 One may unmark files one at a time the same way one marks them; ie. place | |
2143 the cursor atop a marked file and press "mf". This process also works | |
2144 with <s-leftmouse> using gvim. One may unmark all files by pressing | |
2145 "mu" (see |netrw-mu|). | |
2146 | |
2751 | 2147 Marked files are highlighted using the "netrwMarkFile" highlighting group, |
2148 which by default is linked to "Identifier" (see Identifier under | |
2149 |group-name|). You may change the highlighting group by putting something | |
2150 like > | |
2151 | |
2152 highlight clear netrwMarkFile | |
2153 hi link netrwMarkFile ..whatever.. | |
2154 < | |
2155 into $HOME/.vim/after/syntax/netrw.vim . | |
2156 | |
5618 | 2157 If the mouse is enabled and works with your vim, you may use <s-leftmouse> to |
2158 mark one or more files. You may mark multiple files by dragging the shifted | |
2159 leftmouse. (see |netrw-mouse|) | |
2160 | |
6476 | 2161 *markfilelist* *global_markfilelist* *local_markfilelist* |
1621 | 2162 All marked files are entered onto the global marked file list; there is only |
6476 | 2163 one such list. In addition, every netrw buffer also has its own buffer-local |
2164 marked file list; since netrw buffers are associated with specific | |
2165 directories, this means that each directory has its own local marked file | |
2166 list. The various commands which operate on marked files use one or the other | |
2167 of the marked file lists. | |
1621 | 2168 |
5734 | 2169 Known Problem: if one is using tree mode (|g:netrw_liststyle|) and several |
2170 directories have files with the same name, then marking such a file will | |
2171 result in all such files being highlighted as if they were all marked. The | |
2172 |markfilelist|, however, will only have the selected file in it. This problem | |
2173 is unlikely to be fixed. | |
2174 | |
1621 | 2175 |
4339 | 2176 UNMARKING FILES *netrw-mF* {{{2 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2177 (also see |netrw-mf|, |netrw-mu|) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2178 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2179 The "mF" command will unmark all files in the current buffer. One may also use |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2180 mf (|netrw-mf|) on a specific, already marked, file to unmark just that file. |
4339 | 2181 |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2182 MARKING FILES BY LOCATION LIST *netrw-qL* {{{2 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2183 (also see |netrw-mf|) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2184 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2185 One may convert |location-list|s into a marked file list using "qL". |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2186 You may then proceed with commands such as me (|netrw-me|) to edit them. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2187 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2188 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2189 MARKING FILES BY QUICKFIX LIST *netrw-qF* {{{2 |
4339 | 2190 (also see |netrw-mf|) |
2191 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2192 One may convert |quickfix-error-lists| into a marked file list using "qF". |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2193 You may then proceed with commands such as me (|netrw-me|) to edit them. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2194 Quickfix error lists are generated, for example, by calls to |:vimgrep|. |
4339 | 2195 |
2196 | |
1621 | 2197 MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2 |
2198 (also see |netrw-mf|) | |
2199 | |
2200 One may also mark files by pressing "mr"; netrw will then issue a prompt, | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2201 "Enter regexp: ". You may then enter a shell-style regular expression such |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2202 as *.c$ (see |glob()|). For remote systems, glob() doesn't work -- so netrw |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2203 converts "*" into ".*" (see |regexp|) and marks files based on that. In the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2204 future I may make it possible to use |regexp|s instead of glob()-style |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2205 expressions (yet-another-option). |
1621 | 2206 |
2207 | |
6476 | 2208 MARKED FILES, ARBITRARY VIM COMMAND *netrw-mv* {{{2 |
2209 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2210 (uses the local marked-file list) | |
2211 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2212 The "mv" map causes netrw to execute an arbitrary vim command on each file on |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2213 the local marked file list, individually: |
6476 | 2214 |
2215 * 1split | |
2216 * sil! keepalt e file | |
2217 * run vim command | |
2218 * sil! keepalt wq! | |
2219 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2220 A prompt, "Enter vim command: ", will be issued to elicit the vim command |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2221 you wish used. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2222 |
6476 | 2223 |
2224 MARKED FILES, ARBITRARY SHELL COMMAND *netrw-mx* {{{2 | |
1621 | 2225 (See |netrw-mf| and |netrw-mr| for how to mark files) |
2226 (uses the local marked-file list) | |
2227 | |
2228 Upon activation of the "mx" map, netrw will query the user for some (external) | |
2229 command to be applied to all marked files. All "%"s in the command will be | |
2230 substituted with the name of each marked file in turn. If no "%"s are in the | |
2231 command, then the command will be followed by a space and a marked filename. | |
2232 | |
6476 | 2233 Example: |
2234 (mark files) | |
2235 mx | |
2236 Enter command: cat | |
2237 | |
2238 The result is a series of shell commands: | |
2239 cat 'file1' | |
2240 cat 'file2' | |
2241 ... | |
2242 | |
2243 | |
2244 MARKED FILES, ARBITRARY SHELL COMMAND, EN BLOC *netrw-mX* {{{2 | |
2245 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2246 (uses the global marked-file list) | |
2247 | |
2248 Upon activation of the 'mX' map, netrw will query the user for some (external) | |
2249 command to be applied to all marked files on the global marked file list. The | |
2250 "en bloc" means that one command will be executed on all the files at once: > | |
2251 | |
2252 command files | |
2253 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2254 This approach is useful, for example, to select files and make a tarball: > |
6476 | 2255 |
2256 (mark files) | |
2257 mX | |
2258 Enter command: tar cf mynewtarball.tar | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2259 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2260 The command that will be run with this example: |
6476 | 2261 |
2262 tar cf mynewtarball.tar 'file1' 'file2' ... | |
2263 | |
1621 | 2264 |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2265 MARKED FILES: ARGUMENT LIST *netrw-ma* *netrw-mA* |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2266 (See |netrw-mf| and |netrw-mr| for how to mark files) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2267 (uses the global marked-file list) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2268 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2269 Using ma, one moves filenames from the marked file list to the argument list. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2270 Using mA, one moves filenames from the argument list to the marked file list. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2271 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2272 See Also: |netrw-qF| |argument-list| |:args| |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2273 |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2274 |
1621 | 2275 MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2 |
2276 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2277 (uses the local marked file list) | |
2278 | |
2279 If any marked files are compressed, then "mz" will decompress them. | |
2280 If any marked files are decompressed, then "mz" will compress them | |
2281 using the command specified by |g:netrw_compress|; by default, | |
2282 that's "gzip". | |
2283 | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2284 For decompression, netrw uses a |Dictionary| of suffices and their |
1621 | 2285 associated decompressing utilities; see |g:netrw_decompress|. |
2286 | |
6476 | 2287 Remember that one can mark multiple files by regular expression |
2288 (see |netrw-mr|); this is particularly useful to facilitate compressing and | |
2289 decompressing a large number of files. | |
2290 | |
1621 | 2291 Associated setting variables: |g:netrw_compress| |g:netrw_decompress| |
2292 | |
2293 MARKED FILES: COPYING *netrw-mc* {{{2 | |
2294 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2295 (Uses the global marked file list) | |
2296 | |
2297 Select a target directory with mt (|netrw-mt|). Then change directory, | |
2751 | 2298 select file(s) (see |netrw-mf|), and press "mc". The copy is done |
2299 from the current window (where one does the mf) to the target. | |
1621 | 2300 |
6476 | 2301 If one does not have a target directory set with |netrw-mt|, then netrw |
2302 will query you for a directory to copy to. | |
2303 | |
2304 One may also copy directories and their contents (local only) to a target | |
2305 directory. | |
2306 | |
2307 Associated setting variables: | |
2308 |g:netrw_localcopycmd| | |
2309 |g:netrw_localcopydircmd| | |
2310 |g:netrw_ssh_cmd| | |
1621 | 2311 |
2312 MARKED FILES: DIFF *netrw-md* {{{2 | |
2313 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2314 (uses the global marked file list) | |
2315 | |
2316 Use |vimdiff| to visualize difference between selected files (two or | |
2317 three may be selected for this). Uses the global marked file list. | |
2318 | |
2319 MARKED FILES: EDITING *netrw-me* {{{2 | |
2320 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2321 (uses the global marked file list) | |
2322 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2323 The "me" command will place the marked files on the |arglist| and commence |
1621 | 2324 editing them. One may return the to explorer window with |:Rexplore|. |
4339 | 2325 (use |:n| and |:p| to edit next and previous files in the arglist) |
1621 | 2326 |
2327 MARKED FILES: GREP *netrw-mg* {{{2 | |
2328 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2329 (uses the global marked file list) | |
2330 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2331 The "mg" command will apply |:vimgrep| to the marked files. |
4339 | 2332 The command will ask for the requested pattern; one may then enter: > |
2333 | |
1621 | 2334 /pattern/[g][j] |
2335 ! /pattern/[g][j] | |
2336 pattern | |
2337 < | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2338 With /pattern/, editing will start with the first item on the |quickfix| list |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2339 that vimgrep sets up (see |:copen|, |:cnext|, |:cprevious|, |:cclose|). The |:vimgrep| |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2340 command is in use, so without 'g' each line is added to quickfix list only |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2341 once; with 'g' every match is included. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2342 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2343 With /pattern/j, "mg" will winnow the current marked file list to just those |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2344 marked files also possessing the specified pattern. Thus, one may use > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2345 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2346 mr ...file-pattern... |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2347 mg /pattern/j |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2348 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2349 to have a marked file list satisfying the file-pattern but also restricted to |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2350 files containing some desired pattern. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2351 |
4339 | 2352 |
1621 | 2353 MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2 |
2354 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2355 (uses the local marked file list) | |
2356 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2357 The "mh" command extracts the suffices of the marked files and toggles their |
1621 | 2358 presence on the hiding list. Please note that marking the same suffix |
2359 this way multiple times will result in the suffix's presence being toggled | |
2360 for each file (so an even quantity of marked files having the same suffix | |
2361 is the same as not having bothered to select them at all). | |
2362 | |
2363 Related topics: |netrw-a| |g:netrw_list_hide| | |
2364 | |
2365 MARKED FILES: MOVING *netrw-mm* {{{2 | |
2366 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2367 (uses the global marked file list) | |
2368 | |
1698 | 2369 WARNING: moving files is more dangerous than copying them. |
2370 A file being moved is first copied and then deleted; if the | |
2371 copy operation fails and the delete succeeds, you will lose | |
2372 the file. Either try things out with unimportant files | |
2373 first or do the copy and then delete yourself using mc and D. | |
2374 Use at your own risk! | |
2375 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2376 Select a target directory with mt (|netrw-mt|). Then change directory, |
2751 | 2377 select file(s) (see |netrw-mf|), and press "mm". The move is done |
2378 from the current window (where one does the mf) to the target. | |
1621 | 2379 |
2380 Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd| | |
2381 | |
2382 MARKED FILES: PRINTING *netrw-mp* {{{2 | |
2383 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2384 (uses the local marked file list) | |
2385 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2386 When "mp" is used, netrw will apply the |:hardcopy| command to marked files. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2387 What netrw does is open each file in a one-line window, execute hardcopy, then |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2388 close the one-line window. |
1621 | 2389 |
2390 | |
2391 MARKED FILES: SOURCING *netrw-ms* {{{2 | |
2392 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2393 (uses the local marked file list) | |
2394 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2395 With "ms", netrw will source the marked files (using vim's |:source| command) |
1621 | 2396 |
2397 | |
4339 | 2398 MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2 |
2399 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2400 | |
2401 Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|): | |
2402 | |
2403 * If the cursor is atop a file name, then the netrw window's currently | |
2404 displayed directory is used for the copy/move-to target. | |
2405 | |
2406 * Also, if the cursor is in the banner, then the netrw window's currently | |
2407 displayed directory is used for the copy/move-to target. | |
2408 Unless the target already is the current directory. In which case, | |
6476 | 2409 typing "mf" clears the target. |
4339 | 2410 |
2411 * However, if the cursor is atop a directory name, then that directory is | |
2412 used for the copy/move-to target | |
2413 | |
5734 | 2414 * One may use the :MT [directory] command to set the target *netrw-:MT* |
2415 This command uses |<q-args>|, so spaces in the directory name are | |
2416 permitted without escaping. | |
2417 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2418 * With mouse-enabled vim or with gvim, one may select a target by using |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2419 <c-leftmouse> |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2420 |
6476 | 2421 There is only one copy/move-to target at a time in a vim session; ie. the |
2422 target is a script variable (see |s:var|) and is shared between all netrw | |
2423 windows (in an instance of vim). | |
4339 | 2424 |
2425 When using menus and gvim, netrw provides a "Targets" entry which allows one | |
2426 to pick a target from the list of bookmarks and history. | |
2427 | |
2428 Related topics: | |
2429 Marking Files......................................|netrw-mf| | |
2430 Marking Files by Regular Expression................|netrw-mr| | |
2431 Marked Files: Target Directory Using Bookmarks.....|netrw-Tb| | |
2432 Marked Files: Target Directory Using History.......|netrw-Th| | |
2433 | |
2434 | |
1621 | 2435 MARKED FILES: TAGGING *netrw-mT* {{{2 |
2436 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2437 (uses the global marked file list) | |
2438 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2439 The "mT" mapping will apply the command in |g:netrw_ctags| (by default, it is |
1621 | 2440 "ctags") to marked files. For remote browsing, in order to create a tags file |
2441 netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for | |
2442 this to work on remote systems. For your local system, see |ctags| on how to | |
2443 get a version. I myself use hdrtags, currently available at | |
3920 | 2444 http://www.drchip.org/astronaut/src/index.html , and have > |
1621 | 2445 |
2446 let g:netrw_ctags= "hdrtag" | |
2447 < | |
2448 in my <.vimrc>. | |
2449 | |
2450 When a remote set of files are tagged, the resulting tags file is "obtained"; | |
5734 | 2451 ie. a copy is transferred to the local system's directory. The now local tags |
1621 | 2452 file is then modified so that one may use it through the network. The |
5734 | 2453 modification made concerns the names of the files in the tags; each filename is |
1621 | 2454 preceded by the netrw-compatible url used to obtain it. When one subsequently |
2455 uses one of the go to tag actions (|tags|), the url will be used by netrw to | |
2456 edit the desired file and go to the tag. | |
2457 | |
1668 | 2458 Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd| |
1621 | 2459 |
6476 | 2460 MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2 |
4339 | 2461 |
5734 | 2462 Sets the marked file copy/move-to target. |
4339 | 2463 |
2464 The |netrw-qb| map will give you a list of bookmarks (and history). | |
2465 One may choose one of the bookmarks to become your marked file | |
2466 target by using [count]Tb (default count: 1). | |
2467 | |
2468 Related topics: | |
5734 | 2469 Copying files to target............................|netrw-mc| |
4339 | 2470 Listing Bookmarks and History......................|netrw-qb| |
2471 Marked Files: Setting The Target Directory.........|netrw-mt| | |
2472 Marked Files: Target Directory Using History.......|netrw-Th| | |
2473 Marking Files......................................|netrw-mf| | |
2474 Marking Files by Regular Expression................|netrw-mr| | |
5734 | 2475 Moving files to target.............................|netrw-mm| |
4339 | 2476 |
2477 | |
6476 | 2478 MARKED FILES: TARGET DIRECTORY USING HISTORY *netrw-Th* {{{2 |
4339 | 2479 |
5734 | 2480 Sets the marked file copy/move-to target. |
4339 | 2481 |
2482 The |netrw-qb| map will give you a list of history (and bookmarks). | |
2483 One may choose one of the history entries to become your marked file | |
2484 target by using [count]Th (default count: 0; ie. the current directory). | |
2485 | |
2486 Related topics: | |
5734 | 2487 Copying files to target............................|netrw-mc| |
4339 | 2488 Listing Bookmarks and History......................|netrw-qb| |
2489 Marked Files: Setting The Target Directory.........|netrw-mt| | |
2490 Marked Files: Target Directory Using Bookmarks.....|netrw-Tb| | |
2491 Marking Files......................................|netrw-mf| | |
2492 Marking Files by Regular Expression................|netrw-mr| | |
5734 | 2493 Moving files to target.............................|netrw-mm| |
4339 | 2494 |
1621 | 2495 |
2496 MARKED FILES: UNMARKING *netrw-mu* {{{2 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2497 (See |netrw-mf|, |netrw-mF|) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2498 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2499 The "mu" mapping will unmark all currently marked files. This command differs |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2500 from "mF" as the latter only unmarks files in the current directory whereas |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2501 "mu" will unmark global and all buffer-local marked files. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2502 (see |netrw-mF|) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2503 |
1621 | 2504 |
3153 | 2505 *netrw-browser-settings* |
1621 | 2506 NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2 |
2507 | |
3153 | 2508 (if you're interested in the netrw file transfer settings, see |netrw-options| |
2509 and |netrw-protocol|) | |
1621 | 2510 |
2511 The <netrw.vim> browser provides settings in the form of variables which | |
2512 you may modify; by placing these settings in your <.vimrc>, you may customize | |
2513 your browsing preferences. (see also: |netrw-settings|) | |
2514 > | |
2515 --- ----------- | |
2516 Var Explanation | |
2517 --- ----------- | |
5618 | 2518 < *g:netrw_altfile* some like |CTRL-^| to return to the last |
2519 edited file. Choose that by setting this | |
2520 parameter to 1. | |
2521 Others like |CTRL-^| to return to the | |
2522 netrw browsing buffer. Choose that by setting | |
2523 this parameter to 0. | |
2524 default: =0 | |
2525 | |
2526 *g:netrw_alto* change from above splitting to below splitting | |
1621 | 2527 by setting this variable (see |netrw-o|) |
2528 default: =&sb (see |'sb'|) | |
2529 | |
4339 | 2530 *g:netrw_altv* change from left splitting to right splitting |
1621 | 2531 by setting this variable (see |netrw-v|) |
2532 default: =&spr (see |'spr'|) | |
2533 | |
4339 | 2534 *g:netrw_banner* enable/suppress the banner |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2535 =0: suppress the banner |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2536 =1: banner is enabled (default) |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2537 |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2538 *g:netrw_bannerbackslash* if this variable exists and is not zero, the |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2539 banner will be displayed with backslashes |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2540 rather than forward slashes. |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2541 |
4339 | 2542 *g:netrw_browse_split* when browsing, <cr> will open the file by: |
6476 | 2543 =0: re-using the same window (default) |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2544 =1: horizontally splitting the window first |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2545 =2: vertically splitting the window first |
1621 | 2546 =3: open file in new tab |
2547 =4: act like "P" (ie. open previous window) | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2548 Note that |g:netrw_preview| may be used |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2549 to get vertical splitting instead of |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2550 horizontal splitting. |
6476 | 2551 =[servername,tab-number,window-number] |
2552 Given a |List| such as this, a remote server | |
2553 named by the "servername" will be used for | |
2554 editing. It will also use the specified tab | |
2555 and window numbers to perform editing | |
2556 (see |clientserver|, |netrw-ctrl-r|) | |
2557 This option does not affect |:Lexplore| | |
2558 windows. | |
1621 | 2559 |
5618 | 2560 Related topics: |
6476 | 2561 |g:netrw_alto| |g:netrw_altv| |
2562 |netrw-C| |netrw-cr| | |
2563 |netrw-ctrl-r| | |
5618 | 2564 |
4339 | 2565 *g:netrw_browsex_viewer* specify user's preference for a viewer: > |
1621 | 2566 "kfmclient exec" |
2567 "gnome-open" | |
2568 < If > | |
2569 "-" | |
2570 < is used, then netrwFileHandler() will look for | |
2571 a script/function to handle the given | |
2572 extension. (see |netrw_filehandler|). | |
2573 | |
4339 | 2574 *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME" |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2575 Windows: "cacls FILENAME /e /p PERM" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2576 Used to change access permission for a file. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2577 |
4339 | 2578 *g:netrw_compress* ="gzip" |
1621 | 2579 Will compress marked files with this |
2580 command | |
2581 | |
4339 | 2582 *g:Netrw_corehandler* Allows one to specify something additional |
3153 | 2583 to do when handling <core> files via netrw's |
2584 browser's "x" command (see |netrw-x|). If | |
2585 present, g:Netrw_corehandler specifies | |
2586 either one or more function references | |
2587 (see |Funcref|). (the capital g:Netrw... | |
2588 is required its holding a function reference) | |
2589 | |
2590 | |
4339 | 2591 *g:netrw_ctags* ="ctags" |
2592 The default external program used to create | |
2593 tags | |
2594 | |
2595 *g:netrw_cursor* = 2 (default) | |
6476 | 2596 This option controls the use of the |
2751 | 2597 |'cursorline'| (cul) and |'cursorcolumn'| |
2598 (cuc) settings by netrw: | |
2599 | |
2600 Value Thin-Long-Tree Wide | |
2601 =0 u-cul u-cuc u-cul u-cuc | |
2602 =1 u-cul u-cuc cul u-cuc | |
2603 =2 cul u-cuc cul u-cuc | |
2604 =3 cul u-cuc cul cuc | |
2605 =4 cul cuc cul cuc | |
2606 | |
2607 Where | |
2608 u-cul : user's |'cursorline'| setting used | |
2609 u-cuc : user's |'cursorcolumn'| setting used | |
2610 cul : |'cursorline'| locally set | |
2611 cuc : |'cursorcolumn'| locally set | |
2612 | |
4339 | 2613 *g:netrw_decompress* = { ".gz" : "gunzip" , |
1621 | 2614 ".bz2" : "bunzip2" , |
2615 ".zip" : "unzip" , | |
2616 ".tar" : "tar -xf"} | |
2617 A dictionary mapping suffices to | |
2618 decompression programs. | |
2619 | |
2751 | 2620 *g:netrw_dirhistmax* =10: controls maximum quantity of past |
2621 history. May be zero to supppress | |
2622 history. | |
2623 (related: |netrw-qb| |netrw-u| |netrw-U|) | |
2624 | |
3920 | 2625 *g:netrw_dynamic_maxfilenamelen* =32: enables dynamic determination of |
2626 |g:netrw_maxfilenamelen|, which affects | |
2627 local file long listing. | |
5734 | 2628 |
3456 | 2629 *g:netrw_errorlvl* =0: error levels greater than or equal to |
2630 this are permitted to be displayed | |
2631 0: notes | |
2632 1: warnings | |
2633 2: errors | |
2634 | |
4339 | 2635 *g:netrw_fastbrowse* =0: slow speed directory browsing; |
5929 | 2636 never re-uses directory listings; |
1621 | 2637 always obtains directory listings. |
2638 =1: medium speed directory browsing; | |
2639 re-use directory listings only | |
2640 when remote directory browsing. | |
2641 (default value) | |
2642 =2: fast directory browsing; | |
2643 only obtains directory listings when the | |
2644 directory hasn't been seen before | |
2645 (or |netrw-ctrl-l| is used). | |
2646 | |
2647 Fast browsing retains old directory listing | |
2648 buffers so that they don't need to be | |
2649 re-acquired. This feature is especially | |
2650 important for remote browsing. However, if | |
2651 a file is introduced or deleted into or from | |
2652 such directories, the old directory buffer | |
2653 becomes out-of-date. One may always refresh | |
2654 such a directory listing with |netrw-ctrl-l|. | |
2655 This option gives the user the choice of | |
2656 trading off accuracy (ie. up-to-date listing) | |
2657 versus speed. | |
2658 | |
5929 | 2659 *g:netrw_ffkeep* (default: doesn't exist) |
6476 | 2660 If this variable exists and is zero, then |
5929 | 2661 netrw will not do a save and restore for |
2662 |'fileformat'|. | |
2663 | |
4339 | 2664 *g:netrw_fname_escape* =' ?&;%' |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2665 Used on filenames before remote reading/writing |
1621 | 2666 |
4339 | 2667 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings |
1621 | 2668 that can show up as "directories" and "files" |
2669 in the listing. This pattern is used to | |
2670 remove such embedded messages. By default its | |
2671 value is: | |
2672 '^total\s\+\d\+$\| | |
2673 ^Trying\s\+\d\+.*$\| | |
2674 ^KERBEROS_V\d rejected\| | |
2675 ^Security extensions not\| | |
2676 No such file\| | |
2677 : connect to address [0-9a-fA-F:]* | |
2678 : No route to host$' | |
2679 | |
4339 | 2680 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory |
1621 | 2681 listing. Defaults: |
2682 unix or g:netrw_cygwin set: : "ls -lF" | |
2683 otherwise "dir" | |
2684 | |
2685 | |
4339 | 2686 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory |
1621 | 2687 listing, sorted by size of file. |
2688 Defaults: | |
2689 unix or g:netrw_cygwin set: : "ls -slF" | |
2690 otherwise "dir" | |
2691 | |
4339 | 2692 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory |
1621 | 2693 listing, sorted by time of last modification. |
2694 Defaults: | |
2695 unix or g:netrw_cygwin set: : "ls -tlF" | |
2696 otherwise "dir" | |
2697 | |
3456 | 2698 *g:netrw_glob_escape* ='[]*?`{~$' (unix) |
2152 | 2699 ='[]*?`{$' (windows |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2700 These characters in directory names are |
1621 | 2701 escaped before applying glob() |
2702 | |
6476 | 2703 *g:netrw_gx* ="<cfile>" |
2704 This option controls how gx (|netrw-gx|) picks | |
2705 up the text under the cursor. See |expand()| | |
2706 for possibilities. | |
2707 | |
4339 | 2708 *g:netrw_hide* Controlled by the "a" map (see |netrw-a|) |
2709 =0 : show all | |
2710 =1 : show not-hidden files | |
2711 =2 : show hidden files only | |
1621 | 2712 default: =0 |
2713 | |
4339 | 2714 *g:netrw_home* The home directory for where bookmarks and |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2715 history are saved (as .netrwbook and |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2716 .netrwhist). |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2717 default: the first directory on the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2718 |'runtimepath'| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2719 |
4339 | 2720 *g:netrw_keepdir* =1 (default) keep current directory immune from |
1621 | 2721 the browsing directory. |
2722 =0 keep the current directory the same as the | |
2723 browsing directory. | |
2724 The current browsing directory is contained in | |
2725 b:netrw_curdir (also see |netrw-c|) | |
2726 | |
6476 | 2727 *g:netrw_keepj* ="keepj" (default) netrw attempts to keep the |
2728 |:jumps| table unaffected. | |
2729 ="" netrw will not use |:keepjumps| with | |
2730 exceptions only for the | |
2731 saving/restoration of position. | |
2732 | |
4339 | 2733 *g:netrw_list_cmd* command for listing remote directories |
1621 | 2734 default: (if ssh is executable) |
2735 "ssh HOSTNAME ls -FLa" | |
2736 | |
6476 | 2737 *g:netrw_list_cmd_options* If this variable exists, then its contents are |
2738 appended to the g:netrw_list_cmd. For | |
2739 example, use "2>/dev/null" to get rid of banner | |
2740 messages on unix systems. | |
2741 | |
2742 | |
4339 | 2743 *g:netrw_liststyle* Set the default listing style: |
1621 | 2744 = 0: thin listing (one file per line) |
2745 = 1: long listing (one file per line with time | |
2746 stamp information and file size) | |
2747 = 2: wide listing (multiple files in columns) | |
2748 = 3: tree style listing | |
5618 | 2749 |
4339 | 2750 *g:netrw_list_hide* comma separated pattern list for hiding files |
1621 | 2751 Patterns are regular expressions (see |regexp|) |
5618 | 2752 There's some special support for git-ignore |
2753 files: you may add the output from the helper | |
2754 function 'netrw_gitignore#Hide() automatically | |
2755 hiding all gitignored files. | |
2756 For more details see |netrw-gitignore|. | |
2757 | |
2758 Examples: | |
2759 let g:netrw_list_hide= '.*\.swp$' | |
6476 | 2760 let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$' |
5618 | 2761 default: "" |
1621 | 2762 |
4339 | 2763 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2764 ="copy" Windows |
1621 | 2765 Copies marked files (|netrw-mf|) to target |
2766 directory (|netrw-mt|, |netrw-mc|) | |
2767 | |
6476 | 2768 *g:netrw_localcopydircmd* ="cp -R" Linux/Unix/MacOS/Cygwin |
2769 ="xcopy /e /c /h/ /i /k" Windows | |
2770 Copies directories to target directory. | |
2771 (|netrw-mc|, |netrw-mt|) | |
2772 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2773 *g:netrw_localmkdir* command for making a local directory |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2774 default: "mkdir" |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2775 |
4339 | 2776 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2777 ="move" Windows |
1621 | 2778 Moves marked files (|netrw-mf|) to target |
2779 directory (|netrw-mt|, |netrw-mm|) | |
2780 | |
4339 | 2781 *g:netrw_localrmdir* remove directory command (rmdir) |
1621 | 2782 default: "rmdir" |
2783 | |
4339 | 2784 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long |
1621 | 2785 listings fit on 80 column displays. |
2786 If your screen is wider, and you have file | |
2787 or directory names longer than 32 bytes, | |
2788 you may set this option to keep listings | |
2789 columnar. | |
2790 | |
4339 | 2791 *g:netrw_mkdir_cmd* command for making a remote directory |
3153 | 2792 via ssh (also see |g:netrw_remote_mkdir|) |
1621 | 2793 default: "ssh USEPORT HOSTNAME mkdir" |
2794 | |
2908 | 2795 *g:netrw_mousemaps* =1 (default) enables mouse buttons while |
6476 | 2796 browsing to: |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2797 leftmouse : open file/directory |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2798 shift-leftmouse : mark file |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2799 middlemouse : same as P |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2800 rightmouse : remove file/directory |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2801 =0: disables mouse maps |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2802 |
3153 | 2803 *g:netrw_nobeval* doesn't exist (default) |
2804 If this variable exists, then balloon | |
2805 evaluation will be suppressed | |
2806 (see |'ballooneval'|) | |
2807 | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2808 *g:netrw_sizestyle* not defined: actual bytes (default) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2809 ="b" : actual bytes (default) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2810 ="h" : human-readable (ex. 5k, 4m, 3g) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2811 uses 1000 base |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2812 ="H" : human-readable (ex. 5K, 4M, 3G) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2813 uses 1024 base |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2814 The long listing (|netrw-i|) and query-file |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2815 maps (|netrw-qf|) will display file size |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2816 using the specified style. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
2817 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2818 *g:netrw_usetab* if this variable exists and is non-zero, then |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2819 the <tab> map supporting shrinking/expanding a |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2820 Lexplore or netrw window will be enabled. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2821 (see |netrw-c-tab|) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2822 |
5734 | 2823 *g:netrw_remote_mkdir* command for making a remote directory |
3153 | 2824 via ftp (also see |g:netrw_mkdir_cmd|) |
2825 default: "mkdir" | |
2826 | |
4339 | 2827 *g:netrw_retmap* if it exists and is set to one, then: |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2828 * if in a netrw-selected file, AND |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2829 * no normal-mode <2-leftmouse> mapping exists, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2830 then the <2-leftmouse> will be mapped for easy |
1621 | 2831 return to the netrw browser window. |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2832 example: click once to select and open a file, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2833 double-click to return. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2834 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2835 Note that one may instead choose to: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2836 * let g:netrw_retmap= 1, AND |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2837 * nmap <silent> YourChoice <Plug>NetrwReturn |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2838 and have another mapping instead of |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2839 <2-leftmouse> to invoke the return. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2840 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2841 You may also use the |:Rexplore| command to do |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2842 the same thing. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2843 |
1621 | 2844 default: =0 |
2845 | |
5929 | 2846 *g:netrw_rm_cmd* command for removing remote files |
1621 | 2847 default: "ssh USEPORT HOSTNAME rm" |
2848 | |
5929 | 2849 *g:netrw_rmdir_cmd* command for removing remote directories |
1621 | 2850 default: "ssh USEPORT HOSTNAME rmdir" |
2851 | |
5929 | 2852 *g:netrw_rmf_cmd* command for removing remote softlinks |
1621 | 2853 default: "ssh USEPORT HOSTNAME rm -f" |
2854 | |
6476 | 2855 *g:netrw_servername* use this variable to provide a name for |
2856 |netrw-ctrl-r| to use for its server. | |
2857 default: "NETRWSERVER" | |
2858 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2859 *g:netrw_sort_by* sort by "name", "time", "size", or |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2860 "exten". |
1621 | 2861 default: "name" |
2862 | |
4339 | 2863 *g:netrw_sort_direction* sorting direction: "normal" or "reverse" |
1621 | 2864 default: "normal" |
2865 | |
4339 | 2866 *g:netrw_sort_options* sorting is done using |:sort|; this |
1668 | 2867 variable's value is appended to the |
2868 sort command. Thus one may ignore case, | |
2869 for example, with the following in your | |
2870 .vimrc: > | |
2871 let g:netrw_sort_options="i" | |
2872 < default: "" | |
2873 | |
4339 | 2874 *g:netrw_sort_sequence* when sorting by name, first sort by the |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2875 comma-separated pattern sequence. Note that |
5734 | 2876 any filigree added to indicate filetypes |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2877 should be accounted for in your pattern. |
1621 | 2878 default: '[\/]$,*,\.bak$,\.o$,\.h$, |
2879 \.info$,\.swp$,\.obj$' | |
2880 | |
4339 | 2881 *g:netrw_special_syntax* If true, then certain files will be shown |
3456 | 2882 using special syntax in the browser: |
1621 | 2883 |
2884 netrwBak : *.bak | |
2885 netrwCompress: *.gz *.bz2 *.Z *.zip | |
2886 netrwData : *.dat | |
2887 netrwHdr : *.h | |
2888 netrwLib : *.a *.so *.lib *.dll | |
2889 netrwMakefile: [mM]akefile *.mak | |
2890 netrwObj : *.o *.obj | |
2891 netrwTags : tags ANmenu ANtags | |
5734 | 2892 netrwTilde : * |
1621 | 2893 netrwTmp : tmp* *tmp |
2894 | |
2895 These syntax highlighting groups are linked | |
2896 to Folded or DiffChange by default | |
2897 (see |hl-Folded| and |hl-DiffChange|), but | |
2898 one may put lines like > | |
2899 hi link netrwCompress Visual | |
2900 < into one's <.vimrc> to use one's own | |
5734 | 2901 preferences. Alternatively, one may |
2902 put such specifications into | |
2903 .vim/after/syntax/netrw.vim. | |
2904 | |
2905 As an example, I myself use a dark-background | |
2906 colorscheme with the following in | |
2907 .vim/after/syntax/netrw.vim: > | |
2908 | |
2909 hi netrwCompress term=NONE cterm=NONE gui=NONE ctermfg=10 guifg=green ctermbg=0 guibg=black | |
2910 hi netrwData term=NONE cterm=NONE gui=NONE ctermfg=9 guifg=blue ctermbg=0 guibg=black | |
2911 hi netrwHdr term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1 | |
2912 hi netrwLex term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1 | |
2913 hi netrwYacc term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1 | |
2914 hi netrwLib term=NONE cterm=NONE gui=NONE ctermfg=14 guifg=yellow | |
2915 hi netrwObj term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red | |
2916 hi netrwTilde term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red | |
2917 hi netrwTmp term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red | |
2918 hi netrwTags term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red | |
2919 hi netrwDoc term=NONE cterm=NONE gui=NONE ctermfg=220 ctermbg=27 guifg=yellow2 guibg=Blue3 | |
2920 hi netrwSymLink term=NONE cterm=NONE gui=NONE ctermfg=220 ctermbg=27 guifg=grey60 | |
2921 < | |
4339 | 2922 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines, |
1621 | 2923 messages, banners, and whatnot that one doesn't |
2924 want masquerading as "directories" and "files". | |
2925 Use this pattern to remove such embedded | |
2926 messages. By default its value is: | |
2927 '^total\s\+\d\+$' | |
2928 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2929 *g:netrw_ssh_cmd* One may specify an executable command |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2930 to use instead of ssh for remote actions |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2931 such as listing, file removal, etc. |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2932 default: ssh |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2933 |
1621 | 2934 |
4339 | 2935 *g:netrw_tmpfile_escape* =' &;' |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2936 escape() is applied to all temporary files |
1621 | 2937 to escape these characters. |
2938 | |
4339 | 2939 *g:netrw_timefmt* specify format string to vim's strftime(). |
1621 | 2940 The default, "%c", is "the preferred date |
2941 and time representation for the current | |
2942 locale" according to my manpage entry for | |
2943 strftime(); however, not all are satisfied | |
2944 with it. Some alternatives: | |
2945 "%a %d %b %Y %T", | |
2946 " %a %Y-%m-%d %I-%M-%S %p" | |
2947 default: "%c" | |
2948 | |
4339 | 2949 *g:netrw_use_noswf* netrw normally avoids writing swapfiles |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2950 for browser buffers. However, under some |
1621 | 2951 systems this apparently is causing nasty |
2952 ml_get errors to appear; if you're getting | |
2953 ml_get errors, try putting | |
2954 let g:netrw_use_noswf= 0 | |
2955 in your .vimrc. | |
5734 | 2956 default: 1 |
1621 | 2957 |
4339 | 2958 *g:netrw_winsize* specify initial size of new windows made with |
1621 | 2959 "o" (see |netrw-o|), "v" (see |netrw-v|), |
2908 | 2960 |:Hexplore| or |:Vexplore|. The g:netrw_winsize |
2961 is an integer describing the percentage of the | |
2962 current netrw buffer's window to be used for | |
2963 the new window. | |
3153 | 2964 If g:netrw_winsize is less than zero, then |
2965 the absolute value of g:netrw_winsize lines | |
2966 or columns will be used for the new window. | |
5929 | 2967 If g:netrw_winsize is zero, then a normal |
2968 split will be made (ie. |'equalalways'| will | |
2969 take effect, for example). | |
2908 | 2970 default: 50 (for 50%) |
1621 | 2971 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2972 *g:netrw_wiw* =1 specifies the minimum window width to use |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2973 when shrinking a netrw/Lexplore window |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2974 (see |netrw-c-tab|). |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
2975 |
4339 | 2976 *g:netrw_xstrlen* Controls how netrw computes string lengths, |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2977 including multi-byte characters' string |
1621 | 2978 length. (thanks to N Weibull, T Mechelynck) |
2979 =0: uses Vim's built-in strlen() | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2980 =1: number of codepoints (Latin a + combining |
1621 | 2981 circumflex is two codepoints) (DEFAULT) |
2982 =2: number of spacing codepoints (Latin a + | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2983 combining circumflex is one spacing |
1621 | 2984 codepoint; a hard tab is one; wide and |
2985 narrow CJK are one each; etc.) | |
2986 =3: virtual length (counting tabs as anything | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2987 between 1 and |'tabstop'|, wide CJK as 2 |
1621 | 2988 rather than 1, Arabic alif as zero when |
2989 immediately preceded by lam, one | |
2990 otherwise, etc) | |
2991 | |
4339 | 2992 *g:NetrwTopLvlMenu* This variable specifies the top level |
1621 | 2993 menu name; by default, it's "Netrw.". If |
2994 you wish to change this, do so in your | |
2995 .vimrc. | |
2996 | |
2997 NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2 | |
2998 | |
2999 Netrw has been designed to handle user options by saving them, setting the | |
3000 options to something that's compatible with netrw's needs, and then restoring | |
3001 them. However, the autochdir option: > | |
3002 :set acd | |
5734 | 3003 is problematic. Autochdir sets the current directory to that containing the |
1621 | 3004 file you edit; this apparently also applies to directories. In other words, |
3005 autochdir sets the current directory to that containing the "file" (even if | |
3006 that "file" is itself a directory). | |
3007 | |
3153 | 3008 NETRW SETTINGS WINDOW *netrw-settings-window* {{{2 |
482 | 3009 |
3010 With the NetrwSettings.vim plugin, > | |
3011 :NetrwSettings | |
3012 will bring up a window with the many variables that netrw uses for its | |
559 | 3013 settings. You may change any of their values; when you save the file, the |
3014 settings therein will be used. One may also press "?" on any of the lines for | |
3015 help on what each of the variables do. | |
482 | 3016 |
3456 | 3017 (also see: |netrw-browser-var| |netrw-protocol| |netrw-variables|) |
1121 | 3018 |
482 | 3019 |
9 | 3020 ============================================================================== |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3021 OBTAINING A FILE *netrw-obtain* *netrw-O* {{{2 |
1621 | 3022 |
3023 If there are no marked files: | |
3024 | |
3025 When browsing a remote directory, one may obtain a file under the cursor | |
3026 (ie. get a copy on your local machine, but not edit it) by pressing the O | |
3027 key. | |
3028 | |
3029 If there are marked files: | |
3030 | |
3031 The marked files will be obtained (ie. a copy will be transferred to your | |
3032 local machine, but not set up for editing). | |
3033 | |
3034 Only ftp and scp are supported for this operation (but since these two are | |
3035 available for browsing, that shouldn't be a problem). The status bar will | |
3036 then show, on its right hand side, a message like "Obtaining filename". The | |
3037 statusline will be restored after the transfer is complete. | |
3038 | |
3039 Netrw can also "obtain" a file using the local browser. Netrw's display | |
3040 of a directory is not necessarily the same as Vim's "current directory", | |
3041 unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select | |
3042 a file using the local browser (by putting the cursor on it) and pressing | |
3043 "O" will then "obtain" the file; ie. copy it to Vim's current directory. | |
3044 | |
3045 Related topics: | |
3046 * To see what the current directory is, use |:pwd| | |
3047 * To make the currently browsed directory the current directory, see |netrw-c| | |
3048 * To automatically make the currently browsed directory the current | |
3049 directory, see |g:netrw_keepdir|. | |
3050 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3051 *netrw-newfile* *netrw-createfile* |
6476 | 3052 OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%* {{{2 |
1668 | 3053 |
5734 | 3054 To open a new file in netrw's current directory, press "%". This map |
3055 will query the user for a new filename; an empty file by that name will | |
3056 be placed in the netrw's current directory (ie. b:netrw_curdir). | |
1668 | 3057 |
5618 | 3058 Related topics: |netrw-d| |
3059 | |
1668 | 3060 |
1621 | 3061 PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2 |
3062 | |
3063 One may use a preview window by using the "p" key when the cursor is atop the | |
3064 desired filename to be previewed. The display will then split to show both | |
6476 | 3065 the browser (where the cursor will remain) and the file (see |:pedit|). By |
3066 default, the split will be taken horizontally; one may use vertical splitting | |
3067 if one has set |g:netrw_preview| first. | |
1621 | 3068 |
2152 | 3069 An interesting set of netrw settings is: > |
3070 | |
3071 let g:netrw_preview = 1 | |
3072 let g:netrw_liststyle = 3 | |
3073 let g:netrw_winsize = 30 | |
3074 | |
3075 These will: | |
6476 | 3076 |
2152 | 3077 1. Make vertical splitting the default for previewing files |
3078 2. Make the default listing style "tree" | |
3079 3. When a vertical preview window is opened, the directory listing | |
3456 | 3080 will use only 30% of the columns available; the rest of the window |
3081 is used for the preview window. | |
1621 | 3082 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3083 Related: if you like this idea, you may also find :Lexplore |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3084 (|netrw-:Lexplore|) or |g:netrw_chgwin| of interest |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3085 |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3086 Also see: |g:netrw_chgwin| |netrw-P| |'previewwindow'| |CTRL-W_z| |:pclose| |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3087 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3088 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3089 PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2 |
1621 | 3090 |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3091 To edit a file or directory under the cursor in the previously used (last |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3092 accessed) window (see :he |CTRL-W_p|), press a "P". If there's only one |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3093 window, then the one window will be horizontally split (by default). |
1621 | 3094 |
3095 If there's more than one window, the previous window will be re-used on | |
3096 the selected file/directory. If the previous window's associated buffer | |
3097 has been modified, and there's only one window with that buffer, then | |
3098 the user will be asked if s/he wishes to save the buffer first (yes, | |
3099 no, or cancel). | |
3100 | |
4339 | 3101 Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v| |
3153 | 3102 Associated setting variables: |
3103 |g:netrw_alto| control above/below splitting | |
3104 |g:netrw_altv| control right/left splitting | |
3105 |g:netrw_preview| control horizontal vs vertical splitting | |
3106 |g:netrw_winsize| control initial sizing | |
3107 | |
5734 | 3108 Also see: |g:netrw_chgwin| |netrw-p| |
3109 | |
1621 | 3110 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3111 REFRESHING THE LISTING *netrw-refresh* *netrw-ctrl-l* *netrw-ctrl_l* {{{2 |
1621 | 3112 |
3113 To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or | |
3114 hit the <cr> when atop the ./ directory entry in the listing. One may also | |
3115 refresh a local directory by using ":e .". | |
3116 | |
3117 | |
4339 | 3118 REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2 |
3119 | |
3120 One may toggle between normal and reverse sorting order by pressing the | |
3121 "r" key. | |
3122 | |
3123 Related topics: |netrw-s| | |
3124 Associated setting variable: |g:netrw_sort_direction| | |
3125 | |
3126 | |
1621 | 3127 RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2 |
3128 | |
3129 If there are no marked files: (see |netrw-mf|) | |
3130 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3131 Renaming files and directories involves moving the cursor to the |
1621 | 3132 file/directory to be moved (renamed) and pressing "R". You will then be |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3133 queried for what you want the file/directory to be renamed to You may select |
1621 | 3134 a range of lines with the "V" command (visual selection), and then |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3135 press "R"; you will be queried for each file as to what you want it |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3136 renamed to. |
1621 | 3137 |
3138 If there are marked files: (see |netrw-mf|) | |
3139 | |
3140 Marked files will be renamed (moved). You will be queried as above in | |
3141 order to specify where you want the file/directory to be moved. | |
3142 | |
6476 | 3143 If you answer a renaming query with a "s/frompattern/topattern/", then |
3144 subsequent files on the marked file list will be renamed by taking each | |
3145 name, applying that substitute, and renaming each file to the result. | |
3146 As an example : > | |
3147 | |
3148 mr [query: reply with *.c] | |
3149 R [query: reply with s/^\(.*\)\.c$/\1.cpp/] | |
3150 < | |
3151 This example will mark all *.c files and then rename them to *.cpp | |
3152 files. | |
3153 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3154 The ctrl-X character has special meaning for renaming files: > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3155 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3156 <c-x> : a single ctrl-x tells netrw to ignore the portion of the response |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3157 lying between the last '/' and the ctrl-x. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3158 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3159 <c-x><c-x> : a pair of contiguous ctrl-x's tells netrw to ignore any |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3160 portion of the string preceding the double ctrl-x's. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3161 < |
1621 | 3162 WARNING:~ |
3163 | |
3164 Note that moving files is a dangerous operation; copies are safer. That's | |
3165 because a "move" for remote files is actually a copy + delete -- and if | |
3166 the copy fails and the delete does not, you may lose the file. | |
5734 | 3167 Use at your own risk. |
1621 | 3168 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3169 The g:netrw_rename_cmd variable is used to implement remote renaming. By |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3170 default its value is: |
1621 | 3171 |
3172 ssh HOSTNAME mv | |
3173 | |
3174 One may rename a block of files and directories by selecting them with | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3175 V (|linewise-visual|) when using thin style |
1621 | 3176 |
3177 | |
3178 SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2 | |
3179 | |
3180 One may select the sorting style by name, time, or (file) size. The "s" map | |
3181 allows one to circulate amongst the three choices; the directory listing will | |
3182 automatically be refreshed to reflect the selected style. | |
3183 | |
3184 Related topics: |netrw-r| |netrw-S| | |
3185 Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence| | |
3186 | |
3187 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3188 SETTING EDITING WINDOW *netrw-editwindow* *netrw-C* *netrw-:NetrwC* {{{2 |
6476 | 3189 |
3190 One may select a netrw window for editing with the "C" mapping, using the | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3191 :NetrwC [win#] command, or by setting |g:netrw_chgwin| to the selected window |
6476 | 3192 number. Subsequent selection of a file to edit (|netrw-cr|) will use that |
3193 window. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3194 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3195 * C : by itself, will select the current window holding a netrw buffer |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3196 for editing via |netrw-cr|. The C mapping is only available while in |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3197 netrw buffers. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3198 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3199 * [count]C : the count will be used as the window number to be used |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3200 for subsequent editing via |netrw-cr|. |
6476 | 3201 |
3202 * :NetrwC will set |g:netrw_chgwin| to the current window | |
3203 | |
3204 * :NetrwC win# will set |g:netrw_chgwin| to the specified window | |
3205 number | |
3206 | |
5929 | 3207 Using > |
3208 let g:netrw_chgwin= -1 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3209 will restore the default editing behavior |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3210 (ie. editing will use the current window). |
5929 | 3211 |
5618 | 3212 Related topics: |netrw-cr| |g:netrw_browse_split| |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3213 Associated setting variables: |g:netrw_chgwin| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3214 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3215 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3216 SHRINKING OR EXPANDING A NETRW OR LEXPLORE WINDOW *netrw-c-tab* {{{2 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3217 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3218 The <c-tab> key will toggle a netrw or |:Lexplore| window's width, |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3219 but only if |g:netrw_usetab| exists and is non-zero (and, of course, |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3220 only if your terminal supports differentiating <c-tab> from a plain |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3221 <tab>). |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3222 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3223 * If the current window is a netrw window, toggle its width |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3224 (between |g:netrw_wiw| and its original width) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3225 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3226 * Else if there is a |:Lexplore| window in the current tab, toggle |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3227 its width |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3228 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3229 * Else bring up a |:Lexplore| window |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3230 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3231 If |g:netrw_usetab| exists or is zero, or if there is a pre-existing mapping |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3232 for <c-tab>, then the <c-tab> will not be mapped. One may map something other |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3233 than a <c-tab>, too: (but you'll still need to have had g:netrw_usetab set) > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3234 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3235 nmap <unique> (whatever) <Plug>NetrwShrink |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3236 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3237 Related topics: |:Lexplore| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3238 Associated setting variable: |g:netrw_usetab| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3239 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3240 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3241 USER SPECIFIED MAPS *netrw-usermaps* {{{1 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3242 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3243 One may make customized user maps. Specify a variable, |g:Netrw_UserMaps|, |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3244 to hold a |List| of lists of keymap strings and function names: > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3245 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3246 [["keymap-sequence","ExampleUserMapFunc"],...] |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3247 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3248 When netrw is setting up maps for a netrw buffer, if |g:Netrw_UserMaps| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3249 exists, then the internal function netrw#UserMaps(islocal) is called. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3250 This function goes through all the entries in the |g:Netrw_UserMaps| list: |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3251 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3252 * sets up maps: > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3253 nno <buffer> <silent> KEYMAP-SEQUENCE |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3254 :call s:UserMaps(islocal,"ExampleUserMapFunc") |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3255 < * refreshes if result from that function call is the string |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3256 "refresh" |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3257 * if the result string is not "", then that string will be |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3258 executed (:exe result) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3259 * if the result is a List, then the above two actions on results |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3260 will be taken for every string in the result List |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3261 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3262 The user function is passed one argument; it resembles > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3263 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3264 fun! ExampleUserMapFunc(islocal) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3265 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3266 where a:islocal is 1 if its a local-directory system call or 0 when |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3267 remote-directory system call. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3268 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3269 Use netrw#Expose("varname") to access netrw-internal (script-local) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3270 variables. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3271 Use netrw#Modify("varname",newvalue) to change netrw-internal variables. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3272 Use netrw#Call("funcname"[,args]) to call a netrw-internal function with |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3273 specified arguments. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3274 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3275 Example: Get a copy of netrw's marked file list: > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3276 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3277 let netrwmarkfilelist= netrw#Expose("netrwmarkfilelist") |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3278 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3279 Example: Modify the value of netrw's marked file list: > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3280 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3281 call netrw#Modify("netrwmarkfilelist",[]) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3282 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3283 Example: Clear netrw's marked file list via a mapping on gu > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3284 " ExampleUserMap: {{{2 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3285 fun! ExampleUserMap(islocal) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3286 call netrw#Modify("netrwmarkfilelist",[]) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3287 call netrw#Modify('netrwmarkfilemtch_{bufnr("%")}',"") |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3288 let retval= ["refresh"] |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3289 return retval |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3290 endfun |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3291 let g:Netrw_UserMaps= [["gu","ExampleUserMap"]] |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3292 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3293 |
1621 | 3294 10. Problems and Fixes *netrw-problems* {{{1 |
24 | 3295 |
3296 (This section is likely to grow as I get feedback) | |
3297 (also see |netrw-debug|) | |
477 | 3298 *netrw-p1* |
24 | 3299 P1. I use windows 95, and my ftp dumps four blank lines at the |
3300 end of every read. | |
3301 | |
3302 See |netrw-fixup|, and put the following into your | |
3303 <.vimrc> file: | |
3304 | |
3305 let g:netrw_win95ftp= 1 | |
466 | 3306 |
477 | 3307 *netrw-p2* |
1121 | 3308 P2. I use Windows, and my network browsing with ftp doesn't sort by |
3309 time or size! -or- The remote system is a Windows server; why | |
3310 don't I get sorts by time or size? | |
24 | 3311 |
3312 Windows' ftp has a minimal support for ls (ie. it doesn't | |
3313 accept sorting options). It doesn't support the -F which | |
3314 gives an explanatory character (ABC/ for "ABC is a directory"). | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3315 Netrw then uses "dir" to get both its thin and long listings. |
1121 | 3316 If you think your ftp does support a full-up ls, put the |
3317 following into your <.vimrc>: > | |
24 | 3318 |
1121 | 3319 let g:netrw_ftp_list_cmd = "ls -lF" |
3320 let g:netrw_ftp_timelist_cmd= "ls -tlF" | |
3321 let g:netrw_ftp_sizelist_cmd= "ls -slF" | |
3322 < | |
24 | 3323 Alternatively, if you have cygwin on your Windows box, put |
1121 | 3324 into your <.vimrc>: > |
24 | 3325 |
3326 let g:netrw_cygwin= 1 | |
1121 | 3327 < |
3328 This problem also occurs when the remote system is Windows. | |
3329 In this situation, the various g:netrw_ftp_[time|size]list_cmds | |
3330 are as shown above, but the remote system will not correctly | |
3331 modify its listing behavior. | |
3332 | |
24 | 3333 |
477 | 3334 *netrw-p3* |
24 | 3335 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw |
3336 used ssh! That wasn't what I asked for... | |
3337 | |
3338 Netrw has two methods for browsing remote directories: ssh | |
3339 and ftp. Unless you specify ftp specifically, ssh is used. | |
3340 When it comes time to do download a file (not just a directory | |
3341 listing), netrw will use the given protocol to do so. | |
3342 | |
477 | 3343 *netrw-p4* |
24 | 3344 P4. I would like long listings to be the default. |
3345 | |
1621 | 3346 Put the following statement into your |.vimrc|: > |
3347 | |
1121 | 3348 let g:netrw_liststyle= 1 |
1621 | 3349 < |
3350 Check out |netrw-browser-var| for more customizations that | |
26 | 3351 you can set. |
24 | 3352 |
477 | 3353 *netrw-p5* |
24 | 3354 P5. My times come up oddly in local browsing |
3355 | |
3356 Does your system's strftime() accept the "%c" to yield dates | |
4339 | 3357 such as "Sun Apr 27 11:49:23 1997"? If not, do a |
3358 "man strftime" and find out what option should be used. Then | |
3359 put it into your |.vimrc|: > | |
1621 | 3360 |
24 | 3361 let g:netrw_timefmt= "%X" (where X is the option) |
1621 | 3362 < |
477 | 3363 *netrw-p6* |
26 | 3364 P6. I want my current directory to track my browsing. |
3365 How do I do that? | |
24 | 3366 |
1621 | 3367 Put the following line in your |.vimrc|: |
3368 > | |
794 | 3369 let g:netrw_keepdir= 0 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3370 < |
1121 | 3371 *netrw-p7* |
3372 P7. I use Chinese (or other non-ascii) characters in my filenames, and | |
3373 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them! | |
466 | 3374 |
1121 | 3375 (taken from an answer provided by Wu Yongwei on the vim |
3376 mailing list) | |
5734 | 3377 I now see the problem. Your code page is not 936, right? Vim |
1121 | 3378 seems only able to open files with names that are valid in the |
3379 current code page, as are many other applications that do not | |
3380 use the Unicode version of Windows APIs. This is an OS-related | |
3381 issue. You should not have such problems when the system | |
3382 locale uses UTF-8, such as modern Linux distros. | |
3383 | |
3384 (...it is one more reason to recommend that people use utf-8!) | |
3385 | |
3386 *netrw-p8* | |
3387 P8. I'm getting "ssh is not executable on your system" -- what do I | |
3388 do? | |
3389 | |
3390 (Dudley Fox) Most people I know use putty for windows ssh. It | |
3391 is a free ssh/telnet application. You can read more about it | |
3392 here: | |
3393 | |
3394 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also: | |
3395 | |
3396 (Marlin Unruh) This program also works for me. It's a single | |
3397 executable, so he/she can copy it into the Windows\System32 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3398 folder and create a shortcut to it. |
1121 | 3399 |
3400 (Dudley Fox) You might also wish to consider plink, as it | |
3401 sounds most similar to what you are looking for. plink is an | |
3402 application in the putty suite. | |
3403 | |
3404 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink | |
3405 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3406 (Vissale Neang) Maybe you can try OpenSSH for windows, which |
1121 | 3407 can be obtained from: |
3408 | |
3409 http://sshwindows.sourceforge.net/ | |
3410 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3411 It doesn't need the full Cygwin package. |
1121 | 3412 |
3413 (Antoine Mechelynck) For individual Unix-like programs needed | |
3414 for work in a native-Windows environment, I recommend getting | |
3415 them from the GnuWin32 project on sourceforge if it has them: | |
3416 | |
3417 http://gnuwin32.sourceforge.net/ | |
3418 | |
3419 Unlike Cygwin, which sets up a Unix-like virtual machine on | |
3420 top of Windows, GnuWin32 is a rewrite of Unix utilities with | |
3421 Windows system calls, and its programs works quite well in the | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3422 cmd.exe "Dos box". |
1121 | 3423 |
3424 (dave) Download WinSCP and use that to connect to the server. | |
3425 In Preferences > Editors, set gvim as your editor: | |
3426 | |
3427 - Click "Add..." | |
3428 - Set External Editor (adjust path as needed, include | |
3429 the quotes and !.! at the end): | |
3430 "c:\Program Files\Vim\vim70\gvim.exe" !.! | |
3431 - Check that the filetype in the box below is | |
3432 {asterisk}.{asterisk} (all files), or whatever types | |
3433 you want (cec: change {asterisk} to * ; I had to | |
3434 write it that way because otherwise the helptags | |
1621 | 3435 system thinks it's a tag) |
3436 - Make sure it's at the top of the listbox (click it, | |
3437 then click "Up" if it's not) | |
1121 | 3438 If using the Norton Commander style, you just have to hit <F4> |
3439 to edit a file in a local copy of gvim. | |
3440 | |
3441 (Vit Gottwald) How to generate public/private key and save | |
3442 public key it on server: > | |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
3443 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
3444 (8.3 Getting ready for public key authentication) |
1121 | 3445 < |
1621 | 3446 How to use a private key with 'pscp': > |
3447 | |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
3448 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
3449 (5.2.4 Using public key authentication with PSCP) |
1121 | 3450 < |
1621 | 3451 (Ben Schmidt) I find the ssh included with cwRsync is |
3452 brilliant, and install cwRsync or cwRsyncServer on most | |
3453 Windows systems I come across these days. I guess COPSSH, | |
3454 packed by the same person, is probably even better for use as | |
3455 just ssh on Windows, and probably includes sftp, etc. which I | |
3456 suspect the cwRsync doesn't, though it might | |
3457 | |
1121 | 3458 (cec) To make proper use of these suggestions above, you will |
3459 need to modify the following user-settable variables in your | |
3460 .vimrc: | |
3461 | |
1621 | 3462 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd| |
3463 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd| | |
1121 | 3464 |
3465 The first one (|g:netrw_ssh_cmd|) is the most important; most | |
3466 of the others will use the string in g:netrw_ssh_cmd by | |
3467 default. | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3468 |
1121 | 3469 *netrw-p9* *netrw-ml_get* |
3470 P9. I'm browsing, changing directory, and bang! ml_get errors | |
3471 appear and I have to kill vim. Any way around this? | |
3472 | |
3473 Normally netrw attempts to avoid writing swapfiles for | |
3474 its temporary directory buffers. However, on some systems | |
3475 this attempt appears to be causing ml_get errors to | |
3476 appear. Please try setting |g:netrw_use_noswf| to 0 | |
3477 in your <.vimrc>: > | |
3478 let g:netrw_use_noswf= 0 | |
3479 < | |
1621 | 3480 *netrw-p10* |
3481 P10. I'm being pestered with "[something] is a directory" and | |
3482 "Press ENTER or type command to continue" prompts... | |
3483 | |
3484 The "[something] is a directory" prompt is issued by Vim, | |
3485 not by netrw, and there appears to be no way to work around | |
3486 it. Coupled with the default cmdheight of 1, this message | |
3487 causes the "Press ENTER..." prompt. So: read |hit-enter|; | |
3488 I also suggest that you set your |'cmdheight'| to 2 (or more) in | |
3489 your <.vimrc> file. | |
3490 | |
3491 *netrw-p11* | |
3492 P11. I want to have two windows; a thin one on the left and my editing | |
2908 | 3493 window on the right. How may I accomplish this? |
1621 | 3494 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3495 You probably want netrw running as in a side window. If so, you |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3496 will likely find that ":[N]Lexplore" does what you want. The |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3497 optional "[N]" allows you to select the quantity of columns you |
7188
3ba0f29ba1d1
commit https://github.com/vim/vim/commit/d7464be9747fcaa8e6210e1f00a3882932df76e2
Christian Brabandt <cb@256bit.org>
parents:
7183
diff
changeset
|
3498 wish the |:Lexplore|r window to start with (see |g:netrw_winsize| |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3499 for how this parameter works). |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3500 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3501 Previous solution: |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3502 |
1621 | 3503 * Put the following line in your <.vimrc>: |
3504 let g:netrw_altv = 1 | |
3505 * Edit the current directory: :e . | |
3506 * Select some file, press v | |
3507 * Resize the windows as you wish (see |CTRL-W_<| and | |
3508 |CTRL-W_>|). If you're using gvim, you can drag | |
3509 the separating bar with your mouse. | |
3510 * When you want a new file, use ctrl-w h to go back to the | |
3511 netrw browser, select a file, then press P (see |CTRL-W_h| | |
3512 and |netrw-P|). If you're using gvim, you can press | |
3513 <leftmouse> in the browser window and then press the | |
3514 <middlemouse> to select the file. | |
24 | 3515 |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3516 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3517 *netrw-p12* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3518 P12. My directory isn't sorting correctly, or unwanted letters are |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3519 appearing in the listed filenames, or things aren't lining |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3520 up properly in the wide listing, ... |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3521 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3522 This may be due to an encoding problem. I myself usually use |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3523 utf-8, but really only use ascii (ie. bytes from 32-126). |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3524 Multibyte encodings use two (or more) bytes per character. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3525 You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3526 |
2152 | 3527 *netrw-p13* |
3528 P13. I'm a Windows + putty + ssh user, and when I attempt to browse, | |
3529 the directories are missing trailing "/"s so netrw treats them | |
3530 as file transfers instead of as attempts to browse | |
3531 subdirectories. How may I fix this? | |
3532 | |
3533 (mikeyao) If you want to use vim via ssh and putty under Windows, | |
3534 try combining the use of pscp/psftp with plink. pscp/psftp will | |
3535 be used to connect and plink will be used to execute commands on | |
3536 the server, for example: list files and directory using 'ls'. | |
3537 | |
3538 These are the settings I use to do this: | |
3539 > | |
3540 " list files, it's the key setting, if you haven't set, | |
3541 " you will get a blank buffer | |
3542 let g:netrw_list_cmd = "plink HOSTNAME ls -Fa" | |
3543 " if you haven't add putty directory in system path, you should | |
3544 " specify scp/sftp command. For examples: | |
3545 "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe" | |
3546 "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe" | |
3547 < | |
2908 | 3548 *netrw-p14* |
6476 | 3549 P14. I would like to speed up writes using Nwrite and scp/ssh |
2908 | 3550 style connections. How? (Thomer M. Gil) |
3551 | |
3552 Try using ssh's ControlMaster and ControlPath (see the ssh_config | |
3553 man page) to share multiple ssh connections over a single network | |
3554 connection. That cuts out the cryptographic handshake on each | |
3555 file write, sometimes speeding it up by an order of magnitude. | |
3556 (see http://thomer.com/howtos/netrw_ssh.html) | |
3557 (included by permission) | |
3558 | |
3559 Add the following to your ~/.ssh/config: > | |
3560 | |
3561 # you change "*" to the hostname you care about | |
3562 Host * | |
3563 ControlMaster auto | |
3564 ControlPath /tmp/%r@%h:%p | |
3565 | |
3566 < Then create an ssh connection to the host and leave it running: > | |
3567 | |
3568 ssh -N host.domain.com | |
3569 | |
3570 < Now remotely open a file with Vim's Netrw and enjoy the | |
3571 zippiness: > | |
3572 | |
3573 vim scp://host.domain.com//home/user/.bashrc | |
3574 < | |
3575 *netrw-p15* | |
3576 P15. How may I use a double-click instead of netrw's usual single click | |
3577 to open a file or directory? (Ben Fritz) | |
3578 | |
3579 First, disable netrw's mapping with > | |
3580 let g:netrw_mousemaps= 0 | |
3581 < and then create a netrw buffer only mapping in | |
3582 $HOME/.vim/after/ftplugin/netrw.vim: > | |
3583 nmap <buffer> <2-leftmouse> <CR> | |
3584 < Note that setting g:netrw_mousemaps to zero will turn off | |
3585 all netrw's mouse mappings, not just the <leftmouse> one. | |
3586 (see |g:netrw_mousemaps|) | |
2152 | 3587 |
5929 | 3588 *netrw-p16* |
3589 P16. When editing remote files (ex. :e ftp://hostname/path/file), | |
3590 under Windows I get an |E303| message complaining that its unable | |
3591 to open a swap file. | |
3592 | |
3593 (romainl) It looks like you are starting Vim from a protected | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3594 directory. Start netrw from your $HOME or other writable |
5929 | 3595 directory. |
3596 | |
6476 | 3597 *netrw-p17* |
3598 P17. Netrw is closing buffers on its own. | |
3599 What steps will reproduce the problem? | |
3600 1. :Explore, navigate directories, open a file | |
3601 2. :Explore, open another file | |
3602 3. Buffer opened in step 1 will be closed. o | |
3603 What is the expected output? What do you see instead? | |
3604 I expect both buffers to exist, but only the last one does. | |
3605 | |
3606 (Lance) Problem is caused by "set autochdir" in .vimrc. | |
3607 (drchip) I am able to duplicate this problem with |'acd'| set. | |
3608 It appears that the buffers are not exactly closed; | |
3609 a ":ls!" will show them (although ":ls" does not). | |
3610 | |
3611 *netrw-P18* | |
3612 P18. How to locally edit a file that's only available via | |
3613 another server accessible via ssh? | |
3614 See http://stackoverflow.com/questions/12469645/ | |
3615 "Using Vim to Remotely Edit A File on ServerB Only | |
3616 Accessible From ServerA" | |
3617 | |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3618 *netrw-P19* |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3619 P19. How do I get numbering on in directory listings? |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3620 With |g:netrw_bufsettings|, you can control netrw's buffer |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3621 settings; try putting > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3622 let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu" |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3623 < in your .vimrc. If you'd like to have relative numbering |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3624 instead, try > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3625 let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu" |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3626 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3627 *netrw-P20* |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3628 P20. How may I have gvim start up showing a directory listing? |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3629 Try putting the following code snippet into your .vimrc: > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3630 augroup VimStartup |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3631 au! |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3632 au VimEnter * if expand("%") == "" && argc() == 0 && |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3633 \ (v:servername =~ 'GVIM\d*' || v:servername == "") |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3634 \ | e . | endif |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3635 augroup END |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3636 < You may use Lexplore instead of "e" if you're so inclined. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3637 This snippet assumes that you have client-server enabled |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3638 (ie. a "huge" vim version). |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3639 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3640 *netrw-P21* |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3641 P21. I've made a directory (or file) with an accented character, but |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3642 netrw isn't letting me enter that directory/read that file: |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3643 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3644 Its likely that the shell or o/s is using a different encoding |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3645 than you have vim (netrw) using. A patch to vim supporting |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3646 "systemencoding" may address this issue in the future; for |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3647 now, just have netrw use the proper encoding. For example: > |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3648 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3649 au FileType netrw set enc=latin1 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3650 < |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3651 *netrw-P22* |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3652 P22. I get an error message when I try to copy or move a file: |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3653 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3654 **error** (netrw) tried using g:netrw_localcopycmd<cp>; it doesn't work! |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3655 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3656 What's wrong? |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3657 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3658 Netrw uses several system level commands to do things (see |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3659 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3660 |g:netrw_localcopycmd|, |g:netrw_localmovecmd|, |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3661 |g:netrw_localrmdir|, |g:netrw_mkdir_cmd|). |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3662 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3663 You may need to adjust the default commands for one or more of |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3664 these commands by setting them properly in your .vimrc. Another |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3665 source of difficulty is that these commands use vim's local |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3666 directory, which may not be the same as the browsing directory |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3667 shown by netrw (see |g:netrw_keepdir|). |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3668 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3669 |
24 | 3670 ============================================================================== |
1621 | 3671 11. Debugging Netrw Itself *netrw-debug* {{{1 |
7 | 3672 |
6476 | 3673 Step 1: check that the problem you've encountered hasn't already been resolved |
3674 by obtaining a copy of the latest (often developmental) netrw at: | |
3675 | |
3676 http://www.drchip.org/astronaut/vim/index.html#NETRW | |
3677 | |
3678 The <netrw.vim> script is typically installed on systems as something like: | |
477 | 3679 > |
2751 | 3680 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim |
3681 /usr/local/share/vim/vim7x/autoload/netrw.vim | |
6476 | 3682 (see output of :echo &rtp) |
477 | 3683 < |
6476 | 3684 which is loaded automatically at startup (assuming :set nocp). If you |
3685 installed a new netrw, then it will be located at > | |
3686 | |
3687 $HOME/.vim/plugin/netrwPlugin.vim | |
3688 $HOME/.vim/autoload/netrw.vim | |
3689 < | |
3690 Step 2: assuming that you've installed the latest version of netrw, | |
3691 check that your problem is really due to netrw. Create a file | |
3692 called netrw.vimrc with the following contents: > | |
3693 | |
3694 set nocp | |
3695 so $HOME/.vim/plugin/netrwPlugin.vim | |
3696 < | |
3697 Then run netrw as follows: > | |
3698 | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3699 vim -u netrw.vimrc --noplugins -i NONE [some path here] |
6476 | 3700 < |
3701 Perform whatever netrw commands you need to, and check that the problem is | |
3702 still present. This procedure sidesteps any issues due to personal .vimrc | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3703 settings, .viminfo file, and other plugins. If the problem does not appear, |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3704 then you need to determine which setting in your .vimrc is causing the |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3705 conflict with netrw or which plugin(s) is/are involved. |
6476 | 3706 |
3707 Step 3: If the problem still is present, then get a debugging trace from | |
3708 netrw: | |
7 | 3709 |
3710 1. Get the <Decho.vim> script, available as: | |
3711 | |
3920 | 3712 http://www.drchip.org/astronaut/vim/index.html#DECHO |
7 | 3713 or |
534 | 3714 http://vim.sourceforge.net/scripts/script.php?script_id=120 |
7 | 3715 |
5734 | 3716 Decho.vim is provided as a "vimball"; see |vimball-intro|. |
1621 | 3717 |
3718 2. Edit the <netrw.vim> file by typing: > | |
22 | 3719 |
3720 vim netrw.vim | |
7 | 3721 :DechoOn |
22 | 3722 :wq |
1621 | 3723 < |
3724 To restore to normal non-debugging behavior, re-edit <netrw.vim> | |
3725 and type > | |
7 | 3726 |
22 | 3727 vim netrw.vim |
3728 :DechoOff | |
3729 :wq | |
1621 | 3730 < |
22 | 3731 This command, provided by <Decho.vim>, will comment out all |
3732 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()). | |
3733 | |
1621 | 3734 3. Then bring up vim and attempt to evoke the problem by doing a |
3735 transfer or doing some browsing. A set of messages should appear | |
3736 concerning the steps that <netrw.vim> took in attempting to | |
6476 | 3737 read/write your file over the network in a separate tab or |
3738 server vim window. | |
7 | 3739 |
1121 | 3740 To save the file, use > |
5618 | 3741 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3742 :tabnext |
1121 | 3743 :set bt= |
3744 :w! DBG | |
5618 | 3745 |
3746 < Furthermore, it'd be helpful if you would type > | |
5734 | 3747 :Dsep <command> |
3748 < where <command> is the command you're about to type next, | |
3749 thereby making it easier to associate which part of the | |
3750 debugging trace is due to which command. | |
3751 | |
3752 Please send that information to <netrw.vim>'s maintainer along | |
6476 | 3753 with the o/s you're using and the vim version that you're using |
5734 | 3754 (see |:version|) > |
36 | 3755 NdrOchip at ScampbellPfamily.AbizM - NOSPAM |
1121 | 3756 < |
7 | 3757 ============================================================================== |
1121 | 3758 12. History *netrw-history* {{{1 |
7 | 3759 |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3760 v155: Oct 29, 2015 * (Timur Fayzrakhmanov) reported that netrw's |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3761 mapping of ctrl-l was not allowing refresh of |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3762 other windows when it was done in a netrw |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3763 window. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3764 Nov 05, 2015 * Improved s:TreeSqueezeDir() to use search() |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3765 instead of a loop |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3766 * NetrwBrowse() will return line to |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3767 w:netrw_bannercnt if cursor ended up in |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3768 banner |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3769 Nov 16, 2015 * Added a <Plug>NetrwTreeSqueeze (|netrw-s-cr|) |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3770 Nov 17, 2015 * Commented out imaps -- perhaps someone can |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3771 tell me how they're useful and should be |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3772 retained? |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3773 Nov 20, 2015 * Added |netrw-ma| and |netrw-mA| support |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3774 Nov 20, 2015 * gx (|netrw-gx|) on an url downloaded the |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3775 file in addition to simply bringing up the |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3776 url in a browser. Fixed. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3777 Nov 23, 2015 * Added |g:netrw_sizestyle| support |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3778 Nov 27, 2015 * Inserted a lot of <c-u>s into various netrw |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3779 maps. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3780 Jan 05, 2016 * |netrw-qL| implemented to mark files based |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3781 upon |location-list|s; similar to |netrw-qF|. |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3782 Jan 19, 2016 * using - call delete(directoryname,"d") - |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3783 instead of using g:netrw_localrmdir if |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3784 v7.4 + patch#1107 is available |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3785 Jan 28, 2016 * changed to using |winsaveview()| and |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3786 |winrestview()| |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3787 Jan 28, 2016 * s:NetrwTreePath() now does a save and |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3788 restore of view |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3789 Feb 08, 2016 * Fixed a tree-listing problem with remote |
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3790 directories |
7183
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3791 v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3792 a file was not treated properly as a file |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3793 due to g:netrw_keepdir == 1 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3794 Mar 25, 2015 * (requested by Ben Friz) one may now sort by |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3795 extension |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3796 Mar 28, 2015 * (requested by Matt Brooks) netrw has a lot |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3797 of buffer-local mappings; however, some |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3798 plugins (such as vim-surround) set up |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3799 conflicting mappings that cause vim to wait. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3800 The "<nowait>" modifier has been included |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3801 with most of netrw's mappings to avoid that |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3802 delay. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3803 Jun 26, 2015 * |netrw-gn| mapping implemted |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3804 * :Ntree NotADir resulted in having |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3805 the tree listing expand in the error messages |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3806 window. Fixed. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3807 Jun 29, 2015 * Attempting to delete a file remotely caused |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3808 an error with "keepsol" mentioned; fixed. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3809 Jul 08, 2015 * Several changes to keep the |:jumps| table |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3810 correct when working with |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3811 |g:netrw_fastbrowse| set to 2 |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3812 * wide listing with accented characters fixed |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3813 (using %-S instead of %-s with a |printf()| |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3814 Jul 13, 2015 * (Daniel Hahler) CheckIfKde() could be true |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3815 but kfmclient not installed. Changed order |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3816 in netrw#BrowseX(): checks if kde and |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3817 kfmclient, then will use xdg-open on a unix |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3818 system (if xdg-open is executable) |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3819 Aug 11, 2015 * (McDonnell) tree listing mode wouldn't |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3820 select a file in a open subdirectory. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3821 * (McDonnell) when multiple subdirectories |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3822 were concurrently open in tree listing |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3823 mode, a ctrl-L wouldn't refresh properly. |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3824 * The netrw:target menu showed duplicate |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3825 entries |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3826 Oct 13, 2015 * (mattn) provided an exception to handle |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3827 windows with shellslash set but no shell |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3828 Oct 23, 2015 * if g:netrw_usetab and <c-tab> now used |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3829 to control whether NetrwShrink is used |
ffad29dc7eee
commit https://github.com/vim/vim/commit/a0f849ee40cbea3c889345256786b640b0becca2
Christian Brabandt <cb@256bit.org>
parents:
6476
diff
changeset
|
3830 (see |netrw-c-tab|) |
6476 | 3831 v153: May 13, 2014 * added another |g:netrw_ffkeep| usage {{{2 |
3832 May 14, 2014 * changed s:PerformListing() so that it | |
3833 always sets ft=netrw for netrw buffers | |
3834 (ie. even when syntax highlighting is | |
3835 off, not available, etc) | |
3836 May 16, 2014 * introduced the |netrw-ctrl-r| functionality | |
3837 May 17, 2014 * introduced the |netrw-:NetrwMB| functionality | |
3838 * mb and mB (|netrw-mb|, |netrw-mB|) will | |
3839 add/remove marked files from bookmark list | |
3840 May 20, 2014 * (Enno Nagel) reported that :Lex <dirname> | |
3841 wasn't working. Fixed. | |
3842 May 26, 2014 * restored test to prevent leftmouse window | |
3843 resizing from causing refresh. | |
3844 (see s:NetrwLeftmouse()) | |
3845 * fixed problem where a refresh caused cursor | |
3846 to go just under the banner instead of | |
3847 staying put | |
3848 May 28, 2014 * (László Bimba) provided a patch for opening | |
3849 the |:Lexplore| window 100% high, optionally | |
3850 on the right, and will work with remote | |
3851 files. | |
3852 May 29, 2014 * implemented :NetrwC (see |netrw-:NetrwC|) | |
3853 Jun 01, 2014 * Removed some "silent"s from commands used | |
3854 to implemented scp://... and pscp://... | |
3855 directory listing. Permits request for | |
3856 password to appear. | |
3857 Jun 05, 2014 * (Enno Nagel) reported that user maps "/" | |
3858 caused problems with "b" and "w", which | |
3859 are mapped (for wide listings only) to | |
3860 skip over files rather than just words. | |
3861 Jun 10, 2014 * |g:netrw_gx| introduced to allow users to | |
3862 override default "<cfile>" with the gx | |
3863 (|netrw-gx|) map | |
3864 Jun 11, 2014 * gx (|netrw-gx|), with |'autowrite'| set, | |
3865 will write modified files. s:NetrwBrowseX() | |
3866 will now save, turn off, and restore the | |
3867 |'autowrite'| setting. | |
3868 Jun 13, 2014 * added visual map for gx use | |
3869 Jun 15, 2014 * (Enno Nagel) reported that with having hls | |
3870 set and wide listing style in use, that the | |
3871 b and w maps caused unwanted highlighting. | |
3872 Jul 05, 2014 * |netrw-mv| and |netrw-mX| commands included | |
3873 Jul 09, 2014 * |g:netrw_keepj| included, allowing optional | |
3874 keepj | |
3875 Jul 09, 2014 * fixing bugs due to previous update | |
3876 Jul 21, 2014 * (Bruno Sutic) provided an updated | |
3877 netrw_gitignore.vim | |
3878 Jul 30, 2014 * (Yavuz Yetim) reported that editing two | |
3879 remote files of the same name caused the | |
3880 second instance to have a "temporary" | |
3881 name. Fixed: now they use the same buffer. | |
3882 Sep 18, 2014 * (Yasuhiro Matsumoto) provided a patch which | |
3883 allows scp and windows local paths to work. | |
3884 Oct 07, 2014 * gx (see |netrw-gx|) when atop a directory, | |
3885 will now do |gf| instead | |
3886 Nov 06, 2014 * For cygwin: cygstart will be available for | |
3887 netrw#BrowseX() to use if its executable. | |
3888 Nov 07, 2014 * Began support for file://... urls. Will use | |
3889 |g:netrw_file_cmd| (typically elinks or links) | |
3890 Dec 02, 2014 * began work on having mc (|netrw-mc|) copy | |
3891 directories. Works for linux machines, | |
3892 cygwin+vim, but not for windows+gvim. | |
3893 Dec 02, 2014 * in tree mode, netrw was not opening | |
3894 directories via symbolic links. | |
3895 Dec 02, 2014 * added resolved link information to | |
3896 thin and tree modes | |
3897 Dec 30, 2014 * (issue#231) |:ls| was not showing | |
3898 remote-file buffers reliably. Fixed. | |
3899 v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires {{{2 | |
5929 | 3900 vim 7.4 with patch 213) |
3901 * (Enno Nagel) turn |'rnu'| off in netrw | |
3902 buffers. | |
3903 * (Quinn Strahl) suggested that netrw | |
3904 allow regular window splitting to occur, | |
3905 thereby allowing |'equalalways'| to take | |
3906 effect. | |
3907 * (qingtian zhao) normally, netrw will | |
3908 save and restore the |'fileformat'|; | |
3909 however, sometimes that isn't wanted | |
3910 Apr 14, 2014 * whenever netrw marks a buffer as ro, | |
3911 it will also mark it as nomod. | |
3912 Apr 16, 2014 * sftp protocol now supported by | |
3913 netrw#Obtain(); this means that one | |
3914 may use "mc" to copy a remote file | |
3915 to a local file using sftp, and that | |
3916 the |netrw-O| command can obtain remote | |
3917 files via sftp. | |
3918 * added [count]C support (see |netrw-C|) | |
3919 Apr 18, 2014 * when |g:netrw_chgwin| is one more than | |
3920 the last window, then vertically split | |
3921 the last window and use it as the | |
3922 chgwin window. | |
3923 May 09, 2014 * SavePosn was "saving filename under cursor" | |
3924 from a non-netrw window when using :Rex. | |
6476 | 3925 v151: Jan 22, 2014 * extended :Rexplore to return to buffer {{{2 |
5734 | 3926 prior to Explore or editing a directory |
3927 * (Ken Takata) netrw gave error when | |
3928 clipboard was disabled. Sol'n: Placed | |
3929 several if has("clipboard") tests in. | |
3930 * Fixed ftp://X@Y@Z// problem; X@Y now | |
3931 part of user id, and only Z is part of | |
3932 hostname. | |
3933 * (A Loumiotis) reported that completion | |
3934 using a directory name containing spaces | |
3935 did not work. Fixed with a retry in | |
3936 netrw#Explore() which removes the | |
3937 backslashes vim inserted. | |
3938 Feb 26, 2014 * :Rexplore now records the current file | |
3939 using w:netrw_rexfile when returning via | |
3940 |:Rexplore| | |
3941 Mar 08, 2014 * (David Kotchan) provided some patches | |
3942 allowing netrw to work properly with | |
3943 windows shares. | |
3944 * Multiple one-liner help messages available | |
3945 by pressing <cr> while atop the "Quick | |
3946 Help" line | |
3947 * worked on ShellCmdPost, FocusGained event | |
3948 handling. | |
3949 * |:Lexplore| path: will be used to update | |
3950 a left-side netrw browsing directory. | |
8148
f5da459c5698
commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents:
7188
diff
changeset
|
3951 Mar 12, 2014 * |netrw-s-cr|: use <s-cr> to close |
5734 | 3952 tree directory implemented |
3953 Mar 13, 2014 * (Tony Mechylynck) reported that using | |
3954 the browser with ftp on a directory, | |
3955 and selecting a gzipped txt file, that | |
3956 an E19 occurred (which was issued by | |
3957 gzip.vim). Fixed. | |
3958 Mar 14, 2014 * Implemented :MF and :MT (see |netrw-:MF| | |
3959 and |netrw-:MT|, respectively) | |
3960 Mar 17, 2014 * |:Ntree| [dir] wasn't working properly; fixed | |
3961 Mar 18, 2014 * Changed all uses of set to setl | |
3962 Mar 18, 2014 * Commented the netrw_btkeep line in | |
3963 s:NetrwOptionSave(); the effect is that | |
3964 netrw buffers will remain as |'bt'|=nofile. | |
3965 This should prevent swapfiles being created | |
3966 for netrw buffers. | |
3967 Mar 20, 2014 * Changed all uses of lcd to use s:NetrwLcd() | |
3968 instead. Consistent error handling results | |
3969 and it also handles Window's shares | |
3970 * Fixed |netrw-d| command when applied with ftp | |
3971 * https: support included for netrw#NetRead() | |
6476 | 3972 v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to {{{2 |
5618 | 3973 return to the netrw directory listing |
3974 Jul 13, 2013 * (Jonas Diemer) suggested changing | |
3975 a <cWORD> to <cfile>. | |
3976 Jul 21, 2013 * (Yuri Kanivetsky) reported that netrw's | |
3977 use of mkdir did not produce directories | |
5734 | 3978 following the user's umask. |
5618 | 3979 Aug 27, 2013 * introduced |g:netrw_altfile| option |
3980 Sep 05, 2013 * s:Strlen() now uses |strdisplaywidth()| | |
3981 when available, by default | |
3982 Sep 12, 2013 * (Selyano Baldo) reported that netrw wasn't | |
3983 opening some directories properly from the | |
3984 command line. | |
3985 Nov 09, 2013 * |:Lexplore| introduced | |
3986 * (Ondrej Platek) reported an issue with | |
3987 netrw's trees (P15). Fixed. | |
3988 * (Jorge Solis) reported that "t" in | |
3989 tree mode caused netrw to forget its | |
3990 line position. | |
3991 Dec 05, 2013 * Added <s-leftmouse> file marking | |
3992 (see |netrw-mf|) | |
3993 Dec 05, 2013 * (Yasuhiro Matsumoto) Explore should use | |
3994 strlen() instead s:Strlen() when handling | |
3995 multibyte chars with strpart() | |
3996 (ie. strpart() is byte oriented, not | |
3997 display-width oriented). | |
3998 Dec 09, 2013 * (Ken Takata) Provided a patch; File sizes | |
3999 and a portion of timestamps were wrongly | |
4000 highlighted with the directory color when | |
4001 setting `:let g:netrw_liststyle=1` on Windows. | |
4002 * (Paul Domaskis) noted that sometimes | |
4003 cursorline was activating in non-netrw | |
4004 windows. All but one setting of cursorline | |
4005 was done via setl; there was one that was | |
4006 overlooked. Fixed. | |
4007 Dec 24, 2013 * (esquifit) asked that netrw allow the | |
4008 /cygdrive prefix be a user-alterable | |
4009 parameter. | |
4010 Jan 02, 2014 * Fixed a problem with netrw-based ballon | |
4011 evaluation (ie. netrw#NetrwBaloonHelp() | |
4012 not having been loaded error messages) | |
4013 Jan 03, 2014 * Fixed a problem with tree listings | |
4014 * New command installed: |:Ntree| | |
4015 Jan 06, 2014 * (Ivan Brennan) reported a problem with | |
4016 |netrw-P|. Fixed. | |
4017 Jan 06, 2014 * Fixed a problem with |netrw-P| when the | |
4018 modified file was to be abandoned. | |
4019 Jan 15, 2014 * (Matteo Cavalleri) reported that when the | |
4020 banner is suppressed and tree listing is | |
4021 used, a blank line was left at the top of | |
4022 the display. Fixed. | |
4023 Jan 20, 2014 * (Gideon Go) reported that, in tree listing | |
4024 style, with a previous window open, that | |
4025 the wrong directory was being used to open | |
4026 a file. Fixed. (P21) | |
6476 | 4027 v149: Apr 18, 2013 * in wide listing format, now have maps for {{{2 |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4028 w and b to move to next/previous file |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4029 Apr 26, 2013 * one may now copy files in the same |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4030 directory; netrw will issue requests for |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4031 what names the files should be copied under |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4032 Apr 29, 2013 * Trying Benzinger's problem again. Seems |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4033 that commenting out the BufEnter and |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4034 installing VimEnter (only) works. Weird |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4035 problem! (tree listing, vim -O Dir1 Dir2) |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4036 May 01, 2013 * :Explore ftp://... wasn't working. Fixed. |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4037 May 02, 2013 * introduced |g:netrw_bannerbackslash| as |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
4038 requested by Paul Domaskis. |
5618 | 4039 Jul 03, 2013 * Explore now avoids splitting when a buffer |
4040 will be hidden. | |
6476 | 4041 v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct {{{2 |
4339 | 4042 choice of listing style, hiding style, and |
4043 sorting style | |
7 | 4044 |
4045 ============================================================================== | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4046 13. Todo *netrw-todo* {{{1 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4047 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4048 07/29/09 : banner :|g:netrw_banner| can be used to suppress the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4049 suppression banner. This feature is new and experimental, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4050 so its in the process of being debugged. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4051 09/04/09 : "gp" : See if it can be made to work for remote systems. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4052 : See if it can be made to work with marked files. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4053 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4054 ============================================================================== |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
4055 14. Credits *netrw-credits* {{{1 |
7 | 4056 |
4057 Vim editor by Bram Moolenaar (Thanks, Bram!) | |
4058 dav support by C Campbell | |
4059 fetch support by Bram Moolenaar and C Campbell | |
534 | 4060 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> |
7 | 4061 http support by Bram Moolenaar <bram@moolenaar.net> |
4062 rcp | |
4063 rsync support by C Campbell (suggested by Erik Warendorph) | |
4064 scp support by raf <raf@comdyn.com.au> | |
4065 sftp support by C Campbell | |
4066 | |
4067 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell | |
4068 | |
4069 Jérôme Augé -- also using new buffer method with ftp+.netrc | |
534 | 4070 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use, |
1209 | 4071 fetch,... |
7 | 4072 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution |
4073 Erik Warendorph -- for several suggestions (g:netrw_..._cmd | |
4074 variables, rsync etc) | |
534 | 4075 Doug Claar -- modifications to test for success with ftp |
1209 | 4076 operation |
7 | 4077 |
4078 ============================================================================== | |
1621 | 4079 Modelines: {{{1 |
459 | 4080 vim:tw=78:ts=8:ft=help:norl:fdm=marker |