diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-06-20 12:51:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-06-20 12:51:53 +0000 |
commit | 69a7cb473ceae109b61fae9aa04ee0c29afba5d9 (patch) | |
tree | 04bd3292cc6c2317842d7a46ae3ab11e9956ed99 /runtime | |
parent | ed20346f0b81d1d89c22c9616abe8e47b4c17f08 (diff) | |
download | vim-git-69a7cb473ceae109b61fae9aa04ee0c29afba5d9.tar.gz |
updated for version 7.0002v7.0002
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/change.txt | 11 | ||||
-rw-r--r-- | runtime/doc/editing.txt | 7 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 25 | ||||
-rw-r--r-- | runtime/doc/farsi.txt | 6 | ||||
-rw-r--r-- | runtime/doc/index.txt | 6 | ||||
-rw-r--r-- | runtime/doc/insert.txt | 4 | ||||
-rw-r--r-- | runtime/doc/mbyte.txt | 6 | ||||
-rw-r--r-- | runtime/doc/motion.txt | 35 | ||||
-rw-r--r-- | runtime/doc/netbeans.txt | 6 | ||||
-rw-r--r-- | runtime/doc/os_mac.txt | 17 | ||||
-rw-r--r-- | runtime/doc/os_vms.txt | 4 | ||||
-rw-r--r-- | runtime/doc/pi_netrw.txt | 322 | ||||
-rw-r--r-- | runtime/doc/quickfix.txt | 4 | ||||
-rw-r--r-- | runtime/doc/recover.txt | 4 | ||||
-rw-r--r-- | runtime/doc/sponsor.txt | 9 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 4 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 6 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 177 | ||||
-rw-r--r-- | runtime/doc/usr_21.txt | 4 | ||||
-rw-r--r-- | runtime/doc/usr_22.txt | 4 | ||||
-rw-r--r-- | runtime/doc/various.txt | 8 | ||||
-rw-r--r-- | runtime/doc/version5.txt | 14 | ||||
-rw-r--r-- | runtime/doc/version6.txt | 26 | ||||
-rw-r--r-- | runtime/indent/vb.vim | 4 | ||||
-rw-r--r-- | runtime/plugin/netrw.vim | 460 | ||||
-rw-r--r-- | runtime/syntax/netrwlist.vim | 29 | ||||
-rw-r--r-- | runtime/syntax/po.vim | 4 |
27 files changed, 771 insertions, 435 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 63461ee1a..93c554f33 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.0aa. Last change: 2004 Jun 15 +*change.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1048,7 +1048,7 @@ operation. When something has been dropped onto Vim, the "~ register is filled in and the <Drop> pseudo key is sent for notification. You can remap this key if you want; the default action (for all modes) is to insert the contents of the "~ register at the cursor position. {not in Vi} -{only available when compiled with the |+dnd| feature, curently only with the +{only available when compiled with the |+dnd| feature, currently only with the GTK GUI} Note: The "~ register is only used when dropping plain text onto Vim. @@ -1138,6 +1138,13 @@ gw{motion} Format the lines that {motion} moves over. Similar to the text. However, 'formatprg' is not used. {not in Vi} +gwgw *gwgw* *gww* +gww Format the current line as with "gw". {not in Vi} + + *v_gw* +{Visual}gw Format the highlighted text as with "gw". (for + {Visual} see |Visual-mode|). {not in Vi} + Example: To format the current paragraph use: *gqap* > gqap diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 827f78031..4feef4148 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 7.0aa. Last change: 2004 Jun 14 +*editing.txt* For Vim version 7.0aa. Last change: 2004 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -340,10 +340,11 @@ directly before the first or just after the last backtick. *`=* You can have the backticks expanded as a Vim expression, instead of -an external command, by using the syntax `={expr}` e.g. > +an external command, by using the syntax `={expr}` e.g.: > :let foo='bar' :e `=foo . ".c" ` -edits "bar.c". Note that the expression cannot contain a backtick. +This will edit "bar.c". The expression can contain just about anything, thus +this can also be used to avoid the special meaning of '"', '|', '%' and '#'. *++opt* *[++opt]* The [++opt] argument can be used to force the value of 'fileformat' or diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 4685ff5e6..462d66bd9 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0aa. Last change: 2004 May 18 +*eval.txt* For Vim version 7.0aa. Last change: 2004 Jun 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -515,7 +515,7 @@ Another example that does the same: > command Tick let s:counter = s:counter + 1 | echo s:counter When calling a function and invoking a user-defined command, the context for -script varialbes is set to the script where the function or command was +script variables is set to the script where the function or command was defined. The script variables are also available when a function is defined inside a @@ -972,9 +972,13 @@ browse({save}, {title}, {initdir}, {default}) bufexists({expr}) *bufexists()* The result is a Number, which is non-zero if a buffer called {expr} exists. + If the {expr} argument is a number, buffer numbers are used. If the {expr} argument is a string it must match a buffer name - exactly. - If the {expr} argument is a number buffer numbers are used. + exactly. The name can be: + - Relative to the current directory. + - A full path. + - The name of a buffer with 'filetype' set to "nofile". + - A URL name. Unlisted buffers will be found. Note that help files are listed by their short name in the output of |:buffers|, but bufexists() requires using their @@ -987,12 +991,12 @@ bufexists({expr}) *bufexists()* buflisted({expr}) *buflisted()* The result is a Number, which is non-zero if a buffer called {expr} exists and is listed (has the 'buflisted' option set). - The {expr} argument is used like with bufexists(). + The {expr} argument is used like with |bufexists()|. bufloaded({expr}) *bufloaded()* The result is a Number, which is non-zero if a buffer called {expr} exists and is loaded (shown in a window or hidden). - The {expr} argument is used like with bufexists(). + The {expr} argument is used like with |bufexists()|. bufname({expr}) *bufname()* The result is the name of a buffer, as it is displayed by the @@ -1233,6 +1237,9 @@ executable({expr}) *executable()* This function checks if an executable with the name {expr} exists. {expr} must be the name of the program without any arguments. executable() uses the normal $PATH. + On MS-DOS and MS-Windows the ".exe", ".bat", etc. must be + included. It only checks if the file exists and is not a + directory, not if it's really executable. The result is a Number: 1 exists 0 does not exist @@ -1910,7 +1917,7 @@ line({expr}) The result is a Number, which is the line number of the file This autocommand jumps to the last known position in a file just after opening it, if the '" mark is set: > :au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif -< + line2byte({lnum}) *line2byte()* Return the byte count from the start of the buffer for line {lnum}. This includes the end-of-line character, depending on @@ -2746,7 +2753,7 @@ fork Compiled to use fork()/exec() instead of system(). gettext Compiled with message translation |multi-lang| gui Compiled with GUI enabled. gui_athena Compiled with Athena GUI. -gui_beos Compiled with BeOs GUI. +gui_beos Compiled with BeOS GUI. gui_gtk Compiled with GTK+ GUI (any version). gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined). gui_mac Compiled with Macintosh GUI. @@ -2801,7 +2808,7 @@ scrollbind Compiled with 'scrollbind' support. showcmd Compiled with 'showcmd' support. signs Compiled with |:sign| support. smartindent Compiled with 'smartindent' support. -sniff Compiled with SniFF interface support. +sniff Compiled with SNiFF interface support. statusline Compiled with support for 'statusline', 'rulerformat' and special formats of 'titlestring' and 'iconstring'. sun_workshop Compiled with support for Sun |workshop|. diff --git a/runtime/doc/farsi.txt b/runtime/doc/farsi.txt index 9902709da..6f32f6e83 100644 --- a/runtime/doc/farsi.txt +++ b/runtime/doc/farsi.txt @@ -1,4 +1,4 @@ -*farsi.txt* For Vim version 7.0aa. Last change: 2002 Oct 29 +*farsi.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Mortaza Ghassab Shiran @@ -66,7 +66,7 @@ If the "extra" archive has been unpacked, the following files are found in the subdirectories of the '$VIM/farsi' directory: + far-a01.pcf X Windows fonts for Unix including Linux systems - + far-a01.bf X Windows fonts for SunOs + + far-a01.bf X Windows fonts for SunOS + far-a01.f16 a screen fonts for Unix including Linux systems + far-a01.fon a monospaced fonts for Windows NT/95/98 + far-a01.com a screen fonts for DOS @@ -92,7 +92,7 @@ o Installation of fonts for X Window systems (Unix/Linux) > mkfontdir > xset +fp path_name_of_farsi_fonts_directory -o Installation of fonts for X Window systems (SunOs) +o Installation of fonts for X Window systems (SunOS) Copy far-a01.bf font into a directory of your choice. Change to the directory containing the far-a01.fb fonts and diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 791e5ba36..77fe085b5 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 7.0aa. Last change: 2004 May 24 +*index.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -130,8 +130,8 @@ tag char action ~ |i_<C-Home>| <C-Home> cursor to start of file |i_<End>| <End> cursor past end of line |i_<C-End>| <C-End> cursor past end of file -|i_<PageUp>| <PageUp> one screenfull backward -|i_<PageDown>| <PageDown> one screenfull forward +|i_<PageUp>| <PageUp> one screenful backward +|i_<PageDown>| <PageDown> one screenful forward |i_<F1>| <F1> same as <Help> |i_<Help>| <Help> stop insert mode and display help window |i_<Insert>| <Insert> toggle Insert/Replace mode diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 1439dbeaf..8028b661f 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.0aa. Last change: 2004 Apr 09 +*insert.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -908,7 +908,7 @@ gi Insert text in the same position as where Insert mode The position is corrected for inserted/deleted lines, but NOT for inserted/deleted characters. When the |:keepjumps| command modifier is used the |'^| - mark wont be changed. + mark won't be changed. {not in Vi} *o* diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 52c3b2406..9e96c3ea4 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,4 +1,4 @@ -*mbyte.txt* For Vim version 7.0aa. Last change: 2004 Jun 07 +*mbyte.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -141,7 +141,7 @@ There are several ways to enter multi-byte characters: - For all systems keymaps can be used. See |mbyte-keymap|. The options 'iminsert', 'imsearch' and 'imcmdline' can be used to chose -the different input medhods or disable them temporarily. +the different input methods or disable them temporarily. ============================================================================== 2. Locale *mbyte-locale* @@ -906,7 +906,7 @@ IME status to that memorized automatically. This works on not only insert-normal mode, but also search-command input and replace mode. The options 'iminsert', 'imsearch' and 'imcmdline' can be used to chose -the different input medhods or disable them temporarily. +the different input methods or disable them temporarily. WHAT IS IME IME is a part of East asian version Windows. That helps you to input diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index b22413a84..b2f6858bb 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 7.0aa. Last change: 2004 May 13 +*motion.txt* For Vim version 7.0aa. Last change: 2004 Jun 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -672,11 +672,12 @@ m[ or m] Set the |'[| or |']| mark. Useful when an operator is the cursor, this is not a motion command). *:ma* *:mark* *E191* -:[range]ma[rk] {a-zA-Z} Set mark {a-zA-Z} at last line number in [range], +:[range]ma[rk] {a-zA-Z'} + Set mark {a-zA-Z'} at last line number in [range], column 0. Default is cursor line. *:k* -:[range]k{a-zA-Z} Same as :mark, but the space before the mark name can +:[range]k{a-zA-Z'} Same as :mark, but the space before the mark name can be omitted. *'* *'a* *`* *`a* @@ -692,7 +693,9 @@ g'{mark} g`{mark} jumping within the current buffer. Example: > g`" < jumps to the last known position in a file. See - $VIMRUNTIME/vimrc_example.vim. {not in Vi} + $VIMRUNTIME/vimrc_example.vim. + Also see |:keepjumps|. + {not in Vi} *:marks* :marks List all the current marks (not a motion command). @@ -868,7 +871,7 @@ These commands are not marks themselves, but jump to a mark: or larger than before, all marks are kept at the same line number. - When the number of lines decreases, the marks in the - ilnes that disappeared are deleted. + lines that disappeared are deleted. In any case the marks below the filtered text have their line numbers adjusted, thus stick to the text, as usual. @@ -877,12 +880,22 @@ These commands are not marks themselves, but jump to a mark: *:keepj* *:keepjumps* :keepj[umps] {command} - Do not change the |''|, |'.| and |'^| marks, the - |jumplist| or the |changelist|. Useful when making a - change or inserting text automatically and the user - doesn't want to go to this position. E.g., when - updating a "Last change" timestamp: > - autocmd BufWritePre,FileWritePre *.abc keepjumps call SetLastChange() + Moving around in {command} does not change the |''|, + |'.| and |'^| marks, the |jumplist| or the + |changelist|. + Useful when making a change or inserting text + automatically and the user doesn't want to go to this + position. E.g., when updating a "Last change" + timestamp in the first line: > + + :let lnum = getline(".") + :keepjumps normal gg + :call SetLastChange() + :keepjumps exe "normal " . lnum . "G" +< + Note that ":keepjumps" must be used for every command. + When invoking a function the commands in that function + can still change the jumplist. ============================================================================== 8. Jumps *jump-motions* diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index 55725e15e..ee6adea44 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -1,4 +1,4 @@ -*netbeans.txt* For Vim version 7.0aa. Last change: 2004 May 01 +*netbeans.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Gordon Prieur @@ -180,7 +180,7 @@ Region is guarded, cannot modify change. *E656* -NetBeans dissallows writes of unmodified buffers +NetBeans disallows writes of unmodified buffers NetBeans does not support writes of unmodified buffers that were opened from NetBeans. @@ -245,7 +245,7 @@ could cause confusion. The netbeans_saved() function sent a "save" protocol command. In protocol version 2.1 and earlier this was incorrectly interpreted as a notification that a write had taken place. In reality, it told NetBeans to save the file so multiple writes were being done. This caused various -problems and has been fixed in 2.2. To decrease the likelyhood of this +problems and has been fixed in 2.2. To decrease the likelihood of this confusion happening again, netbeans_saved() has been renamed to netbeans_save_buffer(). diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt index c2102bfc0..f24255245 100644 --- a/runtime/doc/os_mac.txt +++ b/runtime/doc/os_mac.txt @@ -1,4 +1,4 @@ -*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Apr 27 +*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Jun 19 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -74,11 +74,16 @@ A: Under Window Settings, Emulation, make sure that "Escape non-ASCII ============================================================================== 4. Mac Lack *mac-lack* --The filenames containing both ":" and "/" are sometimes misinterpreted. - (just re-execute the command) --Scrollbar are not scrolling live, and when only the arrow or scroll area, - a limit of 32 line or page is scrolled. --Syntax highlighting works on 68k Macs but is _really_ slow. +The filenames containing both ":" and "/" are sometimes misinterpreted. (just +re-execute the command) + +Scrollbar are not scrolling live, and when only the arrow or scroll area, a +limit of 32 line or page is scrolled. + +Syntax highlighting works on 68k Macs but is _really_ slow. + +In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as +Shift-Control-2. ============================================================================== 5. Mac Bug Report *mac-bug* diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index 834b35b16..aab5a2407 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -1,4 +1,4 @@ -*os_vms.txt* For Vim version 7.0aa. Last change: 2004 May 16 +*os_vms.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL @@ -280,7 +280,7 @@ For more information type $help set disp in VMS prompt. You need to set up one X server and run Vim as in point 2. For MS Windows there are available free X servers as MIX , Omni X etc. as well as excellent commercial products as eXcursion or ReflectionX with - buit in DEC support. + built in DEC support. Please note, that executables without GUI are slightly faster during startup then with enabled GUI in character mode. Therefore, if you do not use GUI diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index abfa8ce2f..0a13dc251 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,11 +1,11 @@ -*pi_netrw.txt* For Vim version 7.0aa. Last change: Apr 21, 2004 +*pi_netrw.txt* For Vim version 6.2. Last change: Jun 15, 2004 VIM REFERENCE MANUAL by Charles E. Campbell, Jr. -*dav* *http* *network* *rcp* *scp* -*fetch* *netrw* *Nread* *rsync* *sftp* -*ftp* *netrw.vim* *Nwrite* *netrw-file* +*dav* *http* *network* *rcp* *scp* +*fetch* *netrw* *Nread* *rsync* *sftp* +*ftp* *netrw.vim* *Nwrite* *netrw-file* ============================================================================== 0. Contents *netrw-contents* @@ -16,15 +16,16 @@ 4. Transparent File Transfer...........................|netrw-transparent| 5. Ex Commands.........................................|netrw-ex| 6. Variables and Options...............................|netrw-var| -7. Debugging...........................................|netrw-debug| -8. New Stuff...........................................|netrw-new| -9. Credits.............................................|netrw-credits| +7. Remote Directory Listing............................|netrw-dir| +8. Debugging...........................................|netrw-debug| +9. History.............................................|netrw-history| +10. Credits.............................................|netrw-credits| The functionality mentioned here is done via using |standard-plugin| techniques. This plugin is only available if - set nocp " 'compatible' is not set - filetype plugin on " plugins are enabled + set nocp " 'compatible' is not set + filetype plugin on " plugins are enabled You can avoid loading this plugin by setting the "loaded_netrw" variable in your <.vimrc> file: > @@ -49,16 +50,16 @@ in your <.vimrc> file: > Controlling External Applications - Protocol Variable Default Value - -------- ---------------- ------------- - dav: g:netrw_dav_cmd = "cadaver" - fetch: g:netrw_fetch_cmd = "fetch -o" - ftp: g:netrw_ftp_cmd = "ftp" - http: g:netrw_http_cmd = "fetch -o" else if fetch is available - http: g:netrw_http_cmd = "wget -q -O" If wget is available - rcp: g:netrw_rcp_cmd = "rcp" - rsync: g:netrw_rsync_cmd = "rsync -a" - scp: g:netrw_scp_cmd = "scp -q" + Protocol Variable Default Value + -------- ---------------- ------------- + dav: g:netrw_dav_cmd = "cadaver" + fetch: g:netrw_fetch_cmd = "fetch -o" + ftp: g:netrw_ftp_cmd = "ftp" + http: g:netrw_http_cmd = "fetch -o" if fetch is available + http: g:netrw_http_cmd = "wget -q -O" If wget is available + rcp: g:netrw_rcp_cmd = "rcp" + rsync: g:netrw_rsync_cmd = "rsync -a" + scp: g:netrw_scp_cmd = "scp -q" sftp: g:netrw_sftp_cmd = "sftp" READING @@ -76,7 +77,7 @@ in your <.vimrc> file: > :Nread "sftp://[user@]machine/file" uses sftp WRITING - :Nwrite ? give help + :Nwrite ? give help :Nwrite "machine:file" uses rcp :Nwrite "machine file" uses ftp with <.netrc> :Nwrite "machine id password file" uses ftp @@ -88,6 +89,9 @@ in your <.vimrc> file: > :Nwrite "sftp://[user@]machine/file" uses sftp http: not supported! + DIRECTORY LISTING + :Nread [protocol]://[user]@hostname/path/ + USER AND PASSWORD CHANGING Attempts to use ftp will prompt you for a user-id and a password. These will be saved in g:netrw_uid and g:netrw_passwd Subsequent uses @@ -148,7 +152,7 @@ transfer/protocol. Files are read from/written to a temporary file clean up. One may modify any protocol's implementing external application -by setting a variable (ex. scp uses the variable g:netrw_scp_cmd, +by settinbg a variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to "scp -q"). Ftp, an old protocol, seems to be blessed by numerous implementations. @@ -181,57 +185,57 @@ additional prompting. *netrw-urls* +=================================+============================+============+ - | Reading | Writing | Uses | + | Reading | Writing | Uses | +=================================+============================+============+ - | DAV: | | | - | dav://host/path | | cadaver | - | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | + | DAV: | | | + | dav://host/path | | cadaver | + | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | +---------------------------------+----------------------------+------------+ - | FETCH: | | | - | fetch://[user@]host/path | | | - | fetch://[user@]host:http/path | Not Available | fetch | - | :Nread fetch://[user@]host/path| | | + | FETCH: | | | + | fetch://[user@]host/path | | | + | fetch://[user@]host:http/path | Not Available | fetch | + | :Nread fetch://[user@]host/path| | | +---------------------------------+----------------------------+------------+ - | FILE: | | | - | file:///* | file:///* | | - | file://localhost/* | file://localhost/* | | + | FILE: | | | + | file:///* | file:///* | | + | file://localhost/* | file://localhost/* | | +---------------------------------+----------------------------+------------+ - | FTP: (*3) | (*3) | | - | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) | - | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc | - | :Nread host path | :Nwrite host path | ftp+.netrc | - | :Nread host uid pass path | :Nwrite host uid pass path | ftp | + | FTP: (*3) | (*3) | | + | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) | + | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc | + | :Nread host path | :Nwrite host path | ftp+.netrc | + | :Nread host uid pass path | :Nwrite host uid pass path | ftp | +---------------------------------+----------------------------+------------+ - | HTTP: wget is executable: (*4) | | | - | http://[user@]host/path | Not Available | wget | + | HTTP: wget is executable: (*4) | | | + | http://[user@]host/path | Not Available | wget | +---------------------------------+----------------------------+------------+ - | HTTP: fetch is executable (*4) | | | - | http://[user@]host/path | Not Available | fetch | + | HTTP: fetch is executable (*4) | | | + | http://[user@]host/path | Not Available | fetch | +---------------------------------+----------------------------+------------+ - | RCP: | | | - | rcp://[user@]host/path | rcp://[user@]host/path | rcp | + | RCP: | | | + | rcp://[user@]host/path | rcp://[user@]host/path | rcp | +---------------------------------+----------------------------+------------+ - | RSYNC: | | | - | rsync://[user@]host/path | rsync://[user@]host/path | rsync | - | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync | - | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp | + | RSYNC: | | | + | rsync://[user@]host/path | rsync://[user@]host/path | rsync | + | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync | + | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp | +---------------------------------+----------------------------+------------+ - | SCP: | | | - | scp://[user@]host/path | scp://[user@]host/path | scp | - | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) | + | SCP: | | | + | scp://[user@]host/path | scp://[user@]host/path | scp | + | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) | +---------------------------------+----------------------------+------------+ - | SFTP: | | | - | sftp://[user@]host/path | sftp://[user@]host/path | sftp | - | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) | + | SFTP: | | | + | sftp://[user@]host/path | sftp://[user@]host/path | sftp | + | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) | +=================================+============================+============+ (*1) For an absolute path use scp://machine//path. (*2) if <.netrc> is present, it is assumed that it will work with your ftp client. Otherwise the script will - prompt for user-id and password. + prompt for user-id and pasword. - (*3) for ftp, "machine" may be machine#port or machine:port + (*3) for ftp, "machine" may be machine#port or machine:port if a different port is needed than the standard ftp port (*4) for http:..., if wget is available it will be used. Otherwise, @@ -327,67 +331,88 @@ additional commands available. ============================================================================== -6. Variables and Options *netrw-options* *netrw-var* +6. Variables and Options *netrw-options* *netrw-var* The script <netrw.vim> uses several variables which can affect <netrw.vim>'s behavior. These variables typically may be set in the user's <.vimrc> file: - - g:netrw_uid Holds current user-id for ftp. - g:netrw_passwd Holds current password for ftp. - b:netrw_lastfile Holds latest method/machine/path. - b:netrw_line Holds current line number (during NetWrite) - b:netrw_col Holds current cursor position (during NetWrite) - g:netrw_ftp =0 use default ftp (uid password) - =1 use alternate ftp (user uid password) - (see |netrw-options|) - g:netrw_ftpmode ="binary" (default) - ="ascii" (your choice) - g:netrw_ignorenetrc =1 (default) - if you have a <.netrc> file but you don't +> + ------------- + Netrw Options + ------------- + Option Meaning + -------------- ----------------------------------------------- +< + b:netrw_col Holds current cursor position (during NetWrite) + g:netrw_cygwin =1 assume scp under windows is from cygwin + (default/windows) + =0 assume scp under windows accepts windows + style paths (default/else) + g:netrw_ftp =0 use default ftp (uid password) + g:netrw_ftpmode ="binary" (default) + ="ascii" (your choice) + g:netrw_ignorenetrc =1 (default) + if you have a <.netrc> file but you don't want it used, then set this variable. Its mere existence is enough to cause <.netrc> to be ignored. - g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc - =1 use default method to do ftp - g:netrw_cygwin =1 assume scp under windows is from cygwin - (default/windows) - =0 assume scp under windows accepts windows - style paths (default/else) - g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) - =1 use WinNT/2K/XP's rcp, binary mode - - + b:netrw_lastfile Holds latest method/machine/path. + b:netrw_line Holds current line number (during NetWrite) + g:netrw_passwd Holds current password for ftp. + g:netrw_silent =0 transfers done normally + =1 transfers done silently + g:netrw_uid Holds current user-id for ftp. + =1 use alternate ftp (user uid password) + (see |netrw-options|) + g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) + =1 use WinNT/2K/XP's rcp, binary mode + g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc + =1 use default method to do ftp > + ----------------------------------------------------------------------- +< The script will also make use of the following variables internally, albeit temporarily. - +> + ------------------- + Temporary Variables + ------------------- + Variable Meaning + -------- ------------------------------------ +< g:netrw_method Index indicating rcp/ftp+.netrc/ftp g:netrw_machine Holds machine name parsed from input - g:netrw_fname Holds filename being accessed - + g:netrw_fname Holds filename being accessed > + ------------------------------------------------------------ +< *netrw-protocol* + +Netrw supports a number of protocols. These protocols are invoked using the +variables listed below, and may be modified by the user. > ------------------------ - Protocol Control Options + Protocol Control Options ------------------------ - Option Type Setting Meaning ~ - --------- -------- -------------- --------------------------- > - netrw_ftp variable =doesn't exist userid set by "user userid" - =0 userid set by "user userid" - =1 userid set by "userid" - NetReadFixup function =doesn't exist no change - =exists Allows user to have files - read via ftp automatically - transformed however they wish - by NetReadFixup() + Option Type Setting Meaning + --------- -------- -------------- --------------------------- +< + netrw_ftp variable =doesn't exist userid set by "user userid" + =0 userid set by "user userid" + =1 userid set by "userid" + NetReadFixup function =doesn't exist no change + =exists Allows user to have files + read via ftp automatically + transformed however they wish + by NetReadFixup() g:netrw_dav_cmd variable ="cadaver" g:netrw_fetch_cmd variable ="fetch -o" g:netrw_ftp_cmd variable ="ftp" g:netrw_http_cmd variable ="fetch -o" else if fetch is executable g:netrw_http_cmd variable ="wget -O" if wget is executable + g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa" g:netrw_rcp_cmd variable ="rcp" g:netrw_rsync_cmd variable ="rsync -a" g:netrw_scp_cmd variable ="scp -q" - g:netrw_sftp_cmd variable ="sftp" + g:netrw_sftp_cmd variable ="sftp" > + ------------------------------------------------------------------------- < The first two options both help with certain ftp's that give trouble otherwise. In order to best understand how to use these options if ftp is giving you @@ -396,16 +421,21 @@ troubles, a bit of discussion follows on how netrw does ftp reads. The g:netrw_..._cmd variables specify the external program to use handle the associated protocol (rcp, ftp, etc), plus any options. -Netrw typically builds up lines of one of the following formats in a +The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with +whatever the current request is for a hostname. + +For ftp, netrw typically builds up lines of one of the following formats in a temporary file: > IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1 ---------------------------------- ------------------------------ - open machine [port] open machine [port] - user userid password userid password - [g:netrw_ftpmode] password - get filename tempfile [g:netrw_ftpmode] - get filename tempfile +< + open machine [port] open machine [port] + user userid password userid password + [g:netrw_ftpmode] password + get filename tempfile [g:netrw_ftpmode] + get filename tempfile > + --------------------------------------------------------------------- < Netrw then executes the lines above by use of a filter: > @@ -418,14 +448,14 @@ where -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>) If <.netrc> exists it will be used to avoid having to query the user for -userid and password). The transferred file is put into a temporary file. +userid and password. The transferred file is put into a temporary file. The temporary file is then read into the main editing session window that requested it and the temporary file deleted. If your ftp doesn't accept the "user" command and immediately just demands a userid, then try putting "let netrw_ftp=1" in your <.vimrc>. - *netrw-fixup* + *netrw-fixup* If your ftp for whatever reason generates unwanted lines (such as AUTH messages) you may write a NetReadFixup(tmpfile) function: > @@ -441,7 +471,7 @@ messages) you may write a NetReadFixup(tmpfile) function: elseif a:method == 7 "rsync elseif a:method == 8 "fetch elseif a:method == 9 "sftp - else " complain + else " complain endif endfunction > @@ -453,17 +483,42 @@ and so it is desirable to automate their removal. Here's some code taken from <netrw.vim> itself: > if has("win95") && g:netrw_win95ftp - fu! NetReadFixup(method, line1, line2) + fun! NetReadFixup(method, line1, line2) if method == 3 " ftp (no <.netrc>) - let fourblanklines= line2 - 3 - silent fourblanklines.",".line2."g/^\s*/d" + let fourblanklines= line2 - 3 + silent fourblanklines.",".line2."g/^\s*/d" endif endfunction endif > ============================================================================== -7. Debugging *netrw-debug* +7. Remote Directory Listing *netrw-dir* *netrw-list* + +Netrw supports listing (browsing) directories on remote hosts; simply attempt +to read a "file" with a trailing slash and it will be interpreted as a +request to browse a directory: + + vim [protocol]://[user@]hostname/path/ + +Netrw will modify the command in g:netrw_list to perform the directory listing +operation. By default the command is: + + ssh HOSTNAME ls -Fa + +where the HOSTNAME becomes the hostname as requested by the attempted +read. Naturally, the user may override this command with whatever is +preferred. The NetList function which implements remote directory +browsing expects that directories will be flagged by a trailing slash. + +Browsing is simple: move the cursor onto a file or directory of interest. +Hitting the <cr> (the return key) will select the file or directory. Directories +will themselves be listed, and files will be opened using the protocol given +in the original read request. + + +============================================================================== +8. Debugging *netrw-debug* The <netrw.vim> script is typically available as: @@ -494,31 +549,40 @@ which is loaded automatically at startup (assuming :set nocp). drchipNOSPAM at campbellfamily.biz - NOSPAM ============================================================================== -8. New Stuff *netrw-new* *netrw-newstuff* - - v43: * moved "Explanation" comments to <pi_netrw.txt> help file - as "Network Reference" (|netrw-ref|) - * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging - * removed superfluous NetRestorePosn() calls - v42: * now does BufReadPre and BufReadPost events on file:///* - and file://localhost/* - v41: * installed file:///* and file://localhost/* handling - v40: * prevents redraw when a protocol error occurs so that the - user may see it - v39: * sftp support - v38: * Now uses NetRestorePosn() calls with Nread/Nwrite commands - * Temporary files now removed via bwipe! instead of bwipe - (thanks to Dave Roberts) - v37: * Claar's modifications which test if ftp is successful, otherwise - give an error message - * After a read, the alternate file was pointing to the temp file. - The temp file buffer is now wiped out. - * removed silent from transfer methods so user can see what's - happening +9. History *netrw-history* + + v46: * now handles remote directory browsing + * g:netrw_silent (if 1) will cause all transfers to be silent'd + v45: * made the [user@]hostname:path form a bit more restrictive + to better handle errors in using protocols + (e.g. scp:usr@host:file was being recognized as an rcp request) + v44: * changed from "rsync -a" to just "rsync" + * somehow an editing error messed up the test to recognize + use of the fetch method for NetRead. + * more debugging statements included + v43: * moved "Explanation" comments to <pi_netrw.txt> help file + as "Network Reference" (|netrw-ref|) + * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging + * removed superfluous NetRestorePosn() calls + v42: * now does BufReadPre and BufReadPost events on file:///* + and file://localhost/* + v41: * installed file:///* and file://localhost/* handling + v40: * prevents redraw when a protocol error occurs so that the + user may see it + v39: * sftp support + v38: * Now uses NetRestorePosn() calls with Nread/Nwrite commands + * Temporary files now removed via bwipe! instead of bwipe + (thanks to Dave Roberts) + v37: * Claar's modifications which test if ftp is successful, otherwise + give an error message + * After a read, the alternate file was pointing to the temp file. + The temp file buffer is now wiped out. + * removed silent from transfer methods so user can see what's + happening ============================================================================== -9. Credits *netrw-credits* +10. Credits *netrw-credits* Vim editor by Bram Moolenaar (Thanks, Bram!) dav support by C Campbell diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 1c35d685a..4f8174b07 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.0aa. Last change: 2004 May 20 +*quickfix.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -795,7 +795,7 @@ processing. Maintaining the correct directory is more complicated if you don't use GNU-make. AIX-make for example doesn't print any information about its working -directory. Then you need to enhance the makefile. In the makefile of lesstiff +directory. Then you need to enhance the makefile. In the makefile of LessTif there is a command which echoes "Making {target} in {dir}". The special problem here is that it doesn't print informations on leaving the directory and that it doesn't print the absolute path. diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index 19cbe0130..6913be2e8 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -1,4 +1,4 @@ -*recover.txt* For Vim version 7.0aa. Last change: 2004 Apr 16 +*recover.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -61,7 +61,7 @@ Disadvantages: directories (although Vim tries to avoid that by comparing the path name). This will result in bogus ATTENTION warning messages. - When you use your home directory, and somebody else tries to edit the same - file, he will not see your swap file and will not get the ATTENTION waring + file, he will not see your swap file and will not get the ATTENTION warning message. On the Amiga you can also use a recoverable ram disk, but there is no 100% guarantee that this works. Putting swap files in a normal ram disk (like RAM: diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index 34abc46d4..766c3d8c0 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -1,4 +1,4 @@ -*sponsor.txt* For Vim version 7.0aa. Last change: 2004 Apr 23 +*sponsor.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -83,9 +83,10 @@ Bank transfer Transfer to Bram's account at the Postbank: 1644503. For show others you are a registered Vim user or sponsor. Cash Small amounts can be send with ordinary mail. Put something - around the money, so that it's not noticable from the outside. - Mention your e-mail address if you want to vote for features - and show others you are a registered Vim user or sponsor. + around the money, so that it's not noticeable from the + outside. Mention your e-mail address if you want to vote for + features and show others you are a registered Vim user or + sponsor. This is Bram's address: Bram Moolenaar Clematisstraat 30 diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index f9e1301ac..c73d17e4b 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 7.0aa. Last change: 2004 Jun 15 +*starting.txt* For Vim version 7.0aa. Last change: 2004 Jun 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1222,7 +1222,7 @@ Note that Views and Sessions are not perfect: - They don't restore everything. For example, defined functions, autocommands and ":syntax on" are not included. Things like register contents and command line history are in viminfo, not in Sessions or Views. -- Global option values are only set when the differ from the default value. +- Global option values are only set when they differ from the default value. When the current value is not the default value, loading a Session will not set it back to the default value. Local options will be set back to the default value though. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 5bd9723ac..ac4c235d0 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.0aa. Last change: 2004 Jun 15 +*syntax.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -739,7 +739,7 @@ variable. CYNLIB *cynlib.vim* *cynlib-syntax* Cynlib files are C++ files that use the Cynlib class library to enable -hardware modeling and simulation using C++. Typically Cynlib files have a .cc +hardware modelling and simulation using C++. Typically Cynlib files have a .cc or a .cpp extension, which makes it very difficult to distinguish them from a normal C++ file. Thus, to enable Cynlib highlighting for .cc files, add this line to your .vimrc file: > @@ -1664,7 +1664,7 @@ file: > let b:preprocs_as_sections = 1 -As well, the syntax file adds an extra paragraph marker for the exdented +As well, the syntax file adds an extra paragraph marker for the extended paragraph macro (.XP) in the ms package. Finally, there is a |groff.vim| syntax file that can be used for enabling diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 00d94c1c0..d5d44dff1 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 +*todo.txt* For Vim version 7.0aa. Last change: 2004 Jun 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,19 +30,10 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -This example doesn't work: - :e `=foo . ".c" ` -Inside `` don't use " as the start of a comment. -Also don't expand % or #. - -Corrections for docs from A3. Skip ones already done. - - For version 7.0: - Include many PATCHES: - 9 Win32 GuI: The print dialog uses a font which doesn't display multi-byte - messages. Include patch from Vipin Aravind? Update from Yasuhiro - Matsumoto. + 9 Merge in ideas from tutor.txt (Gabriel Zachmann) + New version 2004 June 16. 8 ":winpos" doesn't work. Patch from Vipin Aravind. 8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar 15, but it doesn't use "initdir" or "dflt". (will update patch) @@ -51,7 +42,7 @@ For version 7.0: 8 Add file locking. Lock a file when starting to edit it with flock() or fcntl(). This patch has advisory file locking while reading/writing the file: ~/vim/patches/kahn_file_locking . - Do we still want this/ + Do we still want this? Andy doesn't have time to work on it. 8 Add buffer-local autocommands? Reduces overhead for autocommands that trigger often (inserting a character, switching mode). :au Event <buffer> do-something @@ -64,10 +55,79 @@ For version 7.0: VimResized - When the Vim window has been resized (SIGWINCH) patch from Yakov Lerner, 2003 July 24. He'll write documentation and send updated patch. + InsmodEnter + InsmodLeave Taro Muraoka, 2004 Jun 16 - Include the kvim patch. http://freenux.org/vim/ (Mickael Marchand) Do not add Qtopia yet, it doesn't work very well. Mickael will update the patch before 21st. - --- responses above + 8 Unix: When libcall() fails there is no clear error message. Johannes + Zellner has a patch for this. + updated patch 2004 June 16. + 7 Add the MzScheme interface. Patch on http://iamphet.nm.ru/scheme/ + (Sergey Khorev) + Alt URL: http://cyber.miem.edu.ru/~iamphet/scheme/mzvim-0.560.tar.gz + 8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac? + New patch 2004 Jun 16 + 8 Add expression-expansion, so that the user can define his own kind of + completion. Patch from Taro Muraoka, 2003 Aug 26. + New patch 2004 Jun 16 + 8 Text objects: Add "a'" and 'a"': a single or double quoted string. + (Tim Chase) Patch from Taro Muraoka (2003 Dec 16). + New patch 2004 Jun 16 + 7 Add "nbsp" in 'listchars'? Patch from David Blanchet, 2003 Jul 28. + again 2004 Jun 16 + 8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible. + Aric Blumer has a patch for this. + He will update the patch for 6.3. + 9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option, + set highlighting with "CursorColumn" group. Useful for aligning text. + Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for + underlining the cursor line, 2004 Mar 24. Update 2004 Jun 17 + Alternatie: when 'number' is set highlight the number of the current + line. + 7 Completion of network shares, patch by Yasuhiro Matsumoto. + Update 2004 Jun 17. + 8 Patches from Peter "Rain Dog" Cucka: + - guifont selector (2002 Dec 15) will send update + 7 Add an option to set the width of the 'number' column. Eight + positions is often more than needed. Or adjust the width to the + length of the file? + Add patch that adds 'numberlen' option. (James Harvey) + Other patch with min and max from Emmanuel Renieris (2002 Jul 24) + Other patch without an option by Gilles Roy (2002 Jul 25) + New patch from Emmanuel Renieris, 2004 Jun 17 + Needs more work: use one option with one or two numbers + 7 Be able to call a function while passing on a variable number of + arguments: + :function Foo(abc, ...) + : call Bar(a:abc, a:*) + Charles Campbell has a patch for this + He lost the patch himself. + 7 Make ":startinsert" command work directly for functions and scripts? + Also make it possible to append (it's difficult at end of line). + And add ":startreplace" (patch by Charles Campbell, 2004 Jan 9, + http://www.erols.com/astronaut/vim/index.html#Patch) + Update 2004 June 18 + 8 Add patch from Charles Campbell to have ":0file!" remove the name of + the current buffer. (2003 June 17) + Lost the patch himself. + 8 Make it possible to delete marks. Charles Campbell has a patch that + does this with the markclear() function (2004 Jan 9). And the + ":delmark" command (2004 Feb 9) + Update 2004 June 18 + 8 ":hardcopy": + - Patch to append CTRL-D to PostScript output (Mike Williams, 2004 Jun + 14) + - support printing multi-byte characters. Patch from Motonobu + Ichimura. New (better) patch from Mike Williams (2004 Jan 20) + Updated patch: http://www.eandem.co.uk/mrw/vim/special/index.html + 7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ): + 'flipcase' variable: upper/lowercase pairs. + Insert comma's between pairs and allow a range, make it look like + 'isfname'. E.g. ":set flipcase=a-zA-Z,xX,23-33:143-153". The colon to + separate the from and to part is optional. + Resp: no time now. + --- responses above -- 7 Make "5dd" on last-but-one-line not delete anything (Vi compatible). Add flag in 'cpoptions' for this. When not present, "2dd" in the last line should delete the last line. Patch from greenx 2002 Apr 11. @@ -77,30 +137,10 @@ For version 7.0: Martin Dalecki 2002 Jan 11. 8 Add a few more command names to the menus. Patch from Jiri Brezina (28 feb 2002). - 8 Patch to add 'transparency' option. Disadvantage: it's slow. (Eckehard - Berns, 2004 May 9) http://ecki.to/vim-icns/TransBack.diff - 8 Patches from "Rain Dog" Cucka: - - guifont selector (2002 Dec 15) - - scrollbar (2002 Dec 8) - - Quartz fonts (2002 Dec 8) 7 ATTENTION dialog choices are more logical when "Delete it' appears before "Quit". Patch by Robert Webb, 2004 May 3. - 8 Unix: When libcall() fails there is no clear error message. Johannes - Zellner has a patch for this. - 8 ":hardcopy": - - Patch to append CTRL-D to PostScript output (Mike Williams, 2004 Jun - 14) - - support printing multi-byte characters. Patch from Motonobu - Ichimura. New (better) patch from Mike Williams (2004 Jan 20) - 9 Merge in ideas from ~/vim/patches/tutor.txt (Gabriel Zachmann) - 8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac? - Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work for multi-byte characters. - 7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ): - 'flipcase' variable: upper/lowercase pairs. - Insert comma's between pairs and allow a range, make it look like - 'isfname'. E.g. ":set flipcase=a-zA-Z,xX,23-33:143-153". The colon to - separate the from and to part is optional. - Win32: add options to print dialog. Patch from Vipin Aravind. - Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5) use the patch that keeps using HLF_8 if HLF_WS has not @@ -113,19 +153,6 @@ For version 7.0: - Add possibility to highlight specific columns (for Fortran). Or put a line in between columns (e.g. for 'textwidth'). Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20. - 9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option, - set highlighting with "CursorColumn" group. Useful for aligning text. - Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for - underlining the cursor line, 2004 Mar 24. - Alternatie: when 'number' is set highlight the number of the current - line. - 7 Be able to call a function while passing on a variable number of - arguments: - :function Foo(abc, ...) - : call Bar(a:abc, a:*) - Charles Campbell has a patch for this - 8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible. - Aric Blumer has a patch for this. 8 Add functions: tr(expr, from, to) translate chars (Patch from Ron Aaron, Apr 8 2004) @@ -136,9 +163,9 @@ For version 7.0: Presser) He will send a new patch. Is this really useful? - --- multibyteidx(string, idx) Byte index in multi-byte character. Patch by Ilya Sher, 2004 Feb 25 + Update June 18 (third one). menuprop({name}, {idx}, {what}) Get menu property of menu {name} item {idx}. menuprop("", 1, "name") returns "File". @@ -148,9 +175,15 @@ For version 7.0: mapname({idx}, mode) return the name of the idx'th mapping. Patch by Ilya Sher, 2004 Mar 4. match({pat}, {string} [,start] [,count]) get index of count'th match - Patch by Ilya Sher, 2004 Mar 31 + Patch by Ilya Sher, 2004 Jun 19 find() find file in 'path' (patch from Johannes Zellner 2001 Dec 20) + Update 2004 Jun 16. + gettext() Translate a message. (Patch from Yasuhiro + Matsumoto) How to get the messages into the + .po files? + Update 2004 Jun 17 + --- realname() Get user name (first, last, full) user_fullname() patch by Nikolai Weibull, Nov 3 2002) @@ -175,10 +208,6 @@ For version 7.0: (Patch from Yegappan Lakshmanan) raisewin() raise gvim window (see HierAssist patch for Tcl implementation ~/vim/HierAssist/ ) - gettext() Translate a message. (Patch from Yasuhiro - Matsumoto) How to get the messages into the - .po files? - 7 Add "nbsp" in 'listchars'? Patch from David Blanchet, 2003 Jul 28. 7 Add patch from Benoit Cerrina to integrate Vim and Perl functions better. Now also works for Ruby (2001 Nov 10) 7 Add 'taglistfiles' option, show file name and type when listing matching @@ -186,37 +215,20 @@ For version 7.0: 7 Motif: use the menu font consistently. Patch from Martin Dalecki 2002 Jan 11. - Motif: add 3D shading for the menu entries? Patch from Martin Dalecki. - 8 Add expression-expansion, so that the user can define his own kind of - completion. Patch from Taro Muraoka, 2003 Aug 26. - 7 Completion of network shares, patch by Yasuhiro Matsumoto. 9 When 'autoindent' is set, hitting <CR> twice, while there is text after the cursor, doesn't delete the autoindent in the resulting blank line. (Rich Wales) This is Vi compatible, but it looks like a bug. Rich has a suggestion for a patch to fix this. e-mail to Rich bounced. - 7 Make ":startinsert" command work directly for functions and scripts? - Also make it possible to append (it's difficult at end of line). - And add ":startreplace" (patch by Charles Campbell, 2004 Jan 9, - http://www.erols.com/astronaut/vim/index.html#Patch) - 8 Text objects: Add "a'" and 'a"': a single or double quoted string. - (Tim Chase) Patch from Taro Muraoka (2003 Dec 16). 7 For Visual mode: Command to do a search for the string in the marked area. Only when fewer than two lines. Use "g/" and "gb". Patch from Yegappan Lakshmanan. 7 When 'rightleft' is set, the search pattern should be displayed right to left as well? See patch of Dec 26. (Nadim Shaikli) - 8 Add patch from Charles Campbell to have ":0file!" remove the name of - the current buffer. (2003 June 17) - 8 Make it possible to delete marks. Charles Campbell has a patch that - does this with the markclear() function (2004 Jan 9). And the - ":delmark" command (2004 Feb 9) - 7 Win32: Add patch for 5-button mouse. (Michael Geddes 2001 Nov 26) 8 Lock all used memory so that it doesn't get swapped to disk (uncrypted). Patch by Jason Holt, 2003 May 23. 7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003). 7 Add ! register, for shell commands. (patch from Grenie) - 7 Add the MzScheme interface. Patch on http://iamphet.nm.ru/scheme/ - (Sergey Khorev) 8 Make 'statusline' local, so that each window can have a different value. But should it also be local to a buffer? (Yegappan Lakshmanan has a patch, 2002 feb 15) @@ -233,21 +245,10 @@ For version 7.0: 8 Include a connection to an external program through a pipe? See patches from Felbinger for a mathematica interface. Or use emacs server kind of thing? - 7 Add an option to set the width of the 'number' column. Eight - positions is often more than needed. Or adjust the width to the - length of the file? - Add patch that adds 'numberlen' option. (James Harvey) - Other patch with min and max from Emmanuel Renieris (2002 Jul 24) - Other patch without an option by Gilles Roy (2002 Jul 25) 7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25. - findmatch() should be adjusted for Lisp. See remark at get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram, incomplete patch Mar 18) - 8 Sorting of filenames for completion is wrong on systems that ignore - case of filenames. Add 'ignorefncase' option. When set, case in - filenames is ignored for sorting them. Patch by Mike Williams: - ~/vim/patches/ignorefncase. Also change what matches? Or use another - option name. - Change ga_room into ga_maxlen, so that it doesn't need to be incremented/decremented each time. - new DATA TYPES: lists, dictionaries and function references. @@ -716,8 +717,9 @@ Amiga: Macintosh: -9 Mac: The motion type is not stored on the clipboard. Using ":set - clipboard=unnamed" makes "yyp" work characterwise. (Michael DeMoney) +7 Patch to add 'transparency' option. Disadvantage: it's slow. (Eckehard + Berns, 2004 May 9) http://ecki.to/vim/TransBack-2004-05-09.diff + Needs more work. Add when someone really wants it. 7 Loading the Perl library only works on OS/X 10.2 or 10.3, never on both. Load the Perl library dynamically see Python sources file dynload_mac (Jack) @@ -1745,7 +1747,7 @@ Scrolling: bound windows. - Add 'search' option to 'scrollopt' to allow 'scrollbind' windows to be bound by regexp searches -- Add "z>" and "z<": scroll sideways one screenfull. (Campbell) +- Add "z>" and "z<": scroll sideways one screenful. (Campbell) - Add option to set the number of lines when not to scroll, instead of the fixed number used now (for terminals that scroll slow with a large number of lines but not with a single line). @@ -2971,7 +2973,7 @@ Registers: Debug mode: 7 Add something to enable debugging when a remote message is received. 8 Add breakpoints for setting an option -8 Add breakpoits for assigning to a variable. +8 Add breakpoints for assigning to a variable. 7 Add a watchpoint in the debug mode: An expression that breaks execution when evaluating to non-zero. 7 Store the history from debug mode in viminfo. @@ -3361,6 +3363,11 @@ Various improvements: - Support mapping for replace mode and "r" command (Vi doesn't do this)? 5 Add 'ignorefilecase' option: Ignore case when expanding file names. ":e ma<Tab>" would also find "Makefile" on Unix. +8 Sorting of filenames for completion is wrong on systems that ignore + case of filenames. Add 'ignorefncase' option. When set, case in + filenames is ignored for sorting them. Patch by Mike Williams: + ~/vim/patches/ignorefncase. Also change what matches? Or use another + option name. 8 Should be able to compile Vim in another directory, with $(srcdir) set to where the sources are. Add $(srcdir) in the Makefile in a lot of places. (Netherton) diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt index a277b1375..39ee4d25c 100644 --- a/runtime/doc/usr_21.txt +++ b/runtime/doc/usr_21.txt @@ -1,4 +1,4 @@ -*usr_21.txt* For Vim version 7.0aa. Last change: 2004 Mar 29 +*usr_21.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM USER MANUAL - by Bram Moolenaar @@ -65,7 +65,7 @@ a look at an overview: :w !{program} execute {program} and send text to its input :[range]!{program} filter text through {program} -Notice that the precense of a range before "!{program}" makes a big +Notice that the presense of a range before "!{program}" makes a big difference. Without it executes the program normally, with the range a number of text lines is filtered through the program. diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt index c355cb31d..b18b085a7 100644 --- a/runtime/doc/usr_22.txt +++ b/runtime/doc/usr_22.txt @@ -1,4 +1,4 @@ -*usr_22.txt* For Vim version 7.0aa. Last change: 2003 Mar 17 +*usr_22.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM USER MANUAL - by Bram Moolenaar @@ -95,7 +95,7 @@ The following commands are used to display other information: s Use the field the cursor is in to sort on. First display the size and date with i. Then Move the cursor to the size of any file and press s. The files - will now be sorted on size. Press s wile the cursor + will now be sorted on size. Press s while the cursor is on a date and the items will be sorted on date. r reverse the sorting order (either size or date) diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 8753bfa07..537f15d1c 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.0aa. Last change: 2004 Jun 14 +*various.txt* For Vim version 7.0aa. Last change: 2004 Jun 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -571,9 +571,11 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined current file. See |help-translated|. *:helpg* *:helpgrep* -:helpg[rep] {pattern} +:helpg[rep] {pattern}[@xx] Search all help text files and make a list of lines in which {pattern} matches. Jumps to the first match. + The optional [@xx] specifies that only matches in the + "xx" language are to be found. You can navigate through the matches with the |quickfix| commands, e.g., |:cnext| to jump to the next one. Or use |:cwindow| to get the list of @@ -584,6 +586,8 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined :helpgrep Uganda < Example for case ignoring search: > :helpgrep uganda\c +< Example for searching in French help: > + :helpgrep backspace@fr < Cannot be followed by another command, everything is used as part of the pattern. But you can use |:execute| when needed. diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt index 4f53463cb..bc2f45ef5 100644 --- a/runtime/doc/version5.txt +++ b/runtime/doc/version5.txt @@ -1,4 +1,4 @@ -*version5.txt* For Vim version 7.0aa. Last change: 2004 Jan 17 +*version5.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1517,7 +1517,7 @@ Menus defined in the .vimrc were removed when GUI started. Crash when pasting with the mouse in insert mode. -Crash whith ":unmenu *" in .gvimrc for Athena. +Crash with ":unmenu *" in .gvimrc for Athena. "5>>" shifted 5 lines 5 times, instead of 1 time. @@ -2026,7 +2026,7 @@ $vim/macros". If no initial dir specified for ":browse e", can be compiled to either begin in the current directory, or that of the current buffer. (Negri and Kahn) Added the 'browsedir' option, with value "current", "last" or "buffer". Tells -wether a browse dialog starts in last used dir, dir of current buffer, or +whether a browse dialog starts in last used dir, dir of current buffer, or current dir. ":browse w" is unaffected. The default menus have been changed to use the ":browse" command. @@ -3667,8 +3667,8 @@ and starts Vim on it. "make install" now also copies the tutor. In the output of ":clist" the current entry is highlighted, with the 'i' highlighting (same as used for 'incsearch'). -For the ":clist" command, you can scroll backwards with "b" (one screenfull), -"u" (half a screenfull) and "k" (one line). +For the ":clist" command, you can scroll backwards with "b" (one screenful), +"u" (half a screenful) and "k" (one line). Multi-byte support: - X-input method for multi-byte characters. And various fixes for multi-byte @@ -4582,7 +4582,7 @@ buffers, only beep and continue with the insert command. Dos and Win32 console: Setting t_me didn't work to get another color. Made this works backwards compatible. -For turkish (LANG = "tr") uppercase 'i' is not an 'I'. Use ASCII uppercase +For Turkish (LANG = "tr") uppercase 'i' is not an 'I'. Use ASCII uppercase translation in vim_strup() to avoid language problems. (Komur) Unix: Use usleep() or nanosleep() for mch_delay() when available. Hopefully @@ -7578,7 +7578,7 @@ Fixed compiling under NeXT. (Jeroen C.M. Goudswaard) optwin.vim gave an error when used in Vi compatible mode ('cpo' contains 'C'). -Tcl interpreter: "buffer" command didn't check for precense of an argument. +Tcl interpreter: "buffer" command didn't check for presense of an argument. (Dave Bodenstab) dosinst.c: Added checks for too long file name. diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt index d97cf92a8..611a78287 100644 --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -1,4 +1,4 @@ -*version6.txt* For Vim version 7.0aa. Last change: 2004 Jun 07 +*version6.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1764,7 +1764,7 @@ Motif: (Martin Dalecki) - Use XPM bitmaps for the icon when possible. Use the Solaris XpmP.h include file when it's available. - Change the shadow of the toolbar items to get a visual feedback of it being - pressed on non-LessTiff. + pressed on non-LessTif. - Use gadgets instead of windows for some items for speed. Command line completion: @@ -6645,7 +6645,7 @@ Solution: Don't map CTRL-N after CTRL-X CTRL-N. Same for CTRL-P. Files: src/getchar.c Patch 6.1.031 -Problem: Cygwin: Xxd could read a file in text mode intead of binary mode. +Problem: Cygwin: Xxd could read a file in text mode instead of binary mode. Solution: Use "rb" or "rt" when needed. (Pavol Juhas) Files: src/xxd/xxd.c @@ -6947,7 +6947,7 @@ Solution: Fix explorer plugin and key modifiers. (Axel Kielhorn) Files: src/edit.c, src/feature.h, src/gui_mac.c, src/os_mac.c Patch 6.1.077 -Problem: On a Debian systEm wht ACL linking fails. (Lubomir Host) +Problem: On a Debian system with ACL linking fails. (Lubomir Host) Solution: When the "acl" library is used, check if the "attr" library is present and use it. Files: src/auto/configure, src/configure.in, src/link.sh @@ -7229,7 +7229,7 @@ Files: src/move.c Patch 6.1.121 (depends on 6.1.098) Problem: When starting Select mode from Insert mode, then using the Paste - menu entry, the cursor is left before the laste pasted character. + menu entry, the cursor is left before the last pasted character. (Mario Schweigler) Solution: Set the cursor for Insert mode one character to the right. Files: runtime/menu.vim @@ -7963,7 +7963,7 @@ Patch 6.1.231 Problem: Double clicking with the mouse to select a word does not work for multi-byte characters. Solution: Use vim_iswordc() instead of vim_isIDc(). This means 'iskeyword' - is used intead of 'isident'. Also fix that mixing ASCII with + is used instead of 'isident'. Also fix that mixing ASCII with multi-byte word characters doesn't work, the mouse class for punctuation and word characters was mixed up. Files: src/normal.c @@ -10262,7 +10262,7 @@ Files: src/ex_cmds.c Patch 6.2.053 Problem: Prototype for bzero() doesn't match most systems. -Solution: Use "void *" instead of "char *" and "size_t" intead of "int". +Solution: Use "void *" instead of "char *" and "size_t" instead of "int". Files: src/osdef1.h.in Patch 6.2.054 @@ -10534,7 +10534,7 @@ Files: src/buffer.c Patch 6.2.096 Problem: Win32: ":let @* = ''" put a newline on the clipboard. (Klaus Bosau) -Solution: Put zero bytes on the clibpoard for an empty string. +Solution: Put zero bytes on the clipboard for an empty string. Files: src/ops.c Patch 6.2.097 @@ -11339,7 +11339,7 @@ Files: src/fileio.c, src/netbeans.c, src/proto/netbeans.pro, runtime/doc/netbeans.txt, runtime/doc/tags Patch 6.2.216 (after 6.2.206) -Problem: Multi-byte characters stil cannot be used as hotkeys in a console +Problem: Multi-byte characters still cannot be used as hotkeys in a console dialog. (Mattias Erkisson) Solution: Make get_keystroke() handle multi-byte characters. Files: src/misc1.c @@ -11376,7 +11376,7 @@ Files: src/ex_cmds.h Patch 6.2.222 Problem: Using "--remote" several times on a row only opens some of the files. (Dany St-Amant) -Solution: Don't delete all typehead when the server receives a command from +Solution: Don't delete all typeahead when the server receives a command from a client, only delete typed characters. Files: src/main.c @@ -11874,7 +11874,7 @@ Problem: When in debug mode, receiving a message from a remote client causes a crash. Evaluating an expression causes Vim to wait for "cont" to be typed, without a prompt. (Hari Krishna Dara) Solution: Disable debugging when evaluating an expression for a client. - (Michael Geddes) Don't try reading into the typehead buffer when + (Michael Geddes) Don't try reading into the typeahead buffer when it may have been filled in another way. Files: src/ex_getln.c, src/getchar.c, src/if_xcmdsrv.c, src/main.c, src/misc1.c, src/proto/getchar.pro, src/proto/main.pro, @@ -12556,7 +12556,7 @@ Patch 6.2.398 (extra) Problem: Win32 console: no extra key modifiers are supported. Solution: Encode the modifiers into the input stream. Also fix that special keys are converted and stop working when 'tenc' is set. Also fix - that when 'tenc' is intialized the input and output conversion is + that when 'tenc' is initialized the input and output conversion is not setup properly until 'enc' or 'tenc' is set. Files: src/getchar.c, src/option.c, src/os_win32.c @@ -13081,7 +13081,7 @@ Patch 6.2.476 Problem: When reloading a hidden buffer changed outside of Vim and the current buffer is read-only, the reloaded buffer becomes read-only. (Hari Krishna Dara) -Solution: Save the 'readonly' flag of the realoaded buffer instead of the +Solution: Save the 'readonly' flag of the reloaded buffer instead of the current buffer. Files: src/fileio.c diff --git a/runtime/indent/vb.vim b/runtime/indent/vb.vim index 515e4dc6b..b570b56b8 100644 --- a/runtime/indent/vb.vim +++ b/runtime/indent/vb.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb) " Author: Johannes Zellner <johannes@zellner.org> -" Last Change: Tue, 27 Apr 2004 14:54:59 CEST +" Last Change: Fri, 18 Jun 2004 07:22:42 CEST if exists("b:did_indent") finish @@ -10,7 +10,7 @@ let b:did_indent = 1 setlocal indentexpr=VbGetIndent(v:lnum) setlocal indentkeys& -setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,~=loop,<:> +setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:> " Only define the function once. if exists("*VbGetIndent") diff --git a/runtime/plugin/netrw.vim b/runtime/plugin/netrw.vim index d3058c55d..fdb6d2793 100644 --- a/runtime/plugin/netrw.vim +++ b/runtime/plugin/netrw.vim @@ -1,7 +1,7 @@ " netrw.vim: (global plugin) Handles file transfer across a network -" Last Change: Jun 04, 2004 +" Last Change: Jun 18, 2004 " Maintainer: Charles E. Campbell, Jr. PhD <drchipNOSPAM at campbellfamily.biz> -" Version: 44 +" Version: 46 " License: Vim License (see vim's :help license) " " But be doers of the word, and not only hearers, deluding your own selves @@ -12,7 +12,7 @@ if exists("loaded_netrw") || &cp finish endif -let loaded_netrw = "v44" +let loaded_netrw = "v46" let s:save_cpo = &cpo set cpo&vim @@ -68,6 +68,20 @@ if !exists("g:netrw_fetch_cmd") let g:netrw_fetch_cmd = "" endif endif +if !exists("g:netrw_list_cmd") + if executable("ssh") + let g:netrw_list_cmd= "ssh HOSTNAME ls -Fa" + else +" call Decho("ssh is not executable, can't do netlist") + let g:netrw_list_cmd= "" + endif +endif +if exists("g:netrw_silent") && g:netrw_silent != 0 + let g:netrw_silentxfer= "silent " +else + let g:netrw_silentxfer= "" +endif + if has("win32") \ && exists("g:netrw_use_nt_rcp") @@ -97,7 +111,7 @@ if version >= 600 endif au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "doau BufReadPre ".expand("<afile>")|exe "Nread 0r ".expand("<afile>")|exe "doau BufReadPost ".expand("<afile>") au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "doau BufReadPre ".expand("<afile>")|exe "Nread " .expand("<afile>")|exe "doau BufReadPost ".expand("<afile>") - au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "Nwrite " .expand("<afile>")|call <SID>NetRestorePosn() + au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "Nwrite " .expand("<afile>")|call <SID>NetRestorePosn() augroup END endif @@ -151,9 +165,6 @@ fun! s:NetRead(...) " save options call s:NetOptionSave() - " get name of a temporary file - let tmpfile= tempname() - " Special Exception: if a file is named "0r", then " "0r" will be used to read the " following files instead of "r" @@ -168,6 +179,10 @@ fun! s:NetRead(...) let ichoice = 1 endif + " get name of a temporary file + let tmpfile= tempname() + +" call Decho("ichoice=".ichoice." readcmd<".readcmd.">") while ichoice <= a:0 " attempt to repeat with previous host-file-etc @@ -178,7 +193,7 @@ fun! s:NetRead(...) else exe "let choice= a:" . ichoice -" call Decho("NetRead1: choice<" . choice . ">") +" call Decho("no lastfile: choice<" . choice . ">") " Reconstruct Choice if choice starts with '"' if match(choice,"?") == 0 @@ -219,13 +234,13 @@ fun! s:NetRead(...) endif endif endif -" call Decho("NetRead2: choice<" . choice . ">") +" call Decho("choice<" . choice . ">") let ichoice= ichoice + 1 " fix up windows urls if has("win32") let choice = substitute(choice,'\\','/','ge') -" call Decho("fixing up windows url to <".choice.">") +" call Decho("fixing up windows url to <".choice."> tmpfile<".tmpfile) exe 'lcd ' . fnamemodify(tmpfile,':h') let tmpfile = fnamemodify(tmpfile,':t') endif @@ -233,12 +248,24 @@ fun! s:NetRead(...) " Determine method of read (ftp, rcp, etc) call s:NetMethod(choice) + " Check if NetList() should be handling this request +" call Decho("checking if netlist: choice<".choice."> netrw_list_cmd<".g:netrw_list_cmd.">") + if choice =~ "^.*/$" + if strlen(g:netrw_list_cmd) > 0 + call s:NetList(choice) +" call Dret("NetRead") + else + echoerr "sorry, can't do a remote listing; ssh isn't executable" + endif + return + endif + " ============ " Perform Read " ============ "......................................... - " rcp: Method #1 + " rcp: NetRead Method #1 if b:netrw_method == 1 " read with rcp " call Decho("read via rcp (method #1)") " ER: noting done with g:netrw_uid yet? @@ -260,12 +287,12 @@ fun! s:NetRead(...) endif endif " call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile) - exe "!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile - let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) + exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile + let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... - " ftp + <.netrc>: Method #2 + " ftp + <.netrc>: NetRead Method #2 elseif b:netrw_method == 2 " read with ftp + <.netrc> " call Decho("read via ftp+.netrc (method #2)") let netrw_fname= b:netrw_fname @@ -275,10 +302,10 @@ fun! s:NetRead(...) exe "put ='get ".netrw_fname." ".tmpfile."'" if exists("g:netrw_port") && g:netrw_port != "" " call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe "%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port + exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port else " call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe "%!".g:netrw_ftp_cmd." -i ".g:netrw_machine + exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" @@ -289,7 +316,7 @@ fun! s:NetRead(...) let b:netrw_lastfile = choice "......................................... - " ftp + machine,id,passwd,filename: Method #3 + " ftp + machine,id,passwd,filename: NetRead Method #3 elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname " Construct execution string (four lines) which will be passed through filter " call Decho("read via ftp+mipf (method #3)") @@ -321,7 +348,7 @@ fun! s:NetRead(...) " call Decho('performing ftp -i -n') norm 1Gdd " call Decho("executing: %!".g:netrw_ftp_cmd." -i -n") - exe "%!".g:netrw_ftp_cmd." -i -n" + exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n" " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" echoerr getline(1) @@ -331,7 +358,7 @@ fun! s:NetRead(...) let b:netrw_lastfile = choice "......................................... - " scp: Method #4 + " scp: NetRead Method #4 elseif b:netrw_method == 4 " read with scp " call Decho("read via scp (method #4)") if exists("g:netrw_port") && g:netrw_port != "" @@ -342,10 +369,10 @@ fun! s:NetRead(...) if g:netrw_cygwin == 1 let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') " call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile) - exe "!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile + exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile else " call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile) - exe "!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile + exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile endif let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -361,7 +388,7 @@ fun! s:NetRead(...) if match(b:netrw_fname,"#") == -1 " simple wget " call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.escape(b:netrw_fname,' ?&')) - exe "!".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.escape(b:netrw_fname,' ?&') + exe g:netrw_silentxfer."!".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.escape(b:netrw_fname,' ?&') let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) else @@ -371,7 +398,7 @@ fun! s:NetRead(...) " call Decho("netrw_html<".netrw_html.">") " call Decho("netrw_tag <".netrw_tag.">") " call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html) - exe "!".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html + exe g:netrw_silentxfer."!".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) " call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/') exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>" @@ -379,7 +406,7 @@ fun! s:NetRead(...) let b:netrw_lastfile = choice "......................................... - " cadaver: Method #6 + " cadaver: NetRead Method #6 elseif b:netrw_method == 6 " read with cadaver " call Decho("read via cadaver (method #6)") @@ -404,28 +431,28 @@ fun! s:NetRead(...) " perform cadaver operation: norm 1Gdd " call Decho("executing: %!".g:netrw_dav_cmd) - exe "%!".g:netrw_dav_cmd + exe g:netrw_silentxfer."%!".g:netrw_dav_cmd bd! let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... - " rsync: Method #7 + " rsync: NetRead Method #7 elseif b:netrw_method == 7 " read with rsync " call Decho("read via rsync (method #7)") if g:netrw_cygwin == 1 let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') " call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile) - exe "!".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile + exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile else " call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile) - exe "!".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile + exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile endif let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... - " fetch: Method #8 + " fetch: NetRead Method #8 " fetch://[user@]host[:http]/path elseif b:netrw_method == 8 " read with fetch if g:netrw_fetch_cmd == "" @@ -441,17 +468,17 @@ fun! s:NetRead(...) if exists("g:netrw_uid") && g:netrw_uid != "" && exists("g:netrw_passwd") && g:netrw_passwd != "" " call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".escape(b:netrw_fname,' ?&')) - exe "!".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".escape(b:netrw_fname,' ?&') + exe g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".escape(b:netrw_fname,' ?&') else " call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".escape(b:netrw_fname,' ?&')) - exe "!".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".escape(b:netrw_fname,' ?&') + exe g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".escape(b:netrw_fname,' ?&') endif let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... - " sftp: Method #9 + " sftp: NetRead Method #9 elseif b:netrw_method == 9 " read with sftp " call Decho("read via sftp (method #4)") if g:netrw_cygwin == 1 @@ -461,7 +488,7 @@ fun! s:NetRead(...) exe "!".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile else " call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile) - exe "!".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile + exe g:netrw_silentxfer."!".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile endif let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -488,7 +515,7 @@ endfun " ------------------------------------------------------------------------ " NetGetFile: Function to read file "fname" with command "readcmd". {{{1 fun! s:NetGetFile(readcmd, fname, method) -" call Dfunc("NetGetFile(readcmd<".a:readcmd.">,fname<".a:fname."> method<".a:method.">)") +"" call Dfunc("NetGetFile(readcmd<".a:readcmd.">,fname<".a:fname."> method<".a:method.">)") if exists("*NetReadFixup") " for the use of NetReadFixup (not otherwise used internally) @@ -499,14 +526,14 @@ fun! s:NetGetFile(readcmd, fname, method) if &term == "win32" if &shell == "bash" let fname=a:fname -" call Decho("(win32 && bash) fname<".fname.">") +"" call Decho("(win32 && bash) fname<".fname.">") else let fname=substitute(a:fname,'/','\\\\','ge') -" call Decho("(win32 && !bash) fname<".fname.">") +"" call Decho("(win32 && !bash) fname<".fname.">") endif else let fname= a:fname -" call Decho("(copied) fname<".fname.">") +"" call Decho("(copied) fname<".fname.">") endif " get the file, but disable undo when reading a new buffer @@ -576,21 +603,21 @@ fun! s:NetGetFile(readcmd, fname, method) else let line2= line("$") - line2 endif -" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")") +"" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")") call NetReadFixup(a:method, line1, line2) endif -" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> fname<".a:fname."> readable=".filereadable(a:fname)) +"" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> fname<".a:fname."> readable=".filereadable(a:fname)) " insure that we have the right filetype and that its being displayed filetype detect redraw! -" call Dret("NetGetFile") +"" call Dret("NetGetFile") endfun " ------------------------------------------------------------------------ " NetWrite: responsible for writing a file over the net {{{1 fun! s:NetWrite(...) range -" call Dfunc("NetWrite(a:0=".a:0.")") +"" call Dfunc("NetWrite(a:0=".a:0.")") " option handling let mod= 0 @@ -612,7 +639,7 @@ fun! s:NetWrite(...) range " attempt to repeat with previous host-file-etc if exists("b:netrw_lastfile") && a:0 == 0 -" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") +"" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") let choice = b:netrw_lastfile let ichoice= ichoice + 1 else @@ -647,7 +674,7 @@ fun! s:NetWrite(...) range let ichoice = ichoice + 1 if choice > a:0 echoerr "Unbalanced string in filename '". wholechoice ."'" -" call Dret("NetWrite") +"" call Dret("NetWrite") return endif let choice= a:{ichoice} @@ -656,7 +683,7 @@ fun! s:NetWrite(...) range endif endif endif -" call Decho("choice<" . choice . ">") +"" call Decho("choice<" . choice . ">") let ichoice= ichoice + 1 " fix up windows urls @@ -675,9 +702,9 @@ fun! s:NetWrite(...) range " ============= "......................................... - " rcp: Method #1 + " rcp: NetWrite Method #1 if b:netrw_method == 1 " write with rcp -" Decho "write via rcp (method #1)" +"" Decho "write via rcp (method #1)" if s:netrw_has_nt_rcp == 1 if exists("g:netrw_uid") && ( g:netrw_uid != "" ) let uid_machine = g:netrw_machine .'.'. g:netrw_uid @@ -691,26 +718,26 @@ fun! s:NetWrite(...) range let uid_machine = g:netrw_machine endif endif -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&')) - exe "!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&') +"" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&')) + exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&') let b:netrw_lastfile = choice "......................................... - " ftp + <.netrc>: Method #2 + " ftp + <.netrc>: NetWrite Method #2 elseif b:netrw_method == 2 " write with ftp + <.netrc> let netrw_fname = b:netrw_fname new set ff=unix exe "put ='".g:netrw_ftpmode."'" -" call Decho(" NetWrite: put ='".g:netrw_ftpmode."'") +"" call Decho(" NetWrite: put ='".g:netrw_ftpmode."'") exe "put ='put ".tmpfile." ".netrw_fname."'" -" call Decho("put ='put ".tmpfile." ".netrw_fname."'") +"" call Decho("put ='put ".tmpfile." ".netrw_fname."'") if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe "%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port +"" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) + exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port else -" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe "%!".g:netrw_ftp_cmd." -i ".g:netrw_machine +"" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) + exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" @@ -721,7 +748,7 @@ fun! s:NetWrite(...) range let b:netrw_lastfile = choice "......................................... - " ftp + machine, id, passwd, filename: Method #3 + " ftp + machine, id, passwd, filename: NetWrite Method #3 elseif b:netrw_method == 3 " write with ftp + machine, id, passwd, and fname let netrw_fname= b:netrw_fname new @@ -745,10 +772,10 @@ fun! s:NetWrite(...) range " -i : turns off interactive prompting from ftp " -n unix : DON'T use <.netrc>, even though it exists " -n win32: quit being obnoxious about password -" call Decho('performing ftp -i -n') +"" call Decho('performing ftp -i -n') norm 1Gdd -" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n") - exe "%!".g:netrw_ftp_cmd." -i -n" +"" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n") + exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n" " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" echoerr getline(1) @@ -757,7 +784,7 @@ fun! s:NetWrite(...) range bd! "......................................... - " scp: Method #4 + " scp: NetWrite Method #4 elseif b:netrw_method == 4 " write with scp if exists("g:netrw_port") && g:netrw_port != "" let useport= " -P ".g:netrw_port @@ -766,23 +793,23 @@ fun! s:NetWrite(...) range endif if g:netrw_cygwin == 1 let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') -" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')) - exe "!".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&') +"" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')) + exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&') else -" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')) - exe "!".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&') +"" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')) + exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&') endif let b:netrw_lastfile = choice "......................................... - " http: Method #5 + " http: NetWrite Method #5 elseif b:netrw_method == 5 echoerr "***warning*** currently <netrw.vim> does not support writing using http:" "......................................... - " dav: Method #6 + " dav: NetWrite Method #6 elseif b:netrw_method == 6 " write with cadaver -" call Decho("write via cadaver (method #6)") +"" call Decho("write via cadaver (method #6)") " Construct execution string (four lines) which will be passed through filter let netrw_fname= b:netrw_fname @@ -804,26 +831,26 @@ fun! s:NetWrite(...) range " perform cadaver operation: norm 1Gdd -" call Decho("executing: %!".g:netrw_dav_cmd) - exe "%!".g:netrw_dav_cmd +"" call Decho("executing: %!".g:netrw_dav_cmd) + exe g:netrw_silentxfer."%!".g:netrw_dav_cmd bd! let b:netrw_lastfile = choice "......................................... - " rsync: Method #7 + " rsync: NetWrite Method #7 elseif b:netrw_method == 7 " write with rsync if g:netrw_cygwin == 1 let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') -" call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')) - exe "!".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&') +"" call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')) + exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&') else -" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')) - exe "!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&') +"" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')) + exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&') endif let b:netrw_lastfile = choice "......................................... - " scp: Method #9 + " scp: NetWrite Method #9 elseif b:netrw_method == 9 " write with sftp let netrw_fname= b:netrw_fname if exists("g:netrw_uid") && ( g:netrw_uid != "" ) @@ -835,8 +862,8 @@ fun! s:NetWrite(...) range set ff=unix put ='put '.tmpfile.' '.netrw_fname norm 1Gdd -" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine) - exe "%!".g:netrw_sftp_cmd.' '.uid_machine +"" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine) + exe g:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine bd! let b:netrw_lastfile= choice @@ -847,7 +874,7 @@ fun! s:NetWrite(...) range endwhile " cleanup -" call Decho("cleanup") +"" call Decho("cleanup") let result=delete(tmpfile) call s:NetOptionRestore() @@ -855,11 +882,146 @@ fun! s:NetWrite(...) range let &mod= mod " usually equivalent to set nomod endif -" call Dret("NetWrite") +"" call Dret("NetWrite") endfun " end of NetWrite " ------------------------------------------------------------------------ +" NetList: This function uses the command in g:netrw_list_cmd to get a list {{{1 +" of the contents of a remote directory. It is assumed that the +" g:netrw_list_cmd has a string, HOSTNAME, that needs to be substituted +" with the requested remote hostname first. +fun! <SID>NetList(dirname) +"" call Dfunc("NetList(dirname<".a:dirname.">)") + + " sanity maintenance + let dirname= a:dirname + if dirname !~ '/$' && (!exists("g:netrw_machine") || !exists("b:netlist_method") || !exists("b:netlist_path")) + let dirname= dirname."/" + endif + set ma + + if dirname !~ '/$' && dirname !~ '^"' + " looks like a regular file, attempt transfer +"" call Decho("attempt transfer with regular file<".dirname.">") +"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">") + %d + + " remove any filetype indicator from end of dirname, except for the + " "this is a directory" indicator (/) + let dirname= substitute(dirname,"[*=@|]$","","e") +"" call Decho("modified dirname<".dirname.">") + + " remote-read the requested file into current buffer + let machine= g:netrw_machine + let method = b:netlist_method + let path = b:netlist_path + enew! + exe "file ".method."://".machine."/".path.dirname + exe "doau BufReadPre ".dirname + silent call s:NetRead(method."://".machine."/".path.dirname) + exe "doau BufReadPost ".dirname + 1d + set nomod noma + + silent! unlet b:netlist_method + silent! unlet b:netlist_cmd + silent! unlet b:netlist_path +"" call Dret("NetList") + return + + elseif dirname == './' + " refresh the directory list +"" call Decho("refresh directory listing") +"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">") + %d + + elseif dirname == '../' + " go up one directory + + if b:netlist_path !~ '/' && strlen(b:netlist_path) > 0 + " go to top (rltv) directory +"" call Decho("go up one directory : 1 path<".b:netlist_path.">") + let b:netlist_path= "" + + elseif b:netlist_path !~ '^[./]\+$' && strlen(b:netlist_path) > 0 + " remove a directory from the netlist_path +"" call Decho("go up one directory : 2 path<".b:netlist_path.">") + if b:netlist_path =~ '^[^/]*/$' + let b:netlist_path= "" + else + let b:netlist_path= substitute(b:netlist_path,'^\(.*/\)[^/]*/$','\1','') + endif + + else + " append ../ +"" call Decho("go up one directory : 3 path<".b:netlist_path.">") + let b:netlist_path= b:netlist_path.'../' + endif +"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">") + %d + + elseif dirname !~ '^\w\+:' && dirname =~ '/$' + " go down one directory +"" call Decho("go down one directory<".dirname.">") + let b:netlist_path=b:netlist_path.dirname +"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">") + %d + + else + " normal initial directory listing +"" call Decho("normal initial directory listing") + + let listcmd = substitute(g:netrw_list_cmd,'\<HOSTNAME\>',g:netrw_machine,'') + let method = substitute(dirname,'^\(\w\+\):.*$','\1','') + let fname = b:netrw_fname +"" call Decho("set up listcmd<".listcmd.">") +"" call Decho("set up method <".method.">") +"" call Decho("set up fname <".fname.">") + + " set up window + if &mod == 1 + wincmd s + endif + enew! + if v:version >= 602 + setlocal bh=wipe + endif + + " set up buffer-local variables + let b:netlist_method = method + let b:netlist_cmd = listcmd + let b:netlist_path = fname + + " set up buffer-local map + nnoremap <buffer> <cr> :call <SID>NetList(expand("<cWORD>"))<cr> + +"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">") + endif + +"" call Decho("executing: r! ".b:netlist_cmd." '".b:netlist_path."'") + put ='\" ==============================' + put ='\" Netrw Remote Directory Listing' + put ='\" '.g:netrw_machine.':'.b:netlist_path + put ='\" ==============================' + exe "silent r! ".b:netlist_cmd." '".b:netlist_path."'" + 1d + set ft=netrwlist + silent 5,$s/^\(.*\)\/$/ \1/e + silent 5,$call s:NetSort() + silent 5,$s/^ \(.*\)$/\1\//e + 5 + exe 'file ['.g:netrw_machine.':'.b:netlist_path.']' + if v:version >= 602 + setlocal nomod bh=wipe bt=nofile nobl noma + else + setlocal nomod + endif + +"" call Dret("NetList") +endfun + +" ------------------------------------------------------------------------ " NetMethod: determine method of transfer {{{1 " method == 1: rcp " 2: ftp + <.netrc> @@ -871,7 +1033,7 @@ endfun " 8: fetch " 9: sftp fun! s:NetMethod(choice) " globals: method machine id passwd fname -" call Dfunc("NetMethod(a:choice<".a:choice.">)") +"" call Dfunc("NetMethod(a:choice<".a:choice.">)") " initialization let b:netrw_method = 0 @@ -891,23 +1053,23 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname " rsyncurm : rsync://host[:port]/path Use rsync " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http) " sftpurm : sftp://[user@]host/filename Use scp - let mipf = '\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)' - let mf = '\(\S\+\)\s\+\(\S\+\)' - let ftpurm = 'ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' - let rcpurm = 'rcp://\(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$' - let rcphf = '\(\([^@]\{-}\)@\)\=\(\I\i*\):\(\S\+\)' - let scpurm = 'scp://\([^/]\{-}\)\([#:]\d\+\)\=/\(.*\)$' - let httpurm = 'http://\([^/]\{-}\)\(/.*\)\=$' - let davurm = 'dav://\([^/]\{-}\)/\(.*\)\=$' - let rsyncurm = 'rsync://\([^/]\{-}\)/\(.*\)\=$' - let fetchurm = 'fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' - let sftpurm = 'sftp://\([^/]\{-}\)/\(.*\)\=$' - -" call Decho("determine method:") + let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$' + let mf = '^\(\S\+\)\s\+\(\S\+\)$' + let ftpurm = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' + let rcpurm = '^rcp://\(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$' + let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$' + let scpurm = '^scp://\([^/]\{-}\)\([#:]\d\+\)\=/\(.*\)$' + let httpurm = '^http://\([^/]\{-}\)\(/.*\)\=$' + let davurm = '^dav://\([^/]\{-}\)/\(.*\)\=$' + let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$' + let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' + let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$' + +"" call Decho("determine method:") " Determine Method " rcp://user@hostname/...path-to-file if match(a:choice,rcpurm) == 0 -" call Decho("rcp://...") +"" call Decho("rcp://...") let b:netrw_method = 1 let userid = substitute(a:choice,rcpurm,'\2',"") let g:netrw_machine= substitute(a:choice,rcpurm,'\3',"") @@ -918,7 +1080,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname " scp://user@hostname/...path-to-file elseif match(a:choice,scpurm) == 0 -" call Decho("scp://...") +"" call Decho("scp://...") let b:netrw_method = 4 let g:netrw_machine= substitute(a:choice,scpurm,'\1',"") let b:netrw_port = substitute(a:choice,scpurm,'\2',"") @@ -926,28 +1088,28 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname " http://user@hostname/...path-to-file elseif match(a:choice,httpurm) == 0 -" call Decho("http://...") +"" call Decho("http://...") let b:netrw_method = 5 let g:netrw_machine= substitute(a:choice,httpurm,'\1',"") let b:netrw_fname = substitute(a:choice,httpurm,'\2',"") " dav://hostname[:port]/..path-to-file.. elseif match(a:choice,davurm) == 0 -" call Decho("dav://...") +"" call Decho("dav://...") let b:netrw_method= 6 let g:netrw_machine= substitute(a:choice,davurm,'\1',"") let b:netrw_fname = substitute(a:choice,davurm,'\2',"") " rsync://user@hostname/...path-to-file elseif match(a:choice,rsyncurm) == 0 -" call Decho("rsync://...") +"" call Decho("rsync://...") let b:netrw_method = 7 let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"") let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"") " ftp://[user@]hostname[[:#]port]/...path-to-file elseif match(a:choice,ftpurm) == 0 -" call Decho("ftp://...") +"" call Decho("ftp://...") let userid = substitute(a:choice,ftpurm,'\2',"") let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") @@ -975,7 +1137,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname endif elseif match(a:choice,fetchurm) == 0 -" call Decho("fetch://...") +"" call Decho("fetch://...") let b:netrw_method = 8 let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"") let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"") @@ -984,7 +1146,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname " Issue an ftp : "machine id password [path/]filename" elseif match(a:choice,mipf) == 0 -" call Decho("(ftp) host id pass file") +"" call Decho("(ftp) host id pass file") let b:netrw_method = 3 let g:netrw_machine = substitute(a:choice,mipf,'\1',"") let g:netrw_uid = substitute(a:choice,mipf,'\2',"") @@ -993,7 +1155,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname " Issue an ftp: "hostname [path/]filename" elseif match(a:choice,mf) == 0 -" call Decho("(ftp) host file") +"" call Decho("(ftp) host file") if exists("g:netrw_uid") && exists("g:netrw_passwd") let b:netrw_method = 3 let g:netrw_machine = substitute(a:choice,mf,'\1',"") @@ -1007,18 +1169,22 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname " sftp://user@hostname/...path-to-file elseif match(a:choice,sftpurm) == 0 -" call Decho("sftp://...") +"" call Decho("sftp://...") let b:netrw_method = 9 let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"") let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"") " Issue an rcp: hostname:filename" (this one should be last) elseif match(a:choice,rcphf) == 0 -" call Decho("(rcp) host:file)") +"" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">") let b:netrw_method = 1 let userid = substitute(a:choice,rcphf,'\2',"") let g:netrw_machine= substitute(a:choice,rcphf,'\3',"") let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") +"" call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">") +"" call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">") +"" call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">") +"" call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">") if userid != "" let g:netrw_uid= userid endif @@ -1032,18 +1198,18 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname let b:netrw_method = -1 endif -" call Decho("a:choice <".a:choice.">") -" call Decho("b:netrw_method <".b:netrw_method.">") -" call Decho("g:netrw_machine<".g:netrw_machine.">") -" call Decho("g:netrw_port <".g:netrw_port.">") -" if exists("g:netrw_uid") "Decho -" call Decho("g:netrw_uid <".g:netrw_uid.">") -" endif "Decho -" if exists("g:netrw_passwd") "Decho -" call Decho("g:netrw_passwd <".g:netrw_passwd.">") -" endif "Decho -" call Decho("b:netrw_fname <".b:netrw_fname.">") -" call Dret("NetMethod") +"" call Decho("a:choice <".a:choice.">") +"" call Decho("b:netrw_method <".b:netrw_method.">") +"" call Decho("g:netrw_machine<".g:netrw_machine.">") +"" call Decho("g:netrw_port <".g:netrw_port.">") +"" if exists("g:netrw_uid") "Decho +"" call Decho("g:netrw_uid <".g:netrw_uid.">") +"" endif "Decho +"" if exists("g:netrw_passwd") "Decho +"" call Decho("g:netrw_passwd <".g:netrw_passwd.">") +"" endif "Decho +"" call Decho("b:netrw_fname <".b:netrw_fname.">") +"" call Dret("NetMethod") endfun " end of NetMethod @@ -1056,32 +1222,32 @@ fun! NetUserPass(...) " get/set userid if a:0 == 0 -" call Dfunc("NetUserPass(a:0<".a:0.">)") +"" call Dfunc("NetUserPass(a:0<".a:0.">)") if !exists("g:netrw_uid") || g:netrw_uid == "" " via prompt let g:netrw_uid= input('Enter username: ') endif else " from command line -" call Dfunc("NetUserPass(a:1<".a:1.">) {") +"" call Dfunc("NetUserPass(a:1<".a:1.">) {") let g:netrw_uid= a:1 endif " get password if a:0 <= 1 " via prompt -" call Decho("a:0=".a:0." case <=1:") +"" call Decho("a:0=".a:0." case <=1:") let g:netrw_passwd= inputsecret("Enter Password: ") else " from command line -" call Decho("a:0=".a:0." case >1: a:2<".a:2.">") +"" call Decho("a:0=".a:0." case >1: a:2<".a:2.">") let g:netrw_passwd=a:2 endif -" call Dret("NetUserPass") +"" call Dret("NetUserPass") endfun " end NetUserPass " ------------------------------------------------------------------------ " NetOptionSave: save options and set to "standard" form {{{1 fun!s:NetOptionSave() -" call Dfunc("NetOptionSave()") +"" call Dfunc("NetOptionSave()") " Get Temporary Filename let s:aikeep = &ai @@ -1100,16 +1266,16 @@ fun!s:NetOptionSave() if has("win32") && !has("win95") let s:swfkeep= &swf set noswf -" call Decho("setting s:swfkeep to <".&swf.">") +"" call Decho("setting s:swfkeep to <".&swf.">") endif -" call Dret("NetOptionSave") +"" call Dret("NetOptionSave") endfun " ------------------------------------------------------------------------ " NetOptionRestore: restore options {{{1 fun! s:NetOptionRestore() -" call Dfunc("NetOptionRestore()") +"" call Dfunc("NetOptionRestore()") let &ai = s:aikeep let &cin = s:cinkeep @@ -1132,27 +1298,55 @@ fun! s:NetOptionRestore() unlet s:twkeep unlet s:dirkeep -" call Dret("NetOptionRestore") +"" call Dret("NetOptionRestore") endfun " ------------------------------------------------------------------------ " NetReadFixup: this sort of function is typically written by the user {{{1 -" to handle extra junk that their system's ftp dumps -" into the transfer. This function is provided as an -" example and as a fix for a Windows 95 problem: in my -" experience, win95's ftp always dumped four blank lines -" at the end of the transfer. +" to handle extra junk that their system's ftp dumps +" into the transfer. This function is provided as an +" example and as a fix for a Windows 95 problem: in my +" experience, win95's ftp always dumped four blank lines +" at the end of the transfer. if has("win95") && g:netrw_win95ftp fun! NetReadFixup(method, line1, line2) -" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") +"" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") if method == 3 " ftp (no <.netrc>) let fourblanklines= line2 - 3 silent fourblanklines.",".line2."g/^\s*/d" endif -" call Dret("NetReadFixup") +"" call Dret("NetReadFixup") endfun endif +" --------------------------------------------------------------------- +" NetSort: Piet Delport's BISort2() function, modified to take a range +fun! <SID>NetSort() range + let i = a:firstline + 1 + while i <= a:lastline + " find insertion point via binary search + let i_val = getline(i) + let lo = a:firstline + let hi = i + while lo < hi + let mid = (lo + hi) / 2 + let mid_val = getline(mid) + if i_val < mid_val + let hi = mid + else + let lo = mid + 1 + if i_val == mid_val | break | endif + endif + endwhile + " do insert + if lo < i + exec i.'d_' + call append(lo - 1, i_val) + endif + let i = i + 1 + endwhile +endfun + " ------------------------------------------------------------------------ " Restore {{{1 let &cpo= s:save_cpo diff --git a/runtime/syntax/netrwlist.vim b/runtime/syntax/netrwlist.vim new file mode 100644 index 000000000..09967f514 --- /dev/null +++ b/runtime/syntax/netrwlist.vim @@ -0,0 +1,29 @@ +" Language : Netrw Remote-Directory Listing Syntax +" Maintainer : Charles E. Campbell, Jr. +" Last change: Jun 10, 2004 +" Version : 1 + +" Syntax Clearing: {{{1 +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Directory List Syntax Highlighting: {{{1 +syn match netrwDir "^.*/$" contains=netrwSpecial +syn match netrwSpecial "[*=@|/]$" +syn match netrwSlash contained "/" +syn match netrwComment '".*$' + +" Highlighting Links: {{{1 +if !exists("did_drchip_dbg_syntax") + let did_drchip_netrwlist_syntax= 1 + hi link netrwComment Comment + hi link netrwDir Directory + hi link netrwSpecial Function +endif + +" Current Syntax: {{{1 +let b:current_syntax = "netrwlist" +" vim: ts=8 fdm=marker diff --git a/runtime/syntax/po.vim b/runtime/syntax/po.vim index 6da75d630..4c1aac12e 100644 --- a/runtime/syntax/po.vim +++ b/runtime/syntax/po.vim @@ -19,6 +19,8 @@ syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\| syn match poFormat "%%" contained syn region poString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=poSpecial,poFormat +syn region poFuzzy start=+^#,\sfuzzy+ end=+^$+ +syn match poUntranslated +^msgstr\s""\n\n+ " Define the default highlighting. " For version 5.7 and earlier: only when not done already @@ -37,6 +39,8 @@ if version >= 508 || !exists("did_po_syn_inits") HiLink poSpecial Special HiLink poFormat poSpecial HiLink poString String + HiLink poFuzzy Todo + HiLink poUntranslated Todo delcommand HiLink endif |