Mercurial > vim
comparison runtime/doc/pi_netrw.txt @ 24:8ff7fd162d3c v7.0016
updated for version 7.0016
author | vimboss |
---|---|
date | Mon, 13 Sep 2004 20:26:32 +0000 |
parents | cc049b00ee70 |
children | 404aac550f35 |
comparison
equal
deleted
inserted
replaced
23:3f44e9abe4ec | 24:8ff7fd162d3c |
---|---|
1 *pi_netrw.txt For Vim version 6.2. Last change: Jul 30, 2004 | 1 *pi_netrw.txt For Vim version 6.2. Last change: Sep 10, 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* |
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. Directory Browser...................................|netrw-browse| | 19 7. Directory Browser...................................|netrw-browse| |
20 8. Debugging...........................................|netrw-debug| | 20 8. Problems and Fixes..................................|netrw-problems| |
21 9. History.............................................|netrw-history| | 21 9. Debugging...........................................|netrw-debug| |
22 10. Credits.............................................|netrw-credits| | 22 10. History.............................................|netrw-history| |
23 11. Credits.............................................|netrw-credits| | |
23 | 24 |
24 The functionality mentioned here is done via using |standard-plugin| | 25 The functionality mentioned here is done via using |standard-plugin| |
25 techniques. This plugin is only available if | 26 techniques. This plugin is only available if |
26 | 27 |
27 set nocp " 'compatible' is not set | 28 set nocp " 'compatible' is not set |
112 restore the cursor position on writes | 113 restore the cursor position on writes |
113 g:netrw_ftp if it doesn't exist, use default ftp | 114 g:netrw_ftp if it doesn't exist, use default ftp |
114 =0 use default ftp (uid password) | 115 =0 use default ftp (uid password) |
115 =1 use alternate ftp method (user uid password) | 116 =1 use alternate ftp method (user uid password) |
116 g:netrw_ftpmode ="binary" (default) | 117 g:netrw_ftpmode ="binary" (default) |
117 ="ascii" (or your choice) | 118 ="ascii" |
118 g:netrw_uid (ftp) user-id, retained on a per-session basis | 119 g:netrw_uid (ftp) user-id, retained on a per-session basis |
119 g:netrw_passwd (ftp) password, retained on a per-session basis | 120 g:netrw_passwd (ftp) password, retained on a per-session basis |
120 g:netrw_win95ftp =0 use unix-style ftp even if win95/win98/winME | 121 g:netrw_win95ftp =1 if using Win95, will remove four trailing blank |
121 =1 use default method to do ftp | 122 lines that o/s's ftp "provides" on transfers |
123 =0 force normal ftp behavior (no trailing line | |
124 removal) | |
122 g:netrw_cygwin =1 assume scp under windows is from cygwin | 125 g:netrw_cygwin =1 assume scp under windows is from cygwin |
126 Also permits network browsing to use | |
127 ls with time and size sorting | |
123 (default if windows) | 128 (default if windows) |
124 =0 assume scp under windows accepts | 129 =0 assume Windows' scp accepts windows-style paths |
125 windows-style paths (default otherwise) | 130 Network browsing uses dir instead of ls |
126 g:netrw_use_nt_rcp=0 don't use the rcp of WinNT, Win2000 and WinXP (default) | 131 This option is ignored if you're using unix |
127 =1 use the rcp of WinNT,... in binary mode | 132 g:netrw_use_nt_rcp=0 don't use the rcp of WinNT, Win2000 and WinXP |
133 =1 use WinNT's rcp in binary mode (default) | |
128 | 134 |
129 PATHS *netrw-path* | 135 PATHS *netrw-path* |
130 | 136 |
131 Paths to files are generally user-directory relative for most protocols. | 137 Paths to files are generally user-directory relative for most protocols. |
132 It is possible that some protocol will make paths relative to some | 138 It is possible that some protocol will make paths relative to some |
165 transfer/protocol. Files are read from/written to a temporary file | 171 transfer/protocol. Files are read from/written to a temporary file |
166 (under Unix/Linux, /tmp/...) which the <netrw.vim> script will | 172 (under Unix/Linux, /tmp/...) which the <netrw.vim> script will |
167 clean up. | 173 clean up. |
168 | 174 |
169 One may modify any protocol's implementing external application | 175 One may modify any protocol's implementing external application |
170 by settinbg a variable (ex. scp uses the variable g:netrw_scp_cmd, | 176 by setting a variable (ex. scp uses the variable g:netrw_scp_cmd, |
171 which is defaulted to "scp -q"). | 177 which is defaulted to "scp -q"). |
172 | 178 |
173 Ftp, an old protocol, seems to be blessed by numerous implementations. | 179 Ftp, an old protocol, seems to be blessed by numerous implementations. |
174 Unfortunately, some implementations are noisy (ie., add junk to the end | 180 Unfortunately, some implementations are noisy (ie., add junk to the end |
175 of the file). Thus, concerned users may decide to write a NetReadFixup() | 181 of the file). Thus, concerned users may decide to write a NetReadFixup() |
527 D..........Deleting Files or Directories...........|netrw-D| | 533 D..........Deleting Files or Directories...........|netrw-D| |
528 <c-h>......Edit File/Directory Hiding List.........|netrw-h| | 534 <c-h>......Edit File/Directory Hiding List.........|netrw-h| |
529 i..........Long Listing............................|netrw-i| | 535 i..........Long Listing............................|netrw-i| |
530 <c-l>......Refreshing the Listing..................|netrw-ctrl-l| | 536 <c-l>......Refreshing the Listing..................|netrw-ctrl-l| |
531 o..........Browsing with a Horizontal Split........|netrw-o| | 537 o..........Browsing with a Horizontal Split........|netrw-o| |
538 p..........Preview Window..........................|netrw-p| | |
532 q..........Listing Bookmarks.......................|netrw-q| | 539 q..........Listing Bookmarks.......................|netrw-q| |
533 r..........Reversing Sorting Order.................|netrw-r| | 540 r..........Reversing Sorting Order.................|netrw-r| |
534 R..........Renaming Files or Directories...........|netrw-R| | 541 R..........Renaming Files or Directories...........|netrw-R| |
535 s..........Selecting Sorting Style.................|netrw-s| | 542 s..........Selecting Sorting Style.................|netrw-s| |
536 S..........Editing the Sorting Sequence............|netrw-S| | 543 S..........Editing the Sorting Sequence............|netrw-S| |
540 QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds* | 547 QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds* |
541 > | 548 > |
542 ------- ----------- | 549 ------- ----------- |
543 Command Explanation | 550 Command Explanation |
544 ------- ----------- | 551 ------- ----------- |
545 ? Causes Netrw to issue help | 552 < ? Causes Netrw to issue help |
546 <cr> Netrw will enter the directory or read the file | 553 <cr> Netrw will enter the directory or read the file |
547 <del> Netrw will attempt to remove the file/directory | 554 <del> Netrw will attempt to remove the file/directory |
548 d Make a directory | 555 d Make a directory |
549 D Netrw will attempt to remove the file(s)/directory(ies) | 556 D Netrw will attempt to remove the file(s)/directory(ies) |
550 R Netrw will attempt to rename the file(s)/directory(ies) | 557 R Netrw will attempt to rename the file(s)/directory(ies) |
551 - Makes Netrw go up one directory | 558 - Makes Netrw go up one directory |
552 a Show all of a directory (temporarily ignore g:netrw_list_hide) | 559 a Toggles between normal display, |
560 hiding (suppress display of files matching g:netrw_list_hide) | |
561 showing (display only files which match g:netrw_list_hide) | |
553 c Make current browsing directory the current directory | 562 c Make current browsing directory the current directory |
554 <c-h> Edit file hiding list | 563 <c-h> Edit file hiding list |
555 i Toggles between long and short listing | 564 i Toggles between long and short listing |
556 <c-l> Causes Netrw to refresh the directory listing | 565 <c-l> Causes Netrw to refresh the directory listing |
557 o Enter the file/directory under the cursor in a new browser | 566 o Enter the file/directory under the cursor in a new browser |
559 r Reverse sorting order | 568 r Reverse sorting order |
560 s Select sorting style: by name, time, or file size | 569 s Select sorting style: by name, time, or file size |
561 v Enter the file/directory under the cursor in a new browser | 570 v Enter the file/directory under the cursor in a new browser |
562 window. A vertical split is used. | 571 window. A vertical split is used. |
563 x Apply a function to a file. | 572 x Apply a function to a file. |
564 < | 573 |
565 NETRW BROWSER VARIABLES *netrw-browse-var* | 574 NETRW BROWSER VARIABLES *netrw-browse-var* |
566 > | 575 > |
567 --- ----------- | 576 --- ----------- |
568 Var Explanation | 577 Var Explanation |
569 --- ----------- | 578 --- ----------- |
579 < g:netrw_alto change from above splitting to | |
580 below splitting by setting this | |
581 variable (see |netrw-o|) | |
582 g:netrw_altv change from left splitting to | |
583 right splitting by setting this | |
584 variable (see |netrw-v|) | |
570 g:netrw_ftp_browse_reject ftp can produce a number of errors | 585 g:netrw_ftp_browse_reject ftp can produce a number of errors |
571 and warnings that can show up as | 586 and warnings that can show up as |
572 "directories" and "files" in the | 587 "directories" and "files" in the |
573 listing. This pattern is used to | 588 listing. This pattern is used to |
574 remove such embedded messages. | 589 remove such embedded messages. |
575 g:netrw_keepdir keep current directory immune from the | 590 g:netrw_keepdir keep current directory immune from the |
576 browsing directory. The browsing | 591 browsing directory. The browsing |
577 directory is contained in b:netrw_curdir | 592 directory is contained in b:netrw_curdir |
578 g:netrw_list_cmd command for listing remote directories | 593 g:netrw_list_cmd command for listing remote directories |
594 g:netrw_ftp_list_cmd options for passing along to ftp for | |
595 directory listing. Defaults: | |
596 unix or g:netrw_cygwin set: : "ls -lF" | |
597 otherwise "dir" | |
579 g:netrw_list_hide comma separated list of patterns for | 598 g:netrw_list_hide comma separated list of patterns for |
580 hiding files | 599 hiding files |
581 g:netrw_local_mkdir command for making a local directory | 600 g:netrw_local_mkdir command for making a local directory |
582 g:netrw_local_rmdir remove directory command (rmdir) | 601 g:netrw_local_rmdir remove directory command (rmdir) |
583 g:netrw_local_rename rename file/directory command | 602 g:netrw_local_rename rename file/directory command |
591 g:netrw_sort_direction sorting direction: "normal" or "reverse" | 610 g:netrw_sort_direction sorting direction: "normal" or "reverse" |
592 g:netrw_sort_sequence when sorting by name, first sort by the | 611 g:netrw_sort_sequence when sorting by name, first sort by the |
593 comma-separated pattern sequence | 612 comma-separated pattern sequence |
594 g:netrw_timefmt specify format string to strftime() (%c) | 613 g:netrw_timefmt specify format string to strftime() (%c) |
595 g:netrw_winsize specify initial size of new o/v windows | 614 g:netrw_winsize specify initial size of new o/v windows |
596 < | 615 |
597 INTRODUCTION TO DIRECTORY BROWSING | 616 INTRODUCTION TO DIRECTORY BROWSING |
598 | 617 |
599 Netrw supports the browsing of directories on the local system and on remote | 618 Netrw supports the browsing of directories on the local system and on remote |
600 hosts, including generating listing directories, entering directories, editing | 619 hosts, including generating listing directories, entering directories, editing |
601 files therein, deleting files/directories, making new directories, and moving | 620 files therein, deleting files/directories, making new directories, and moving |
709 the V (|linewise-visual|). | 728 the V (|linewise-visual|). |
710 | 729 |
711 | 730 |
712 HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide* | 731 HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide* |
713 | 732 |
714 The "a" map toggles the netrw vim file browser (both remote and local) between | 733 Netrw's browsing facility allows one to use the hiding list in one of |
715 displaying hidden files (show-all) versus hiding files. For files to be | 734 three ways: ignore it, hide files which match, and show only those files |
716 hidden, the g:netrw_list_hide variable must hold a comma delimited list of | 735 which match. The g:netrw_list_hide variable holds a comma delimited list |
717 patterns (ex. \.obj) to be hidden from normal listing. (see |netrw-h|) | 736 of patterns (ex. \.obj) which specify the hiding list. (also see |netrw-h|) |
718 | 737 |
719 | 738 |
720 EDIT FILE OR DIRECTORY HIDING LIST *netrw-h* | 739 EDIT FILE OR DIRECTORY HIDING LIST *netrw-h* |
721 | 740 |
722 The "<ctrl-h>" map brings up a requestor allowing the user to change the | 741 The "<ctrl-h>" map brings up a requestor allowing the user to change the |
727 | 746 |
728 BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* | 747 BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* |
729 | 748 |
730 Normally one enters a file or directory using the <cr>. However, the "o" map | 749 Normally one enters a file or directory using the <cr>. However, the "o" map |
731 allows one to open a new window to hold the new directory listing or file. A | 750 allows one to open a new window to hold the new directory listing or file. A |
732 horizontal split is used. (also see |netrw-v|) | 751 horizontal split is used. (for vertical splitting, see |netrw-v|) |
752 | |
753 Normally, the o key splits the window horizontally with the new window | |
754 and cursor at the top. To change to splitting the window horizontally | |
755 with the new window and cursor at the bottom, have | |
756 | |
757 let g:netrw_alto = 1 | |
758 | |
759 in your <.vimrc>. | |
760 | |
761 PREVIEW WINDOW | |
762 | |
763 One may use a preview window (currently only for local browsing) by using | |
764 the "p" key when the cursor is atop the desired filename to be previewed. | |
733 | 765 |
734 | 766 |
735 SELECTING SORTING STYLE *netrw-s* | 767 SELECTING SORTING STYLE *netrw-s* |
736 | 768 |
737 One may select the sorting style by name, time, or (file) size. The | 769 One may select the sorting style by name, time, or (file) size. The |
762 | 794 |
763 BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* | 795 BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* |
764 | 796 |
765 Normally one enters a file or directory using the <cr>. However, the "v" | 797 Normally one enters a file or directory using the <cr>. However, the "v" |
766 map allows one to open a new window to hold the new directory listing or | 798 map allows one to open a new window to hold the new directory listing or |
767 file. A vertical split is used. (also see |netrw-o|) | 799 file. A vertical split is used. (for horizontal splitting, see |netrw-o|) |
800 | |
801 Normally, the v key splits the window vertically with the new window | |
802 and cursor at the left. To change to splitting the window vertically | |
803 with the new window and cursor at the right, have | |
804 | |
805 let g:netrw_altv = 1 | |
806 | |
807 in your <.vimrc>. | |
768 | 808 |
769 | 809 |
770 CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* | 810 CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* |
771 | 811 |
772 One may "enter" a file with a special handler, thereby firing up a browser or | 812 One may "enter" a file with a special handler, thereby firing up a browser or |
829 It gives a tip for setting up password-less use of ssh and scp, and discusses | 869 It gives a tip for setting up password-less use of ssh and scp, and discusses |
830 the associated security issues. | 870 the associated security issues. |
831 | 871 |
832 | 872 |
833 ============================================================================== | 873 ============================================================================== |
834 8. Debugging *netrw-debug* | 874 8. Problems and Fixes *netrw-problems* |
875 | |
876 (This section is likely to grow as I get feedback) | |
877 (also see |netrw-debug|) | |
878 | |
879 P1. I use windows 95, and my ftp dumps four blank lines at the | |
880 end of every read. | |
881 | |
882 See |netrw-fixup|, and put the following into your | |
883 <.vimrc> file: | |
884 | |
885 let g:netrw_win95ftp= 1 | |
886 | |
887 | |
888 | |
889 P2. I use windows, and my network browsing with ftp doesn't sort by | |
890 time or size | |
891 | |
892 Windows' ftp has a minimal support for ls (ie. it doesn't | |
893 accept sorting options). It doesn't support the -F which | |
894 gives an explanatory character (ABC/ for "ABC is a directory"). | |
895 Netrw uses dir to get its short and long listings. If you | |
896 think your ftp does support a full-up ls, put the following | |
897 into your <.vimrc>: | |
898 | |
899 let g:netrw_ftp_list_cmd= "ls -lF" | |
900 | |
901 Alternatively, if you have cygwin on your Windows box, put | |
902 into your <.vimrc>: | |
903 | |
904 let g:netrw_cygwin= 1 | |
905 | |
906 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw | |
907 used ssh! That wasn't what I asked for... | |
908 | |
909 Netrw has two methods for browsing remote directories: ssh | |
910 and ftp. Unless you specify ftp specifically, ssh is used. | |
911 When it comes time to do download a file (not just a directory | |
912 listing), netrw will use the given protocol to do so. | |
913 | |
914 P4. I would like long listings to be the default. | |
915 | |
916 let g:netrw_longlist=1 | |
917 | |
918 P5. My times come up oddly in local browsing | |
919 | |
920 Does your system's strftime() accept the "%c" to yield dates | |
921 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime" | |
922 and find out what option should be used. Then put it into | |
923 your <.vimrc>: | |
924 let g:netrw_timefmt= "%X" (where X is the option) | |
925 | |
926 P6. I don't want my current directory changing just because I'm | |
927 browsing somewhere. | |
928 | |
929 let g:netrw_keepdir= 1 | |
930 | |
931 | |
932 ============================================================================== | |
933 9. Debugging *netrw-debug* | |
835 | 934 |
836 The <netrw.vim> script is typically available as: | 935 The <netrw.vim> script is typically available as: |
837 | 936 |
838 /usr/local/share/vim/vim6x/plugin/netrw.vim | 937 /usr/local/share/vim/vim6x/plugin/netrw.vim |
839 | 938 |
876 send that information to <netrw.vim>'s maintainer, | 975 send that information to <netrw.vim>'s maintainer, |
877 | 976 |
878 drchipNOSPAM at campbellfamily.biz - NOSPAM | 977 drchipNOSPAM at campbellfamily.biz - NOSPAM |
879 | 978 |
880 ============================================================================== | 979 ============================================================================== |
881 9. History *netrw-history* | 980 10. History *netrw-history* |
882 | 981 |
982 v48: * One may use ftp to do remote host file browsing | |
983 * (windows and !cygwin) remote browsing with ftp can now use | |
984 the "dir" command internally to provide listings | |
985 * g:netrw_keepdir now allows one to keep the initial current | |
986 directory as the current directory (normally the local | |
987 file browser makes the currently viewed directory the | |
988 current directory) | |
989 * g:netrw_alto and g:netrw_altv now support alternate placement | |
990 of windows started with o or v | |
991 * Nread ? and Nwrite ? now uses echomsg (instead of echo) so | |
992 :messages can repeat showing the help | |
993 * bugfix: avoids problems with partial matches of directory names | |
994 to prior buffers with longer names | |
995 * one can suppress error messages with g:netrw_quiet | |
996 * ctrl-h used instead of <Leader>h for editing hiding list | |
997 * one may edit the sorting sequence with the S map | |
998 * now allows confirmation of deletion with [y(es) n(o) a(ll) q(uit)] | |
999 * the "x" map now handles special file viewing with: | |
1000 (windows) rundll32 url.dll | |
1001 (gnome) gnome-open | |
1002 (kde) kfmclient | |
1003 If none of these are on the executable path, then | |
1004 NetrwFileHandlers.vim is used. | |
1005 * directory bookmarking during both local and remote browsing | |
1006 implemented | |
1007 * one may view all, use the hiding list to suppress, or use the | |
1008 hiding list to show-only remote and local file/directory listings | |
1009 * improved unusual file and directory name handling | |
1010 * preview window support | |
883 v47: * now handles local directory browsing. | 1011 v47: * now handles local directory browsing. |
884 v46: * now handles remote directory browsing | 1012 v46: * now handles remote directory browsing |
885 * g:netrw_silent (if 1) will cause all transfers to be silent'd | 1013 * g:netrw_silent (if 1) will cause all transfers to be silent'd |
886 v45: * made the [user@]hostname:path form a bit more restrictive | 1014 v45: * made the [user@]hostname:path form a bit more restrictive |
887 to better handle errors in using protocols | 1015 to better handle errors in using protocols |
910 * removed silent from transfer methods so user can see what's | 1038 * removed silent from transfer methods so user can see what's |
911 happening | 1039 happening |
912 | 1040 |
913 | 1041 |
914 ============================================================================== | 1042 ============================================================================== |
915 10. Credits *netrw-credits* | 1043 11. Credits *netrw-credits* |
916 | 1044 |
917 Vim editor by Bram Moolenaar (Thanks, Bram!) | 1045 Vim editor by Bram Moolenaar (Thanks, Bram!) |
918 dav support by C Campbell | 1046 dav support by C Campbell |
919 fetch support by Bram Moolenaar and C Campbell | 1047 fetch support by Bram Moolenaar and C Campbell |
920 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> - NOSPAM | 1048 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> - NOSPAM |