diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-08-12 19:59:19 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-08-12 19:59:19 +0000 |
commit | 90cfdbe040320952e6b542d0633987f082b0f158 (patch) | |
tree | 2063faaaf71645ca7c2cb575ca612e3b664fa988 | |
parent | e5b8e3d3c6139c53c8aea63471e7d0285ab748e0 (diff) |
updated for version 7.0129v7.0129
-rw-r--r-- | runtime/doc/options.txt | 9 | ||||
-rw-r--r-- | runtime/doc/pi_netrw.txt | 108 | ||||
-rw-r--r-- | runtime/doc/spell.txt | 20 | ||||
-rw-r--r-- | runtime/doc/tags | 55 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 7 | ||||
-rw-r--r-- | runtime/doc/version7.txt | 8 | ||||
-rw-r--r-- | runtime/plugin/netrw.vim | 60 | ||||
-rw-r--r-- | src/digraph.c | 4 | ||||
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/ex_cmds2.c | 6 | ||||
-rw-r--r-- | src/ex_getln.c | 16 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/ops.c | 9 | ||||
-rw-r--r-- | src/option.c | 59 | ||||
-rw-r--r-- | src/po/it.po | 2 | ||||
-rw-r--r-- | src/proto/ex_cmds2.pro | 2 | ||||
-rw-r--r-- | src/syntax.c | 6 | ||||
-rw-r--r-- | src/version.h | 4 |
18 files changed, 277 insertions, 102 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 70bdb87daf..d15d454a67 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.0aa. Last change: 2005 Aug 11 +*options.txt* For Vim version 7.0aa. Last change: 2005 Aug 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5701,6 +5701,8 @@ A jump table for the options with a short description can be found at |Q_op|. Only used when 'spell' is set. Be careful with special characters, see |option-backslash| about including spaces and backslashes. + To set this option automatically depending on the language, see + |set-spc-auto|. *'spellfile'* *'spf'* 'spellfile' 'spf' string (default empty) @@ -5757,6 +5759,11 @@ A jump table for the options with a short description can be found at |Q_op|. files twice. How the related spell files are found is explained here: |spell-load|. + After this option has been set successfully, Vim will source the files + "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang' + up to the first comma, dot or underscore. See |set-spc-auto|. + + *'spellsuggest'* *'sps'* 'spellsuggest' 'sps' string (default "best") global diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 435d51b009..4cc59c3e92 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 7.0. Last change: Aug 09, 2005 +*pi_netrw.txt* For Vim version 7.0. Last change: Aug 11, 2005 VIM REFERENCE MANUAL by Charles E. Campbell, Jr. @@ -80,19 +80,19 @@ in your <.vimrc> file: > want it ignored, then set this variable as shown. Its mere existence is enough to cause <.netrc> to be ignored. - Controlling External Applications + Controlling External Applications *netrw-externapp* 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" + 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 *netrw-read* *netrw-nread* :Nread ? give help @@ -136,31 +136,41 @@ in your <.vimrc> file: > :call NetUserPass("uid","password") -- sets global uid and password VARIABLES *netrw-variables* - b:netrw_lastfile last file Network-read/written retained on + *b:netrw_lastfile* + last file Network-read/written retained on a per-buffer basis (supports plain :Nw ) - s:netrw_line during Nw/NetWrite, holds current line number - s:netrw_col during Nw/NetWrite, holds current column number + *s:netrw_line* + during :Nw/NetWrite, holds current line number + *s:netrw_col* + during :Nw/NetWrite, holds current column number s:netrw_line and s:netrw_col are used to restore the cursor position on writes - g:netrw_ftp if it doesn't exist, use default ftp + *g:netrw_ftp* + if it doesn't exist, use default ftp =0 use default ftp (uid password) =1 use alternate ftp method (user uid password) - g:netrw_ftpmode ="binary" (default) + *g:netrw_ftpmode* + ="binary" (default) ="ascii" - g:netrw_uid (ftp) user-id, retained on a per-session basis - g:netrw_passwd (ftp) password, retained on a per-session basis - g:netrw_win95ftp =1 if using Win95, will remove four trailing blank + *g:netrw_uid* + (ftp) user-id, retained on a per-session basis + *g:netrw_passwd* + (ftp) password, retained on a per-session basis + *g:netrw_win95ftp* + =1 if using Win95, will remove four trailing blank lines that o/s's ftp "provides" on transfers =0 force normal ftp behavior (no trailing line removal) - g:netrw_cygwin =1 assume scp under windows is from cygwin + *g:netrw_cygwin* + =1 assume scp under windows is from cygwin Also permits network browsing to use ls with time and size sorting (default if windows) =0 assume Windows' scp accepts windows-style paths Network browsing uses dir instead of ls This option is ignored if you're using unix - g:netrw_use_nt_rcp=0 don't use the rcp of WinNT, Win2000 and WinXP + *g:netrw_use_nt_rcp* + =0 don't use the rcp of WinNT, Win2000 and WinXP =1 use WinNT's rcp in binary mode (default) PATHS *netrw-path* @@ -620,17 +630,17 @@ NETRW BROWSER VARIABLES *netrw-browse-var* --- ----------- Var Explanation --- ----------- -< g:netrw_alto change from above splitting to +< *g:netrw_alto* change from above splitting to below splitting by setting this variable (see |netrw-o|) default: =0 - g:netrw_altv change from left splitting to + *g:netrw_altv* change from left splitting to right splitting by setting this variable (see |netrw-v|) default: =0 - g:netrw_ftp_browse_reject ftp can produce a number of errors + *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings that can show up as "directories" and "files" in the listing. This pattern is used to @@ -644,7 +654,7 @@ NETRW BROWSER VARIABLES *netrw-browse-var* : connect to address [0-9a-fA-F:]* : No route to host$' - g:netrw_ssh_browse_reject ssh can sometimes produce unwanted + *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines/messages/banners/and whatnot that one doesn't want masquerading as "directories" and "files". Use @@ -652,71 +662,71 @@ NETRW BROWSER VARIABLES *netrw-browse-var* messages. By default its value is: '^total\s\+\d\+$' - g:netrw_keepdir =1 (default) keep current directory + *g:netrw_keepdir* =1 (default) keep current directory immune from the browsing directory. =0 keep the current directory the same as the browsing directory. The browsing directory is contained in b:netrw_curdir - g:netrw_list_cmd command for listing remote directories + *g:netrw_list_cmd* command for listing remote directories default: (if ssh is executable) "ssh HOSTNAME ls -FLa" - g:netrw_longlist if =1, then long listing will be default + *g:netrw_longlist* if =1, then long listing will be default - g:netrw_ftp_list_cmd options for passing along to ftp for + *g:netrw_ftp_list_cmd* options for passing along to ftp for directory listing. Defaults: unix or g:netrw_cygwin set: : "ls -lF" otherwise "dir" - g:netrw_list_hide comma separated list of patterns for + *g:netrw_list_hide* comma separated list of patterns for hiding files default: "" - g:netrw_local_mkdir command for making a local directory + *g:netrw_local_mkdir* command for making a local directory default: "ssh HOSTNAME mkdir" - g:netrw_local_rmdir remove directory command (rmdir) + *g:netrw_local_rmdir* remove directory command (rmdir) default: "rmdir" - g:netrw_maxfilenamelen =32 by default, selected so as to make + *g:netrw_maxfilenamelen* =32 by default, selected so as to make long listings fit on 80 column displays. If your screen is wider, and you have file/directory names longer than 32 bytes, you may set this option to keep listings columnar. - g:netrw_mkdir_cmd command for making a remote directory + *g:netrw_mkdir_cmd* command for making a remote directory default: "ssh HOSTNAME mkdir" - g:netrw_rm_cmd command for removing files + *g:netrw_rm_cmd* command for removing files default: "ssh HOSTNAME rm" - g:netrw_rmdir_cmd command for removing directories + *g:netrw_rmdir_cmd* command for removing directories default: "ssh HOSTNAME rmdir" - g:netrw_rmf_cmd command for removing softlinks + *g:netrw_rmf_cmd* command for removing softlinks default: "ssh HOSTNAME rm -f" - g:netrw_hide if true, the hiding list is used + *g:netrw_hide* if true, the hiding list is used default: =0 - g:netrw_sort_by sort by "name", "time", or "size" + *g:netrw_sort_by* sort by "name", "time", or "size" default: "name" - g:netrw_sort_direction sorting direction: "normal" or "reverse" + *g:netrw_sort_direction* sorting direction: "normal" or "reverse" default: "normal" - g:netrw_sort_sequence when sorting by name, first sort by the + *g:netrw_sort_sequence* when sorting by name, first sort by the comma-separated pattern sequence default: '[\/]$,*,\.bak$,\.o$,\.h$, \.info$,\.swp$,\.obj$' - g:netrw_timefmt specify format string to strftime() (%c) + *g:netrw_timefmt* specify format string to strftime() (%c) default: "%c" - g:netrw_winsize specify initial size of new o/v windows + *g:netrw_winsize* specify initial size of new o/v windows default: "" INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro* @@ -815,7 +825,7 @@ GOING UP *netrw--* To go up a directory, press - or his the <cr> when atop the ../ directory entry in the listing. -Netrw will modify the command in *g:netrw_list_cmd* to perform the directory +Netrw will modify the command in |g:netrw_list_cmd| to perform the directory listing operation. By default the command is: ssh HOSTNAME ls -FLa @@ -862,20 +872,17 @@ succeeding. Netrw will ask for confirmation before doing the removal(s). You may select a range of lines with the "V" command (visual selection), and then pressing "D". - *g:netrw_rm_cmd* The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used to control the attempts to remove files and directories. The g:netrw_rm_cmd is used with files, and its default value is: g:netrw_rm_cmd: ssh HOSTNAME rm - *g:netrw_rmdir_cmd* The g:netrw_rmdir_cmd variable is used to support the removal of directories. Its default value is: g:netrw_rmdir_cmd: ssh HOSTNAME rmdir - *g:netrw_rmf_cmd* If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt to remove it again using the g:netrw_rmf_cmd variable. Its default value is: @@ -898,7 +905,7 @@ One may rename a block of files and directories by selecting them with the V (|linewise-visual|). -HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide* +HIDING FILES OR DIRECTORIES *g:netrw-a* Netrw's browsing facility allows one to use the hiding list in one of three ways: ignore it, hide files which match, and show only those files @@ -1188,6 +1195,11 @@ which is loaded automatically at startup (assuming :set nocp). ============================================================================== 10. History *netrw-history* + v61: * document upgrade -- netrw variable-based settings all should + have tags. Supports NetrwSettings command. + * several important variables are window-oriented. Netrw has + to transfer these across a window split. See s:BufWinVars() + and s:UseBufWinVars(). v60: * when using the i map to switch between long and short listings, netrw will now keep cursor on same line * "Match # of #" now uses status line diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index d76c66b806..7d8a51a338 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 11 +*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -155,7 +155,8 @@ and sorted. See |'spellsuggest'|. The 'spellcapcheck' option is used to check the first word of a sentence starts with a capital. This doesn't work for the first word in the file. When there is a line break right after a sentence the highlighting of the next -line may be postponed. Use |CTRL-L| when needed. +line may be postponed. Use |CTRL-L| when needed. Also see |set-spc-auto| for +how it can be set automatically when 'spelllang' is set. ============================================================================== 2. Remarks on spell checking *spell-remarks* @@ -319,6 +320,21 @@ find these functions useful: spellsuggest() get list of spelling suggestions soundfold() get the sound-a-like version of a word + +SETTING 'spellcapcheck' AUTOMATICALLY *set-spc-auto* + +After the 'spelllang' option has been set successfully, Vim will source the +files "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang' +up to the first comma, dot or underscore. This can be used to set options +specifically for the language, especially 'spellcapcheck'. + +The distribution includes a few of these files. Use this command to see what +they do: > + :next $VIMRUNTIME/spell/*.vim + +Note that the default scripts don't set 'spellcapcheck' if it was changed from +the default value. This assumes the user prefers another value then. + ============================================================================== 3. Generating a spell file *spell-mkspell* diff --git a/runtime/doc/tags b/runtime/doc/tags index 0cb5c8d749..13f307337a 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -1640,12 +1640,18 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :@ repeat.txt /*:@* :@: repeat.txt /*:@:* :@@ repeat.txt /*:@@* +:Explore pi_netrw.txt /*:Explore* +:Hexplore pi_netrw.txt /*:Hexplore* :Man filetype.txt /*:Man* :N editing.txt /*:N* +:Nexplore pi_netrw.txt /*:Nexplore* :Next editing.txt /*:Next* :P various.txt /*:P* +:Pexplore pi_netrw.txt /*:Pexplore* :Print various.txt /*:Print* +:Sexplore pi_netrw.txt /*:Sexplore* :TOhtml syntax.txt /*:TOhtml* +:Vexplore pi_netrw.txt /*:Vexplore* :X editing.txt /*:X* :\bar cmdline.txt /*:\\bar* :_! cmdline.txt /*:_!* @@ -4222,6 +4228,7 @@ a} motion.txt /*a}* b motion.txt /*b* b:changedtick-variable eval.txt /*b:changedtick-variable* b:current_syntax-variable syntax.txt /*b:current_syntax-variable* +b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile* b:var eval.txt /*b:var* backslash intro.txt /*backslash* backspace intro.txt /*backspace* @@ -4984,11 +4991,43 @@ g, motion.txt /*g,* g0 motion.txt /*g0* g8 various.txt /*g8* g:netrw-a pi_netrw.txt /*g:netrw-a* +g:netrw_alto pi_netrw.txt /*g:netrw_alto* +g:netrw_altv pi_netrw.txt /*g:netrw_altv* +g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin* +g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd* +g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd* +g:netrw_ftp pi_netrw.txt /*g:netrw_ftp* +g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject* +g:netrw_ftp_cmd pi_netrw.txt /*g:netrw_ftp_cmd* +g:netrw_ftp_list_cmd pi_netrw.txt /*g:netrw_ftp_list_cmd* +g:netrw_ftpmode pi_netrw.txt /*g:netrw_ftpmode* +g:netrw_hide pi_netrw.txt /*g:netrw_hide* +g:netrw_http_cmd pi_netrw.txt /*g:netrw_http_cmd* +g:netrw_keepdir pi_netrw.txt /*g:netrw_keepdir* g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd* g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide* +g:netrw_local_mkdir pi_netrw.txt /*g:netrw_local_mkdir* +g:netrw_local_rmdir pi_netrw.txt /*g:netrw_local_rmdir* +g:netrw_longlist pi_netrw.txt /*g:netrw_longlist* +g:netrw_maxfilenamelen pi_netrw.txt /*g:netrw_maxfilenamelen* +g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd* +g:netrw_passwd pi_netrw.txt /*g:netrw_passwd* +g:netrw_rcp_cmd pi_netrw.txt /*g:netrw_rcp_cmd* g:netrw_rm_cmd pi_netrw.txt /*g:netrw_rm_cmd* g:netrw_rmdir_cmd pi_netrw.txt /*g:netrw_rmdir_cmd* g:netrw_rmf_cmd pi_netrw.txt /*g:netrw_rmf_cmd* +g:netrw_rsync_cmd pi_netrw.txt /*g:netrw_rsync_cmd* +g:netrw_scp_cmd pi_netrw.txt /*g:netrw_scp_cmd* +g:netrw_sftp_cmd pi_netrw.txt /*g:netrw_sftp_cmd* +g:netrw_sort_by pi_netrw.txt /*g:netrw_sort_by* +g:netrw_sort_direction pi_netrw.txt /*g:netrw_sort_direction* +g:netrw_sort_sequence pi_netrw.txt /*g:netrw_sort_sequence* +g:netrw_ssh_browse_reject pi_netrw.txt /*g:netrw_ssh_browse_reject* +g:netrw_timefmt pi_netrw.txt /*g:netrw_timefmt* +g:netrw_uid pi_netrw.txt /*g:netrw_uid* +g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp* +g:netrw_win95ftp pi_netrw.txt /*g:netrw_win95ftp* +g:netrw_winsize pi_netrw.txt /*g:netrw_winsize* g:var eval.txt /*g:var* g; motion.txt /*g;* g< message.txt /*g<* @@ -5762,6 +5801,7 @@ netrw-edithide pi_netrw.txt /*netrw-edithide* netrw-ex pi_netrw.txt /*netrw-ex* netrw-explore pi_netrw.txt /*netrw-explore* netrw-explore-cmds pi_netrw.txt /*netrw-explore-cmds* +netrw-externapp pi_netrw.txt /*netrw-externapp* netrw-file pi_netrw.txt /*netrw-file* netrw-fixup pi_netrw.txt /*netrw-fixup* netrw-ftp pi_netrw.txt /*netrw-ftp* @@ -5784,6 +5824,12 @@ netrw-nwrite pi_netrw.txt /*netrw-nwrite* netrw-o pi_netrw.txt /*netrw-o* netrw-options pi_netrw.txt /*netrw-options* netrw-p pi_netrw.txt /*netrw-p* +netrw-p1 pi_netrw.txt /*netrw-p1* +netrw-p2 pi_netrw.txt /*netrw-p2* +netrw-p3 pi_netrw.txt /*netrw-p3* +netrw-p4 pi_netrw.txt /*netrw-p4* +netrw-p5 pi_netrw.txt /*netrw-p5* +netrw-p6 pi_netrw.txt /*netrw-p6* netrw-passwd pi_netrw.txt /*netrw-passwd* netrw-path pi_netrw.txt /*netrw-path* netrw-pexplore pi_netrw.txt /*netrw-pexplore* @@ -6226,6 +6272,8 @@ s/\r change.txt /*s\/\\r* s/\t change.txt /*s\/\\t* s/\u change.txt /*s\/\\u* s/\~ change.txt /*s\/\\~* +s:netrw_col pi_netrw.txt /*s:netrw_col* +s:netrw_line pi_netrw.txt /*s:netrw_line* s:var eval.txt /*s:var* s<CR> change.txt /*s<CR>* sandbox eval.txt /*sandbox* @@ -6274,6 +6322,7 @@ serverlist() eval.txt /*serverlist()* servername-variable eval.txt /*servername-variable* session-file starting.txt /*session-file* set-option options.txt /*set-option* +set-spc-auto spell.txt /*set-spc-auto* setbufvar() eval.txt /*setbufvar()* setcmdpos() eval.txt /*setcmdpos()* setline() eval.txt /*setline()* @@ -6683,6 +6732,12 @@ terminal-info term.txt /*terminal-info* terminal-options term.txt /*terminal-options* terminfo term.txt /*terminfo* termresponse-variable eval.txt /*termresponse-variable* +tex-error syntax.txt /*tex-error* +tex-folding syntax.txt /*tex-folding* +tex-math syntax.txt /*tex-math* +tex-runon syntax.txt /*tex-runon* +tex-slow syntax.txt /*tex-slow* +tex-style syntax.txt /*tex-style* tex-syntax syntax.txt /*tex-syntax* tex.vim syntax.txt /*tex.vim* text-objects motion.txt /*text-objects* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 6776077ac2..8397b77af6 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 11 +*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,11 +30,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -Spell checking: default value for 'spellcapcheck' in spell file? -For Hebrew and Yiddish it should be empty. - -Using "@:" has two problems (Tim Chase, 2005 Aug 9) - Mac unicode patch (Da Woon Jung): - selecting proportional font breaks display - UTF-8 text causes display problems. Font replacement causes this. diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index d4fbb33ea8..12f5ddf687 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.0aa. Last change: 2005 Aug 11 +*version7.txt* For Vim version 7.0aa. Last change: 2005 Aug 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -761,6 +761,9 @@ could not contain ":". Now include the first ":" where the rest of the pattern matches. In the example a ":" not followed by a line number is included in the file name. (suggested by Emanuele Giaquinta) +For command-line completion the matches for various types of arguments are now +sorted: user commands, variables, syntax names, etc. + ============================================================================== COMPILE TIME CHANGES *compile-changes-7* @@ -848,7 +851,8 @@ When converting a string with a hex or octal number the leading '-' was ignored. ":echo '-05' + 0" resulted in 5 instead of -5. Using "@:" to repeat a command line didn't work when it contains control -characters. +characters. Also remove "'<,'>" when in Visual mode to avoid that it appears +twice. When using file completion for a user command, it would not expand environment variables like for a regular command with a file argument. diff --git a/runtime/plugin/netrw.vim b/runtime/plugin/netrw.vim index 0b7c616af6..85d7df7439 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: Aug 10, 2005 +" Last Change: Aug 12, 2005 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> -" Version: 60 +" Version: 61 " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. " Permission is hereby granted to use and distribute this code, @@ -22,7 +22,7 @@ if exists("g:loaded_netrw") || &cp finish endif -let g:loaded_netrw = "v60" +let g:loaded_netrw = "v61" if v:version < 700 let loaded_explorer = 1 endif @@ -1079,6 +1079,9 @@ fun! <SID>NetBrowse(dirname) return endif + " use buffer-oriented WinVars if buffer ones exist but window ones don't + call s:UseBufWinVars() + " make this buffer modifiable setlocal ma nonu nowrap @@ -1161,6 +1164,9 @@ fun! <SID>NetBrowse(dirname) exe "silent doau BufReadPost ".fname keepjumps 1d + " save certain window-oriented variables into buffer-oriented variables + call s:BufWinVars() + setlocal nonu nomod noma " call Dret("NetBrowse : file<".fname.">") @@ -1429,6 +1435,8 @@ endfun " NetGetWord: it gets the directory named under the cursor fun! <SID>NetGetWord() " call Dfunc("NetGetWord() line#".line(".")) + call s:UseBufWinVars() + if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt let dirname= "./" let curline= getline(".") @@ -2166,6 +2174,9 @@ fun! <SID>LocalBrowse(dirname) set noautochdir endif + " use buffer-oriented WinVars if buffer ones exist but window ones don't + call s:UseBufWinVars() + " find buffer number of buffer named precisely the same as a:dirname let bufnum= bufnr(a:dirname) " call Decho("findbuf: bufnum=".bufnum) @@ -2380,6 +2391,9 @@ fun! <SID>LocalBrowse(dirname) " record previous current directory let w:netrw_prvdir= b:netrw_curdir + " save certain window-oriented variables into buffer-oriented variables + call s:BufWinVars() + setlocal noma nomod nonu bh=hide nobl if has("netbeans_intg") || has("sun_workshop") let &autochdir= keep_autochdir @@ -3299,6 +3313,7 @@ fun! s:SaveWinVars() if exists("w:netrw_explore_mtchcnt")|let s:explore_mtchcnt = w:netrw_explore_mtchcnt|endif if exists("w:netrw_explore_bufnr") |let s:explore_bufnr = w:netrw_explore_bufnr |endif if exists("w:netrw_explore_line") |let s:explore_line = w:netrw_explore_line |endif + if exists("w:netrw_explore_list") |let s:explore_list = w:netrw_explore_list |endif " call Dret("SaveWinVars") endfun @@ -3314,9 +3329,48 @@ fun! s:CopyWinVars() if exists("s:explore_mtchcnt")|let w:netrw_explore_mtchcnt = s:explore_mtchcnt|unlet s:explore_mtchcnt|endif if exists("s:explore_bufnr") |let w:netrw_explore_bufnr = s:explore_bufnr |unlet s:explore_bufnr |endif if exists("s:explore_line") |let w:netrw_explore_line = s:explore_line |unlet s:explore_line |endif + if exists("s:explore_list") |let w:netrw_explore_list = s:explore_list |unlet s:explore_list |endif " call Dret("CopyWinVars") endfun +" --------------------------------------------------------------------- +" BufWinVars: (used by NetBrowse() and LocalBrowse()) {{{1 +" To allow separate windows to have their own activities, such as +" Explore **/pattern, several variables have been made window-oriented. +" However, when the user splits a browser window (ex: ctrl-w s), these +" variables are not inherited by the new window. BufWinVars() and +" UseBufWinVars() get around that. +fun! s:BufWinVars() +" call Dfunc("BufWinVars()") + if exists("w:netrw_bannercnt") |let b:netrw_bannercnt = w:netrw_bannercnt |endif + if exists("w:netrw_method") |let b:netrw_method = w:netrw_method |endif + if exists("w:netrw_prvdir") |let b:netrw_prvdir = w:netrw_prvdir |endif + if exists("w:netrw_explore_indx") |let b:netrw_explore_indx = w:netrw_explore_indx |endif + if exists("w:netrw_explore_listlen")|let b:netrw_explore_listlen = w:netrw_explore_listlen|endif + if exists("w:netrw_explore_mtchcnt")|let b:netrw_explore_mtchcnt = w:netrw_explore_mtchcnt|endif + if exists("w:netrw_explore_bufnr") |let b:netrw_explore_bufnr = w:netrw_explore_bufnr |endif + if exists("w:netrw_explore_line") |let b:netrw_explore_line = w:netrw_explore_line |endif + if exists("w:netrw_explore_list") |let b:netrw_explore_list = w:netrw_explore_list |endif +" call Dret("BufWinVars") +endfun + +" --------------------------------------------------------------------- +" UseBufWinVars: (used by NetBrowse() and LocalBrowse() {{{1 +" Matching function to BufferWinVars() +fun! s:UseBufWinVars() +" call Dfunc("UseBufWinVars()") + if exists("b:netrw_bannercnt") && !exists("w:netrw_bannercnt") |let w:netrw_bannercnt = b:netrw_bannercnt |endif + if exists("b:netrw_method") && !exists("w:netrw_method") |let w:netrw_method = b:netrw_method |endif + if exists("b:netrw_prvdir") && !exists("w:netrw_prvdir") |let w:netrw_prvdir = b:netrw_prvdir |endif + if exists("b:netrw_explore_indx") && !exists("w:netrw_explore_indx") |let w:netrw_explore_indx = b:netrw_explore_indx |endif + if exists("b:netrw_explore_listlen") && !exists("w:netrw_explore_listlen")|let w:netrw_explore_listlen = b:netrw_explore_listlen|endif + if exists("b:netrw_explore_mtchcnt") && !exists("w:netrw_explore_mtchcnt")|let w:netrw_explore_mtchcnt = b:netrw_explore_mtchcnt|endif + if exists("b:netrw_explore_bufnr") && !exists("w:netrw_explore_bufnr") |let w:netrw_explore_bufnr = b:netrw_explore_bufnr |endif + if exists("b:netrw_explore_line") && !exists("w:netrw_explore_line") |let w:netrw_explore_line = b:netrw_explore_line |endif + if exists("b:netrw_explore_list") && !exists("w:netrw_explore_list") |let w:netrw_explore_list = b:netrw_explore_list |endif +" call Dret("UseBufWinVars") +endfun + let &cpo= s:keepcpo unlet s:keepcpo " ------------------------------------------------------------------------ diff --git a/src/digraph.c b/src/digraph.c index 93a80a8b11..2f1bcda82d 100644 --- a/src/digraph.c +++ b/src/digraph.c @@ -2367,12 +2367,12 @@ keymap_init() # ifdef FEAT_MBYTE /* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */ sprintf((char *)buf, "keymap/%s_%s.vim", curbuf->b_p_keymap, p_enc); - if (cmd_runtime(buf, FALSE) == FAIL) + if (source_runtime(buf, FALSE) == FAIL) # endif { /* try finding "keymap/'keymap'.vim" in 'runtimepath' */ sprintf((char *)buf, "keymap/%s.vim", curbuf->b_p_keymap); - if (cmd_runtime(buf, FALSE) == FAIL) + if (source_runtime(buf, FALSE) == FAIL) { vim_free(buf); return (char_u *)N_("E544: Keymap file not found"); diff --git a/src/eval.c b/src/eval.c index 6b8d736ef1..cd706b49c1 100644 --- a/src/eval.c +++ b/src/eval.c @@ -17775,7 +17775,7 @@ script_autoload(name, reload) } /* Try loading the package from $VIMRUNTIME/autoload/<name>.vim */ - if (cmd_runtime(scriptname, FALSE) == OK) + if (source_runtime(scriptname, FALSE) == OK) ret = TRUE; } diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 861fa8186c..bd8d748e85 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -2391,7 +2391,7 @@ ex_compiler(eap) do_unlet((char_u *)"b:current_compiler", TRUE); sprintf((char *)buf, "compiler/%s.vim", eap->arg); - if (cmd_runtime(buf, TRUE) == FAIL) + if (source_runtime(buf, TRUE) == FAIL) EMSG2(_("E666: compiler not supported: %s"), eap->arg); vim_free(buf); @@ -2426,7 +2426,7 @@ ex_compiler(eap) ex_runtime(eap) exarg_T *eap; { - cmd_runtime(eap->arg, eap->forceit); + source_runtime(eap->arg, eap->forceit); } static void source_callback __ARGS((char_u *fname, void *cookie)); @@ -2447,7 +2447,7 @@ source_callback(fname, cookie) * return FAIL when no file could be sourced, OK otherwise. */ int -cmd_runtime(name, all) +source_runtime(name, all) char_u *name; int all; { diff --git a/src/ex_getln.c b/src/ex_getln.c index 3c5ad94c1d..5ba7d8b076 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4151,14 +4151,14 @@ ExpandGeneric(xp, regmatch, num_file, file, func) { int i; int count = 0; - int loop; + int round; char_u *str; /* do this loop twice: - * loop == 0: count the number of matching names - * loop == 1: copy the matching names into allocated memory + * round == 0: count the number of matching names + * round == 1: copy the matching names into allocated memory */ - for (loop = 0; loop <= 1; ++loop) + for (round = 0; round <= 1; ++round) { for (i = 0; ; ++i) { @@ -4170,7 +4170,7 @@ ExpandGeneric(xp, regmatch, num_file, file, func) if (vim_regexec(regmatch, str, (colnr_T)0)) { - if (loop) + if (round) { str = vim_strsave_escaped(str, (char_u *)" \t\\."); (*file)[count] = str; @@ -4187,7 +4187,7 @@ ExpandGeneric(xp, regmatch, num_file, file, func) ++count; } } - if (loop == 0) + if (round == 0) { if (count == 0) return OK; @@ -4201,6 +4201,10 @@ ExpandGeneric(xp, regmatch, num_file, file, func) count = 0; } } + + /* Sort the results. */ + sort_strings(*file, *num_file); + return OK; } diff --git a/src/main.c b/src/main.c index 380a572896..0067b1c2f7 100644 --- a/src/main.c +++ b/src/main.c @@ -550,7 +550,7 @@ main */ if (p_lpl) { - cmd_runtime((char_u *)"plugin/*.vim", TRUE); + source_runtime((char_u *)"plugin/*.vim", TRUE); TIME_MSG("loading plugins"); } #endif @@ -1160,7 +1160,14 @@ do_execreg(regname, colon, addcr) p = vim_strsave_escaped_ext(last_cmdline, (char_u *)"\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", Ctrl_V, FALSE); if (p != NULL) - retval = put_in_typebuf(p, TRUE); + { + /* When in Visual mode "'<,'>" will be prepended to the command. + * Remove it when it's already there. */ + if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0) + retval = put_in_typebuf(p + 5, TRUE); + else + retval = put_in_typebuf(p, TRUE); + } vim_free(p); } #endif diff --git a/src/option.c b/src/option.c index d1444fbf4f..67bcf5eee9 100644 --- a/src/option.c +++ b/src/option.c @@ -5793,25 +5793,6 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf, } #endif -#ifdef FEAT_AUTOCMD -# ifdef FEAT_SYN_HL - /* When 'syntax' is set, load the syntax of that name */ - else if (varp == &(curbuf->b_p_syn)) - { - apply_autocmds(EVENT_SYNTAX, curbuf->b_p_syn, - curbuf->b_fname, TR |