diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-12-29 20:58:21 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-12-29 20:58:21 +0000 |
commit | 81695250ef1bbc02016078044ac268129a33f333 (patch) | |
tree | c31ec7182b5b06ffeb5a14b79701127eaa5c0dc8 /runtime | |
parent | 86b68359978c933419279e599d0a8cf536095d77 (diff) | |
download | vim-git-81695250ef1bbc02016078044ac268129a33f333.tar.gz |
updated for version 7.0026
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/change.txt | 17 | ||||
-rw-r--r-- | runtime/doc/editing.txt | 16 | ||||
-rw-r--r-- | runtime/doc/fold.txt | 6 | ||||
-rw-r--r-- | runtime/doc/gui.txt | 5 | ||||
-rw-r--r-- | runtime/doc/gui_x11.txt | 5 | ||||
-rw-r--r-- | runtime/doc/index.txt | 4 | ||||
-rw-r--r-- | runtime/doc/map.txt | 12 | ||||
-rw-r--r-- | runtime/doc/motion.txt | 6 | ||||
-rw-r--r-- | runtime/doc/pi_expl.txt | 8 | ||||
-rw-r--r-- | runtime/doc/tags | 6 | ||||
-rw-r--r-- | runtime/doc/usr_40.txt | 5 | ||||
-rw-r--r-- | runtime/doc/visual.txt | 11 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 4 | ||||
-rw-r--r-- | runtime/indent/php.vim | 28 | ||||
-rw-r--r-- | runtime/lang/menu_zh.big5.vim | 2 | ||||
-rw-r--r-- | runtime/lang/menu_zh_tw.big5.vim | 2 | ||||
-rw-r--r-- | runtime/plugin/netrw.vim | 113 |
17 files changed, 112 insertions, 138 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 4ed7200ff..77347fbb4 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 Dec 24 +*change.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -985,10 +985,11 @@ Vim fills this register with text deleted with the "d", "c", "s", "x" commands or copied with the yank "y" command, regardless of whether or not a specific register was used (e.g. "xdd). This is like the unnamed register is pointing to the last used register. An exception is the '_' register: "_dd does not -store the deleted text in any register. Vim uses the contents of this -register for any put command (p or P) which does not specify a register. -Additionally you can access it with the name '"'. This means you have to type -two double quotes. Writing to the "" register writes to register "0. +store the deleted text in any register. +Vim uses the contents of the unnamed register for any put command (p or P) +which does not specify a register. Additionally you can access it with the +name '"'. This means you have to type two double quotes. Writing to the "" +register writes to register "0. {Vi: register contents are lost when changing files, no '"'} 2. Numbered registers "0 to "9 *quote_number* *quote0* *quote1* @@ -999,9 +1000,9 @@ unless the command specified another register with ["x]. Numbered register 1 contains the text deleted by the most recent delete or change command, unless the command specified another register or the text is less than one line (the small delete register is used then). An exception is -made for these commands: |%|, |(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|. -Register "1 is always used then (this is Vi compatible). The "- register is -used as well if the delete is within a line. +made for the delete operator with these movement commands: |%|, |(|, |)|, |`|, +|/|, |?|, |n|, |N|, |{| and |}|. Register "1 is always used then (this is Vi +compatible). The "- register is used as well if the delete is within a line. With each successive deletion or change, Vim shifts the previous contents of register 1 into register 2, 2 into 3, and so forth, losing the previous contents of register 9. diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 753e2ac23..1921fbc66 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 Dec 16 +*editing.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -46,7 +46,7 @@ However, the alternate file name is not changed when |:keepalt| is used. name. {not in Vi} All file names are remembered in the buffer list. When you enter a file name, -for editing (e.g., with ":e filename") or writing (e.g., with (:w file name"), +for editing (e.g., with ":e filename") or writing (e.g., with ":w file name"), the file name is added to the list. You can use the buffer list to remember which files you edited and to quickly switch from one file to another (e.g., to copy text) with the |CTRL-^| command. First type the number of the file @@ -57,7 +57,7 @@ CTRL-G or *CTRL-G* *:f* *:fi* *:file* :f[ile] Prints the current file name (as typed), the cursor position (unless the 'ruler' option is set), and the file status (readonly, modified, read errors, - new file)). See the 'shortmess' option about how tho + new file). See the 'shortmess' option about how tho make this message shorter. {Vi does not include column number} @@ -111,7 +111,7 @@ string, it is often displayed with HOME replaced with "~". This was done to keep file names short. When reading or writing files the full name is still used, the "~" is only used when displaying file names. When replacing the file name would result in just "~", "~/" is used instead (to avoid confusion -with 'backupext' set to "~"). +between options set to $HOME with 'backupext' set to "~"). When writing the buffer, the default is to use the current file name. Thus when you give the "ZZ" or ":wq" command, the original file will be @@ -260,12 +260,12 @@ If you want to keep the changed buffer without saving it, switch on the *:vi* *:visual* :vi[sual][!] [++opt] [+cmd] [file] - When entered in Ex mode: Leave |Ex-mode|, go back to + When used in Ex mode: Leave |Ex-mode|, go back to Normal mode. Otherwise same as |:edit|. *:vie* *:view* :vie[w] [++opt] [+cmd] file - When entered in Ex mode: Leave Ex mode, go back to + When used in Ex mode: Leave |Ex mode|, go back to Normal mode. Otherwise same as |:edit|, but set 'readonly' option for this buffer. {not in Vi} @@ -666,7 +666,7 @@ list of the current window. in Vi} :[count]wN[ext][!] [++opt] [+cmd] [file] *:wN* *:wNext* -:[count]wp[revous][!] [++opt] [+cmd] [file] *:wp* *:wprevious* +:[count]wp[revious][!] [++opt] [+cmd] [file] *:wp* *:wprevious* Same as :wnext, but go to previous file instead of next. {not in Vi} @@ -1402,7 +1402,7 @@ options. There are three different types of searching: '**' is more sophisticated: - It ONLY matches directories. - - It matches up to 30 directories deep, so you can use it to search an + - It matches up to 30 directories deep, so you can use it to search an entire directory tree - The maximum number of levels matched can be given by appending a number to '**'. diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 66444395d..2aadd766d 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -1,4 +1,4 @@ -*fold.txt* For Vim version 7.0aa. Last change: 2004 Oct 15 +*fold.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -279,7 +279,7 @@ zF Create a fold for N lines. Works like "zf". Create a fold for the lines in {range}. Works like "zf". *zd* *E351* -zd Delete one fold at the cursor. When the cursor is on folded +zd Delete one fold at the cursor. When the cursor is on a folded line, that fold is deleted. Nested folds are moved one level up. In Visual mode all folds (partially) in the selected area are deleted. Careful: This easily deletes more folds than you @@ -457,7 +457,7 @@ FOLDLEVEL *fold-foldlevel* 'foldlevel' is a number option: The higher the more folded regions are open. When 'foldlevel' is 0, all folds are closed. -When 'foldlevel' is positive, some folds closed. +When 'foldlevel' is positive, some folds are closed. When 'foldlevel' is very high, all folds are open. 'foldlevel' is applied when it is changed. After that manually folds can be opened and closed. diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index b83acd6c2..a7da5e0a0 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -1,4 +1,4 @@ -*gui.txt* For Vim version 7.0aa. Last change: 2004 Jun 15 +*gui.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -52,7 +52,8 @@ When the GUI starts up initializations are carried out, in this order: :let bmenu_max_pathlen = 50 - If the "-U {gvimrc}" command-line option has been used when starting Vim, the {gvimrc} file will be read for initializations. The following - initializations are skipped. + initializations are skipped. When {gvimrc} is "NONE" no file will be read + for initializations. - For Unix and MS-Windows, if the system gvimrc exists, it is sourced. The name of this file is normally "$VIM/gvimrc". You can check this with ":version". Also see |$VIM|. diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt index 8dee2a2bd..2cbc4c994 100644 --- a/runtime/doc/gui_x11.txt +++ b/runtime/doc/gui_x11.txt @@ -1,4 +1,4 @@ -*gui_x11.txt* For Vim version 7.0aa. Last change: 2004 Jul 02 +*gui_x11.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -437,6 +437,9 @@ command line argument). ============================================================================== 7. KDE version *gui-kde* *kde* *KDE* *KVim* +NOTE: The KDE version is still under development. It is not recommended for +daily work. + The KDE version of Vim works with KDE 2.x and KDE 3.x. KVim (name code for gui-kde) does not use traditional X settings for its configuration. diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index a0bc07b63..a973c598e 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 Dec 24 +*index.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -807,6 +807,7 @@ tag command note action in Visual mode ~ ------------------------------------------------------------------------------ |v_CTRL-\_CTRL-N| CTRL-\ CTRL-N stop Visual mode |v_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode' +|v_CTRL-C| CTRL-C stop Visual mode |v_CTRL-G| CTRL-G toggle between Visual mode and Select mode |v_<BS>| <BS> 2 Select mode: delete highlighted area |v_CTRL-H| CTRL-H 2 same as <BS> @@ -814,6 +815,7 @@ tag command note action in Visual mode ~ command |v_CTRL-V| CTRL-V make Visual mode blockwise or stop Visual mode +|v_<Esc>| <Esc> stop Visual mode |v_CTRL-]| CTRL-] jump to highlighted tag |v_!| !{filter} 2 filter the highlighted lines through the external command {filter} diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 8cd88549c..4921f1a79 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.0aa. Last change: 2004 Dec 09 +*map.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -613,7 +613,7 @@ Examples: ({CURSOR} is where you type a non-keyword character) > < "#i{CURSOR}" is expanded to "#include" ">#i{CURSOR}" is not expanded > - :ab ;; <endofline>" + :ab ;; <endofline> < "test;;" is not expanded "test ;;" is expanded to "test <endofline>" @@ -735,7 +735,7 @@ You see: ab esc ^V^V^[ how it should appear in your .exrc file, if you choose to go that route. The first ^V is there to quote the second ^V; the :ab command uses ^V as its own quote character, so you can include quoted - whitespace or the | character in the abbreviation. The :ab command + whitespace or the | character in the abbreviation. The :ab command doesn't do anything special with the ^[ character, so it doesn't need to be quoted. (Although quoting isn't harmful; that's why typing 7 [but not 8!] ^Vs works.) @@ -750,7 +750,7 @@ Stored as: esc ^V^[ Later, when the abbreviation is expanded because the user typed in the word "esc", the long form is subjected to the same type of ^V interpretation as keyboard input. So the ^V protects the ^[ - character from being interpreted as the "exit input-mode" character. + character from being interpreted as the "exit Insert mode" character. Instead, the ^[ is inserted into the text. Expands to: ^[ @@ -778,7 +778,7 @@ make it local to the script. But when a mapping is executed from outside of the script, it doesn't know in which script the function was defined. To avoid this problem, use "<SID>" instead of "s:". The same translation is done as for mappings. This makes it possible to define a call to the function in -mapping. +a mapping. When a local function is executed, it runs in the context of the script it was defined in. This means that new functions and mappings it defines can also @@ -1054,7 +1054,7 @@ Examples > Replace <line1>-pu_|<line1>,<line2>d|r <args>|<line1>d " Count the number of lines in the range - :com! -range -nargs=0 Lines :echo <line2> - <line1> + 1 "lines" + :com! -range -nargs=0 Lines echo <line2> - <line1> + 1 "lines" " Call a user function (example of <f-args>) :com -nargs=* Mycmd call Myfunc(<f-args>) diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 4f9405fef..d7f6cbc40 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 Nov 23 +*motion.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -831,8 +831,8 @@ was made yet in the current file. *'^* *`^* '^ `^ To the position where the cursor was the last time - when Insert mode was stopped This is used by the |gi| - command. Not set when the |:keepjumps| command + when Insert mode was stopped. This is used by the + |gi| command. Not set when the |:keepjumps| command modifier was used. {not in Vi} *'.* *`.* diff --git a/runtime/doc/pi_expl.txt b/runtime/doc/pi_expl.txt index 4c962ffc8..62ee2c396 100644 --- a/runtime/doc/pi_expl.txt +++ b/runtime/doc/pi_expl.txt @@ -1,4 +1,4 @@ -*pi_expl.txt* For Vim version 7.0aa. Last change: 2002 Nov 08 +*pi_expl.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by M A Aziz Ahmed @@ -65,7 +65,7 @@ splitting horizontally, use the variable: > The default for this is the setting of splitbelow at the time the plugin is loaded. -To control where the windows goes relative to the explorer window when +To control where the window goes relative to the explorer window when splitting vertically, use the variable: > let g:explSplitRight=1 " Put new window to the right of the explorer let g:explSplitRight=0 " Put new window to the left of the explorer @@ -77,14 +77,14 @@ To use a different split method for the explorer window, use: > " current window let g:explStartRight=0 " Put new explorer window to the left of the " current window -The default for this set to g:explSplitRight at the time the plugin is loaded. +The default is the value of g:explSplitRight at the time the plugin is loaded. To use a different split method for the explorer window, use: > let g:explStartBelow=1 " Put new explorer window below the " current window let g:explStartBelow=0 " Put new explorer window above the " current window -The default for this set to g:explSplitBelow at the time the plugin is loaded. +The default is the value of g:explSplitBelow at the time the plugin is loaded. The start splits allow for the explorer window to be placed in a file browser type arrangement, where the directories are shown on the left and the contents diff --git a/runtime/doc/tags b/runtime/doc/tags index 51755a18b..1f6cefb0a 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2520,6 +2520,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :vi editing.txt /*:vi* :vie editing.txt /*:vie* :view editing.txt /*:view* +:vim quickfix.txt /*:vim* +:vimgrep quickfix.txt /*:vimgrep* +:vimgrepa quickfix.txt /*:vimgrepa* +:vimgrepadd quickfix.txt /*:vimgrepadd* :visual editing.txt /*:visual* :visual_example visual.txt /*:visual_example* :viu various.txt /*:viu* @@ -4951,7 +4955,6 @@ hebrew hebrew.txt /*hebrew* hebrew.txt hebrew.txt /*hebrew.txt* help various.txt /*help* help-context help.txt /*help-context* -help-tags tags 1 help-translated various.txt /*help-translated* help-xterm-window various.txt /*help-xterm-window* help.txt help.txt /*help.txt* @@ -5601,6 +5604,7 @@ new-user-manual version6.txt /*new-user-manual* new-utf-8 version6.txt /*new-utf-8* new-vertsplit version6.txt /*new-vertsplit* new-vim-server version6.txt /*new-vim-server* +new-vimgrep version7.txt /*new-vimgrep* new-virtedit version6.txt /*new-virtedit* news intro.txt /*news* nextnonblank() eval.txt /*nextnonblank()* diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt index 90664163e..afc3696ae 100644 --- a/runtime/doc/usr_40.txt +++ b/runtime/doc/usr_40.txt @@ -1,4 +1,4 @@ -*usr_40.txt* For Vim version 7.0aa. Last change: 2004 Feb 13 +*usr_40.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM USER MANUAL - by Bram Moolenaar @@ -60,7 +60,8 @@ It looks a lot like the mapping for <F2> in Normal mode, only the start is different. The <F2> mapping for Normal mode is still there. Thus you can map the same key differently for each mode. Notice that, although this mapping starts in Insert mode, it ends in Normal -mode. If you want it to continue in Insert mode, append a "a" to the mapping. +mode. If you want it to continue in Insert mode, append an "a" to the +mapping. Here is an overview of map commands and in which mode they work: diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 410057838..0ff9dfe1b 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -1,4 +1,4 @@ -*visual.txt* For Vim version 7.0aa. Last change: 2004 Jun 08 +*visual.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -46,7 +46,7 @@ However, when the 'selection' option is set to "exclusive" and the cursor is after the Visual area, the character under the cursor is not included. With "v" the text before the start position and after the end position will -not be highlighted. However, All uppercase and non-alpha operators, except +not be highlighted. However, all uppercase and non-alpha operators, except "~" and "U", will work on whole lines anyway. See the list of operators below. @@ -139,6 +139,9 @@ extended to the rightmost column of the longest line. If you want to highlight exactly the same area as the last time, you can use "gv" |gv| |v_gv|. + *v_<Esc>* +<Esc> In Visual mode: Stop Visual mode. + *v_CTRL-C* CTRL-C In Visual mode: Stop Visual mode. When insert mode is pending (the mode message shows @@ -176,7 +179,7 @@ When switching to another window on the same buffer, the cursor position in that window is adjusted, so that the same Visual area is still selected. This is especially useful to view the start of the Visual area in one window, and the end in another. You can then use <RightMouse> (or <S-LeftMouse> when -'mousemodel' is "popup") to move either end of the Visual area. +'mousemodel' is "popup") to drag either end of the Visual area. ============================================================================== 4. Operating on the Visual area *visual-operators* @@ -362,7 +365,7 @@ Note that special characters (like '.' and '*') will cause problems. Visual-block Examples *blockwise-examples* With the following text, I will indicate the commands to produce the block and the results below. In all cases, the cursor begins on the 'a' in the first -line if the test text. +line of the test text. The following modeline settings are assumed ":ts=8:sw=4:". It will be helpful to diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 130b0f52c..4ba6d4a26 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 7.0aa. Last change: 2004 Dec 21 +*windows.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -877,7 +877,7 @@ list of buffers. |unlisted-buffer| 1 #h "/test/text" line 1 ~ 2u "asdf" line 0 ~ - 3 %l+ "version.c" line 1 ~ + 3 %a+ "version.c" line 1 ~ When the [!] is included the list will show unlisted buffers (the term "unlisted" is a bit confusing then...). diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim index 208df3ab0..cda861e28 100644 --- a/runtime/indent/php.vim +++ b/runtime/indent/php.vim @@ -3,7 +3,7 @@ " Author: Miles Lott <milos@groupwhere.org> " URL: http://milosch.dyndns.org/php.vim " Last Change: 2004 May 18 -" Version: 0.5 +" Version: 0.4 " Notes: Close all switches with default:\nbreak; and it will look better. " Also, open and close brackets should be alone on a line. " This is my preference, and the only way this will look nice. @@ -11,9 +11,7 @@ " switch/case. It is nearly perfect for anyone regardless of your " stance on brackets. " -" Changes: 0.5 - fix duplicate indent on open tag, and empty bracketed -" statements. -" 0.4 - Fixes for closing php tag, switch statement closure, and php_indent_shortopentags +" Changes: Fixes for closing php tag, switch statement closure, and php_indent_shortopentags " option from Steffen Bruentjen <vim@kontraphon.de> " " Options: php_noindent_switch=1 -- do not try to indent switch/case statements (version 0.1 behavior) @@ -51,16 +49,16 @@ function GetPhpIndent() let pline = getline(lnum - 1) " previous to last line let ind = indent(lnum) - " Indent after php open tag + " Indent after php open tags if line =~ '<?php' let ind = ind + &sw - elseif exists('g:php_indent_shortopentags') - " indent after short open tag + " indent after short open tags + endif + if exists('g:php_indent_shortopentags') if line =~ '<?' let ind = ind + &sw endif endif - " indent after php closing tag if cline =~ '\M?>' let ind = ind - &sw endif @@ -74,17 +72,7 @@ function GetPhpIndent() let ind = ind - &sw endif return ind - else - " Search the matching bracket (with searchpair()) and set the indent of - " to the indent of the matching line. - if cline =~ '^\s*}' - call cursor(line('.'), 1) - let ind = indent(searchpair('{', '', '}', - 'bW', 'synIDattr(synID(line("."), col("."), - 0), "name") =~? "string"')) - return ind - endif - " Try to indent switch/case statements as well + else " Try to indent switch/case statements as well " Indent blocks enclosed by {} or () or case statements, with some anal requirements if line =~ 'case.*:\|[{(]\s*\(#[^)}]*\)\=$' let ind = ind + &sw @@ -104,7 +92,7 @@ function GetPhpIndent() " Search the matching bracket (with searchpair()) and set the indent of cline " to the indent of the matching line. if cline =~ '^\s*}' - call cursor(line('. '), 1) + call cursor(line('.'), 1) let ind = indent(searchpair('{', '', '}', 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"')) return ind endif diff --git a/runtime/lang/menu_zh.big5.vim b/runtime/lang/menu_zh.big5.vim index b07d8ef5f..081015918 100644 --- a/runtime/lang/menu_zh.big5.vim +++ b/runtime/lang/menu_zh.big5.vim @@ -1 +1 @@ -source <sfile>:p:h/menu_chinese(taiwan)_taiwan.950.vim +source <sfile>:p:h/menu_chinese_taiwan.950.vim diff --git a/runtime/lang/menu_zh_tw.big5.vim b/runtime/lang/menu_zh_tw.big5.vim index b07d8ef5f..081015918 100644 --- a/runtime/lang/menu_zh_tw.big5.vim +++ b/runtime/lang/menu_zh_tw.big5.vim @@ -1 +1 @@ -source <sfile>:p:h/menu_chinese(taiwan)_taiwan.950.vim +source <sfile>:p:h/menu_chinese_taiwan.950.vim diff --git a/runtime/plugin/netrw.vim b/runtime/plugin/netrw.vim index e4868a3d7..0653aabc2 100644 --- a/runtime/plugin/netrw.vim +++ b/runtime/plugin/netrw.vim @@ -1,7 +1,7 @@ " netrw.vim: Handles file transfer and remote directory listing across a network -" last change: Dec 06, 2004 +" last change: Dec 29, 2004 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> -" Version: 53 +" Version: 54 " License: Vim License (see vim's :help license) " " But be doers of the Word, and not only hearers, deluding your own selves @@ -14,7 +14,7 @@ if exists("g:loaded_netrw") || &cp finish endif -let g:loaded_netrw = "v53" +let g:loaded_netrw = "v54" let s:save_cpo = &cpo let loaded_explorer = 1 set cpo&vim @@ -228,9 +228,9 @@ if version >= 600 au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".expand("<afile>")|exe 'e /'.substitute(expand("<afile>"),"file:/*","","")|exe "silent doau BufReadPost ".expand("<afile>") endif au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread 0r ".expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>") - au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread " .expand("<afile>")|exe "silent doau BufReadPost ".expand("<afile>") + au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<afile>")|exe "Nread " .expand("<afile>")|exe "silent doau FileReadPost ".expand("<afile>") au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<afile>")|exe "Nwrite " .expand("<afile>")|exe "silent doau BufWritePost ".expand("<afile>") - au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<afile>")|exe "'[,']Nwrite " .expand("<afile>")|exe "silent doau BufWritePost ".expand("<afile>") + au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<afile>")|exe "'[,']Nwrite " .expand("<afile>")|exe "silent doau FileWritePost ".expand("<afile>") augroup END endif @@ -262,15 +262,21 @@ endfun fun! <SID>NetRestorePosn() " call Dfunc("NetRestorePosn() winnr=".s:netrw_winnr." line=".s:netrw_line." col=".s:netrw_col." hline=".s:netrw_hline) + " restore window +" call Decho("restore window: exe silent! ".s:netrw_winnr."wincmd w") exe "silent! ".s:netrw_winnr."wincmd w" if v:shell_error == 0 " as suggested by Bram M: redraw on no error " allows protocol error messages to remain visible redraw! endif + " restore top-of-screen line +" call Decho("restore topofscreen: exe norm! ".s:netrw_hline."G0z") exe "norm! ".s:netrw_hline."G0z\<CR>" + " restore position +" call Decho("restore posn: exe norm! ".s:netrw_line."G0".s:netrw_col."|") exe "norm! ".s:netrw_line."G0".s:netrw_col."\<bar>" " call Dret("NetRestorePosn") @@ -670,77 +676,40 @@ fun! s:NetGetFile(readcmd, fname, method) " call Decho("(copied) fname<".fname.">") endif - " get the file, but disable undo when reading a new buffer if a:readcmd[0] == '0' - let use_e_cmd = 0 " 1 when using ':edit' - let delline = 0 " 1 when have to delete empty last line - if line("$") == 1 && getline(1) == "" - " Now being asked to 0r a file into an empty file. - " Safe to :e it instead, unless there is another window on the same buffer. - let curbufnr = bufnr("%") - let use_e_cmd = 1 - let delline = 1 - " Loop over all windows, - " reset use_e_cmd when another one is editing the current buffer. - let i = 1 - while 1 - if i != winnr() && winbufnr(i) == curbufnr - let use_e_cmd = 0 - break - endif - let i = i + 1 - if winbufnr(i) < 0 - break - endif - endwhile - endif - - if use_e_cmd > 0 - " ':edit' the temp file, wipe out the old buffer and rename the buffer - let curfilename = expand("%") - - let binlocal = &l:bin - let binglobal = &g:bin - if binlocal - setglobal bin " Need to set 'bin' globally for ":e" command. - endif - silent exe "e! ".v:cmdarg." ".fname - if binlocal && !binglobal - setglobal nobin - setlocal bin - endif - - exe curbufnr . "bwipe!" - exe "f ".escape(curfilename," ") - " the ":f newname" apparently leaves the temporary file as the alternate - " file in the buffer list (see :ls!). The following command wipes it out. - exe bufnr("#")."bwipe!" - else - let oldul= &ul - setlocal ul=-1 - exe a:readcmd." ".v:cmdarg." ".escape(fname," ") - if delline > 0 - " wipe out last line, which should be a blank line anyway - $del - endif - let &ul= oldul - endif + " get file into buffer + " record remote filename + let rfile= bufname("%") +" call Decho("edit remotefile<".rfile.">") + " rename the current buffer to the temp file (ie. fname) + exe "keepalt file ".fname + " edit temporary file + e + " rename buffer back to remote filename + exe "keepalt file ".rfile + " wipe out the buffer with the temp file name + exe "bwipe ".fname + let line1 = 1 + let line2 = line("$") + elseif filereadable(fname) -" call Decho("exe<".a:readcmd." ".v:cmdarg." ".fname.">") + " read file after current line + let curline = line(".") + let lastline= line("$") +" call Decho("exe<".a:readcmd." ".v:cmdarg." ".fname."> line#".curline) exe a:readcmd." ".v:cmdarg." ".fname + let line1 = curline + 1 + let line2 = line("$") - lastline + 1 + let s:netrw_line = s:netrw_line + 1 + let s:netrw_col = 1 else -" call Dret("NetGetFile") + " not readable +" call Dret("NetGetFile : fname<".fname."> not readable") return endif " User-provided (ie. optional) fix-it-up command if exists("*NetReadFixup") - let line1= line(".") - if a:readcmd == "r" - let line2= line("$") - line2 + line1 - else - let line2= line("$") - line2 - endif " call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")") call NetReadFixup(a:method, line1, line2) endif @@ -2604,7 +2573,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname " 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',"") + let g:netrw_port = substitute(a:choice,scpurm,'\2',"") let b:netrw_fname = substitute(a:choice,scpurm,'\3',"") " http://user@hostname/...path-to-file @@ -2639,9 +2608,6 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"") - if g:netrw_port != "" - let g:netrw_port = substitute(g:netrw_port,"[#:]","","") - endif if userid != "" let g:netrw_uid= userid endif @@ -2725,6 +2691,11 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname endif let b:netrw_method = -1 endif + + " remove any leading [:#] from port number + if g:netrw_port != "" + let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','') + endif " call Decho("a:choice <".a:choice.">") " call Decho("b:netrw_method <".b:netrw_method.">") |