comparison runtime/doc/pi_netrw.txt @ 11:4424b47a0797

updated for version 7.0003
author vimboss
date Wed, 30 Jun 2004 16:16:41 +0000
parents 4102fb4ea781
children bdeee1504ac1
comparison
equal deleted inserted replaced
10:4e2284e71352 11:4424b47a0797
1 *pi_netrw.txt* For Vim version 6.2. Last change: Jun 15, 2004 1 *pi_netrw.txt For Vim version 6.2. Last change: Jun 25, 2004
2 2
3 3
4 VIM REFERENCE MANUAL by Charles E. Campbell, Jr. 4 VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
5 5
6 *dav* *http* *network* *rcp* *scp* 6 *dav* *http* *network* *rcp* *scp*
14 2. Network-Oriented File Transfer......................|netrw-xfer| 14 2. Network-Oriented File Transfer......................|netrw-xfer|
15 3. Activation..........................................|netrw-activate| 15 3. Activation..........................................|netrw-activate|
16 4. Transparent File Transfer...........................|netrw-transparent| 16 4. Transparent File Transfer...........................|netrw-transparent|
17 5. Ex Commands.........................................|netrw-ex| 17 5. Ex Commands.........................................|netrw-ex|
18 6. Variables and Options...............................|netrw-var| 18 6. Variables and Options...............................|netrw-var|
19 7. Remote Directory Listing............................|netrw-dir| 19 7. Remote Directory Browser............................|netrw-browse|
20 8. Debugging...........................................|netrw-debug| 20 8. Debugging...........................................|netrw-debug|
21 9. History.............................................|netrw-history| 21 9. History.............................................|netrw-history|
22 10. Credits.............................................|netrw-credits| 22 10. Credits.............................................|netrw-credits|
23 23
24 The functionality mentioned here is done via using |standard-plugin| 24 The functionality mentioned here is done via using |standard-plugin|
491 endfunction 491 endfunction
492 endif 492 endif
493 > 493 >
494 494
495 ============================================================================== 495 ==============================================================================
496 7. Remote Directory Listing *netrw-dir* *netrw-list* 496 7. Remote Directory Browser *netrw-browse* *netrw-dir* *netrw-list*
497 497 >
498 Netrw supports listing (browsing) directories on remote hosts; simply attempt 498 ------- -----------
499 to read a "file" with a trailing slash and it will be interpreted as a 499 Command Explanation
500 request to browse a directory: 500 ------- -----------
501 <cr> Netrw will enter the directory or read the file
502 <del> Netrw will attempt to remove the file/directory
503 D Netrw will attempt to remove the file(s)/directory(ies)
504 R Netrw will attempt to rename the file(s)/directory(ies)
505 - Makes Netrw go up one directory
506 a Show all of a directory (temporarily ignore g:netrw_list_hide)
507 o Enter the file/directory under the cursor in a new browser
508 window. A horizontal split is used.
509 v Enter the file/directory under the cursor in a new browser
510 window. A vertical split is used.
511 x Apply a function to a file.
512 <c-l> Causes Netrw to refresh the directory listing
513 ? Causes Netrw to issue help
514 <
515 *netrw-browse-var*
516 >
517 --- -----------
518 Var Explanation
519 --- -----------
520 g:netrw_list_cmd supports listing
521 g:netrw_rm_cmd supports removing files
522 g:netrw_rmf_cmd supports removing softlinks to directories
523 g:netrw_rmdir_cmd supports removing directories
524 g:netrw_winsize specify initial size of new o/v windows
525 g:netrw_list_hide comma separated list of patterns for
526 hiding files
527 <
528 Netrw supports the browsing of directories on remote hosts, including
529 generating listing directories, entering directories, editing files
530 therein, deleting files/directories, and moving (renaming) files and
531 directories.
532
533 To enter the netrw directory browser, simply attempt to read a "file" with a
534 trailing slash and it will be interpreted as a request to list a directory:
501 535
502 vim [protocol]://[user@]hostname/path/ 536 vim [protocol]://[user@]hostname/path/
503 537
504 Netrw will modify the command in g:netrw_list to perform the directory listing 538 Netrw will modify the command in g:netrw_list_cmd to perform the directory
505 operation. By default the command is: 539 listing operation. By default the command is:
506 540
507 ssh HOSTNAME ls -Fa 541 ssh HOSTNAME ls -FLa
508 542
509 where the HOSTNAME becomes the hostname as requested by the attempted 543 where the HOSTNAME becomes the [user@]hostname as requested by the attempt
510 read. Naturally, the user may override this command with whatever is 544 to read. Naturally, the user may override this command with whatever is
511 preferred. The NetList function which implements remote directory 545 preferred. The NetList function which implements remote directory
512 browsing expects that directories will be flagged by a trailing slash. 546 browsing expects that directories will be flagged by a trailing slash.
513 547
514 Browsing is simple: move the cursor onto a file or directory of interest. 548 Browsing is simple: move the cursor onto a file or directory of interest.
515 Hitting the <cr> (the return key) will select the file or directory. Directories 549 Hitting the <cr> (the return key) will select the file or directory.
516 will themselves be listed, and files will be opened using the protocol given 550 Directories will themselves be listed, and files will be opened using the
517 in the original read request. 551 protocol given in the original read request.
552
553 *netrw-delete* *netrw-remove*
554
555 Deleting/removing files and directories involves moving the cursor to the
556 file/directory to be deleted and pressing "D". Directories must be empty
557 first before they can be successfully removed. If the directory is a softlink
558 to a directory, then netrw will make two requests to remove the directory
559 before succeeding. Netrw will ask for confirmation before doing the
560 removal(s). You may select a range of lines with the "V" command (visual
561 selection), and then pressing "D".
562
563 The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are
564 used to control the attempts to remove files and directories. The
565 g:netrw_rm_cmd is used with files, and its default value is:
566
567 g:netrw_rm_cmd: ssh HOSTNAME rm
568
569 The g:netrw_rmdir_cmd is used with directories. Its default value is:
570
571 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
572
573 If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
574 to remove it again using the g:netrw_rmf_cmd. Its default value is:
575
576 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
577
578 *netrw-x*
579
580 The Netrw executor applies a user-defined function to a file, based on its
581 extension. Of course, the handler function must exist for it to be called.
582 >
583 Ex. mypgm.html x -> NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
584 <
585 See the <NetrwFileHandlers.vim>
586
587 *netrw-move* *netrw-rename*
588
589 Renaming/moving files and directories involves moving the cursor to the
590 file/directory to be moved (renamed) and pressing "R". You will then be
591 queried for where you want the file/directory to be moved. You may select a
592 range of lines with the "V" command (visual selection), and then pressing "R".
593
594 The g:netrw_rename_cmd is used to implement renaming. By default its
595 value is:
596
597 ssh HOSTNAME mv
598
599 *netrw-list-hack*
600 For Linux/Unix systems, I suggest looking into
601
602 http://hacks.oreilly.com/pub/h/66
603
604 It gives a tip for setting up password-less use of ssh and scp, and discusses
605 the associated security issues.
518 606
519 607
520 ============================================================================== 608 ==============================================================================
521 8. Debugging *netrw-debug* 609 8. Debugging *netrw-debug*
522 610
549 drchipNOSPAM at campbellfamily.biz - NOSPAM 637 drchipNOSPAM at campbellfamily.biz - NOSPAM
550 638
551 ============================================================================== 639 ==============================================================================
552 9. History *netrw-history* 640 9. History *netrw-history*
553 641
642 v47: *
554 v46: * now handles remote directory browsing 643 v46: * now handles remote directory browsing
555 * g:netrw_silent (if 1) will cause all transfers to be silent'd 644 * g:netrw_silent (if 1) will cause all transfers to be silent'd
556 v45: * made the [user@]hostname:path form a bit more restrictive 645 v45: * made the [user@]hostname:path form a bit more restrictive
557 to better handle errors in using protocols 646 to better handle errors in using protocols
558 (e.g. scp:usr@host:file was being recognized as an rcp request) 647 (e.g. scp:usr@host:file was being recognized as an rcp request)