# HG changeset patch # User Bram Moolenaar # Date 1278860331 -7200 # Node ID eb7be7b075a6a5c3d795b257e6960cafb5256cbc # Parent b9bc9c5df131361205d9886e6a449ea2ec309b2e Support :browse for commands that use an error file argument. (Lech Lorens) diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1171,14 +1171,21 @@ If you want to always use ":confirm", se *:browse* *:bro* *E338* *E614* *E615* *E616* *E578* :bro[wse] {command} Open a file selection dialog for an argument to {command}. At present this works for |:e|, |:w|, - |:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc|, - |:mksession|, |:split|, |:vsplit|, and |:tabe|. + |:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|, + |:view|, |:sview|, |:r|, |:saveas|, |:sp|, |:mkexrc|, + |:mkvimrc|, |:mksession|, |:mkview|, |:split|, + |:vsplit|, |:tabe|, |:tabnew|, |:cfile|, |:cgetfile|, + |:caddfile|, |:lfile|, |:lgetfile|, |:laddfile|, + |:diffsplit|, |:diffpatch|, |:open|, |:pedit|, + |:redir|, |:source|, |:update|, |:visual|, |:vsplit|, + and |:qall| if 'confirm' is set. {only in Win32, Athena, Motif, GTK and Mac GUI} When ":browse" is not possible you get an error message. If the |+browse| feature is missing or the {command} doesn't support browsing, the {command} is executed without a dialog. ":browse set" works like |:options|. + See also |:oldfiles| for ":browse oldfiles". The syntax is best shown via some examples: > :browse e $vim/foo diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -18,7 +18,7 @@ |Q_sc| Scrolling |Q_ce| Ex: Command-line editing |Q_in| insert: Inserting text |Q_ra| Ex: Ranges |Q_ai| insert: Keys |Q_ex| Ex: Special characters -|Q_ss| insert: Special keys |Q_st| Starting VIM +|Q_ss| insert: Special keys |Q_st| Starting Vim |Q_di| insert: Digraphs |Q_ed| Editing a file |Q_si| insert: Special inserts |Q_fl| Using the argument list |Q_de| change: Deleting text |Q_wq| Writing and quitting @@ -68,7 +68,7 @@ N is used to indicate an optional count non-blank character |gg| N gg goto line N (default: first line), on the first non-blank character -|N%| N % goto line N percentage down in the file; N must be +|N%| N % goto line N percentage down in the file; N must be given, otherwise it is the |%| command |gk| N gk up N screen lines (differs from "k" when line wraps) |gj| N gj down N screen lines (differs from "j" when line wraps) @@ -1086,7 +1086,7 @@ Context-sensitive completion on the comm |:_%| % current file name (only where a file name is expected) |:_#| #[num] alternate file name [num] (only where a file name is expected) - Note: The next five are typed literally; these are not special keys! + Note: The next seven are typed literally; these are not special keys! |:| buffer number, for use in an autocommand (only where a file name is expected) |:| file name, for user in an autocommand (only where a @@ -1110,7 +1110,7 @@ Context-sensitive completion on the comm |::e| :e extension |::s| :s/{pat}/{repl}/ substitute {pat} with {repl} ------------------------------------------------------------------------------ -*Q_st* Starting VIM +*Q_st* Starting Vim |-vim| vim [options] start editing with an empty buffer |-file| vim [options] {file} .. start editing one or more files @@ -1144,7 +1144,7 @@ Context-sensitive completion on the comm |-n| -n do not create a swap file |-o| -o [num] open [num] windows (default: one for each file) |-f| -f GUI: foreground process, don't fork - Amiga: do not restart VIM to open a window (for + Amiga: do not restart Vim to open a window (for e.g., mail) |-s| -s {scriptin} first read commands from the file {scriptin} |-w| -w {scriptout} write typed chars to file {scriptout} (append) @@ -1161,7 +1161,7 @@ Context-sensitive completion on the comm ------------------------------------------------------------------------------ *Q_ed* Editing a file - Without !: Fail if changes has been made to the current buffer. + Without !: Fail if changes have been made to the current buffer. With !: Discard any changes to the current buffer. |:edit_f| :e[dit][!] {file} edit {file} |:edit| :e[dit][!] reload the current file @@ -1190,13 +1190,13 @@ Context-sensitive completion on the comm |:wN| :wN[ext][!] [file] write file and edit previous file in current window in new window ~ -|:argument| :argu[ment] N :sar[gument] N Edit file N -|:next| :n[ext] :sn[ext] Edit next file +|:argument| :argu[ment] N :sar[gument] N edit file N +|:next| :n[ext] :sn[ext] edit next file |:next_f| :n[ext] {arglist} :sn[ext] {arglist} define new arg list and edit first file -|:Next| :N[ext] :sN[ext] Edit previous file -|:first| :fir[st] :sfir[st] Edit first file -|:last| :la[st] :sla[st] Edit last file +|:Next| :N[ext] :sN[ext] edit previous file +|:first| :fir[st] :sfir[st] edit first file +|:last| :la[st] :sla[st] edit last file ------------------------------------------------------------------------------ *Q_wq* Writing and quitting @@ -1231,18 +1231,18 @@ Context-sensitive completion on the comm |:xall| :xa[ll][!] or :wqall[!] write all changed buffers and exit -|:stop| :st[op][!] suspend VIM or start new shell; if 'aw' option +|:stop| :st[op][!] suspend Vim or start new shell; if 'aw' option is set and [!] not given write the buffer |CTRL-Z| CTRL-Z same as ":stop" ------------------------------------------------------------------------------ *Q_ac* Automatic Commands -|viminfo-file| Read registers, marks, history at startup, save when exiting. +|viminfo-file| read registers, marks, history at startup, save when exiting. -|:rviminfo| :rv[iminfo] [file] Read info from viminfo file [file] +|:rviminfo| :rv[iminfo] [file] read info from viminfo file [file] |:rviminfo| :rv[iminfo]! [file] idem, overwrite existing info -|:wviminfo| :wv[iminfo] [file] Add info to viminfo file [file] -|:wviminfo| :wv[iminfo]! [file] Write info to viminfo file [file] +|:wviminfo| :wv[iminfo] [file] add info to viminfo file [file] +|:wviminfo| :wv[iminfo]! [file] write info to viminfo file [file] |modeline| Automatic option setting when editing a file @@ -1252,19 +1252,19 @@ Context-sensitive completion on the comm |autocommand| Automatic execution of commands on certain events. -|:autocmd| :au List all autocommands -|:autocmd| :au {event} List all autocommands for {event} -|:autocmd| :au {event} {pat} List all autocommands for {event} with - {pat} -|:autocmd| :au {event} {pat} {cmd} Enter new autocommands for {event} - with {pat} -|:autocmd| :au! Remove all autocommands -|:autocmd| :au! {event} Remove all autocommands for {event} -|:autocmd| :au! * {pat} Remove all autocommands for {pat} -|:autocmd| :au! {event} {pat} Remove all autocommands for {event} - with {pat} -|:autocmd| :au! {event} {pat} {cmd} Remove all autocommands for {event} - with {pat} and enter new one +|:autocmd| :au list all autocommands +|:autocmd| :au {event} list all autocommands for {event} +|:autocmd| :au {event} {pat} list all autocommands for {event} + with {pat} +|:autocmd| :au {event} {pat} {cmd} enter new autocommands for {event} + with {pat} +|:autocmd| :au! remove all autocommands +|:autocmd| :au! {event} remove all autocommands for {event} +|:autocmd| :au! * {pat} remove all autocommands for {pat} +|:autocmd| :au! {event} {pat} remove all autocommands for {event} + with {pat} +|:autocmd| :au! {event} {pat} {cmd} remove all autocommands for {event} + with {pat} and enter new one ------------------------------------------------------------------------------ *Q_wi* Multi-window commands diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3155,6 +3155,7 @@ when it is concealed (setting "cchar" on argument is given.) If "cchar" is not set then the default conceal character defined in the 'listchars' option is used. Example: > :syntax match Entity "&" conceal cchar=& +See |hl-Conceal| for highlighting. contained *:syn-contained* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1092,10 +1092,7 @@ Vim 7.3: - soon: remove UF_VERSION_CRYPT_PREV and UF_VERSION_PREV. - Conceal feature: no update when moving to another window. (Dominique Pelle, 2010 Jul 5) Vince will look into it. -Patches to include: -- Gvimext patch to support wide file names. (Szabolcs Horvat 2008 Sep 10) -- Patch to support netbeans for Mac. (Kazuki Sakamoto, 2009 Jun 25) -- Patch to support clipboard for Mac terminal. (Jjgod Jiang, 2009 Aug 1) +Patches to possibly include: - Patch to support :browse for more commands. (Lech Lorens, 2009 Jul 18) - Patch to improve javascript indenting. (Hari Kumar G, 2010 May 22) - Patch to use return value of 'formatexpr'. (James Vega, 2010 Jun 16) @@ -1197,6 +1194,8 @@ More patches: Sep 13) - Patch for adding "space" item in 'listchars'. (Jérémie Roquet, 2009 Oct 29, Docs patch Oct 30) +- Patch to support clipboard for Mac terminal. (Jjgod Jiang, 2009 Aug 1) + Needs to be updated for block-wise selection. Awaiting updated patches: diff --git a/runtime/indent/vhdl.vim b/runtime/indent/vhdl.vim --- a/runtime/indent/vhdl.vim +++ b/runtime/indent/vhdl.vim @@ -1,8 +1,8 @@ " VHDL indent ('93 syntax) " Language: VHDL " Maintainer: Gerald Lai -" Version: 1.55 -" Last Change: 2010 Jun 27 +" Version: 1.56 +" Last Change: 2010 Jun 29 " URL: http://www.vim.org/scripts/script.php?script_id=1450 " only load this indent file when no other was loaded @@ -386,10 +386,10 @@ function GetVHDLindent() endif " indent: -sw - " keywords: "end" + identifier + " keywords: "end" + identifier, ";" " where: start of current line "if curs =~? '^\s*end\s\+\w\+\>' - if curs =~? '^\s*end\s' + if curs =~? '^\s*end\%(\s\|;'.s:ES.'\)' return ind - &sw endif diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -117,8 +117,8 @@ if s:i > 0 endif " Italian -if v:lang == "IT" - syn keyword helpNote nota Nota NOTA notare: Notare: NOTARE: +if v:lang =~ '\' || v:lang =~? "italian" + syn keyword helpNote nota Nota NOTA nota: Nota: NOTA: notare Notare syn match helpSpecial "Nma"me=e-2 syn match helpSpecial "Nme"me=e-2 syn match helpSpecial "Nmi"me=e-2 diff --git a/src/ex_cmds.h b/src/ex_cmds.h --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -904,7 +904,7 @@ EX(CMD_sunmenu, "sunmenu", ex_menu, EX(CMD_suspend, "suspend", ex_stop, TRLBAR|BANG|CMDWIN), EX(CMD_sview, "sview", ex_splitview, - NEEDARG|RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR), + BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), EX(CMD_swapname, "swapname", ex_swapname, TRLBAR|CMDWIN), EX(CMD_syntax, "syntax", ex_syntax, diff --git a/src/quickfix.c b/src/quickfix.c --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2951,6 +2951,18 @@ ex_cfile(eap) || eap->cmdidx == CMD_laddfile) wp = curwin; +#ifdef FEAT_BROWSE + if (cmdmod.browse) + { + char_u *browse_file = do_browse(0, (char_u *)_("Error file"), eap->arg, + NULL, NULL, BROWSE_FILTER_ALL_FILES, NULL); + if (browse_file == NULL) + return; + set_string_option_direct((char_u *)"ef", -1, browse_file, OPT_FREE, 0); + vim_free(browse_file); + } + else +#endif if (*eap->arg != NUL) set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0);