# HG changeset patch # User vimboss # Date 1123277702 0 # Node ID 3b705e71c7b07ba1309d08a8b370ae8ad3fc17cd # Parent 8411e13e6dcb39a9a3d1203501ecfeee9fc2dcc0 updated for version 7.0124 diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 01 +*eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1474,6 +1474,8 @@ call( {func}, {arglist} [, {dict}]) char2nr( {expr}) Number ASCII value of first char in {expr} cindent( {lnum}) Number C indent for line {lnum} col( {expr}) Number column nr of cursor or mark +complete_add( {expr}) Number add completion match +complete_check() Number check for key typed during completion confirm( {msg} [, {choices} [, {default} [, {type}]]]) Number number of choice picked by user copy( {expr}) any make a shallow copy of {expr} @@ -1886,6 +1888,22 @@ col({expr}) The result is a Number, whic \:echo col(".") . "\n" \let &ve = save_ve < + +complete_add({expr}) *complete_add()* + Add {expr} to the list of matches. Only to be used by the + function specified with the 'completefunc' option. + Returns 0 for failure (empty string or out of memory), + 1 when the match was added, 2 when the match was already in + the list. + +complete_check() *complete_check()* + Check for a key typed while looking for completion matches. + This is to be used when looking for matches takes some time. + Returns non-zero when searching for matches is to be aborted, + zero otherwise. + Only to be used by the function specified with the + 'completefunc' option. + *confirm()* confirm({msg} [, {choices} [, {default} [, {type}]]]) Confirm() offers the user a dialog, from which a choice can be @@ -5233,8 +5251,8 @@ 7. Commands *expression-commands* value of each item. When an error is detected for a command inside the loop, execution continues after the "endfor". - Changing {list} affects what items are used. Make a - copy if this is unwanted: > + Changing {list} inside the loop affects what items are + used. Make a copy if this is unwanted: > :for item in copy(mylist) < When not making a copy, Vim stores a reference to the next item in the list, before executing the commands @@ -5252,12 +5270,6 @@ 7. Commands *expression-commands* changing. Unlet the variable at the end of the loop to allow multiple item types. -:for {var} in {string} -:endfo[r] Like ":for" above, but use each character in {string} - as a list item. - Composing characters are used as separate characters. - A Number is first converted to a String. - :for [{var1}, {var2}, ...] in {listlist} :endfo[r] Like ":for" above, but each item in {listlist} must be diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt --- 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 01 +*options.txt* For Vim version 7.0aa. Last change: 2005 Aug 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1607,7 +1607,15 @@ A jump table for the options with a shor with the matching words. These matches should include the "a:base" text. When there are no matches return an empty List. + When searching for matches takes some time call |complete_add()| to + add each match to the total list. These matches should then not + appear in the returned list! Call |complete_check()| now and then to + allow the user to press a key while still searching for matches. Stop + searching when it returns non-zero. + The function must not move the cursor! + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. An example that completes the names of the months: > fun! CompleteMonths(findstart, col, base) @@ -1632,6 +1640,32 @@ A jump table for the options with a shor endfun set completefunc=CompleteMonths < + The same, but now pretending searching for matches is slow: > + fun! CompleteMonths(findstart, col, base) + if a:findstart + " locate the start of the word + let line = getline('.') + let start = a:col + while start > 0 && line[start - 1] =~ '\a' + let start -= 1 + endwhile + return start + else + " find months matching with "a:base" + for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec") + if m =~ '^' . a:base + call complete_add(m) + endif + sleep 300m " simulate searching for next match + if complete_check() + break + endif + endfor + return [] + endif + endfun + set completefunc=CompleteMonths +< *'confirm'* *'cf'* *'noconfirm'* *'nocf'* 'confirm' 'cf' boolean (default off) diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt --- 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 01, 2005 +*pi_netrw.txt* For Vim version 7.0. Last change: Aug 04, 2005 VIM REFERENCE MANUAL by Charles E. Campbell, Jr. @@ -584,6 +584,8 @@ MAPS *netrw-maps* :Sexplore[!] [dir].Split & Explore directory of current file|netrw-explore| :Hexplore[!] [dir].Horizontal Split & Explore...............|netrw-explore| :Vexplore[!] [dir].Vertical Split & Explore.................|netrw-explore| + :Pexplore[!] [dir].Vertical Split & Explore.................|netrw-explore| + :Nexplore[!] [dir].Vertical Split & Explore.................|netrw-explore| QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds* > @@ -606,6 +608,7 @@ QUICK REFERENCE COMMANDS TABLE *n Causes Netrw to refresh the directory listing o Enter the file/directory under the cursor in a new browser window. A horizontal split is used. + p Preview the file r Reverse sorting order s Select sorting style: by name, time, or file size v Enter the file/directory under the cursor in a new browser @@ -741,10 +744,12 @@ ssh interaction, etc, see |netrw-list-ha DIRECTORY EXPLORING COMMANDS *netrw-explore* - :Explore[!] [dir].Explore directory of current file - :Sexplore[!] [dir].Split & Explore directory of current file - :Hexplore[!] [dir].Horizontal Split & Explore - :Vexplore[!] [dir].Vertical Split & Explore + :Explore[!] [dir]... Explore directory of current file + :Sexplore[!] [dir]... Split & Explore directory of current file + :Hexplore[!] [dir]... Horizontal Split & Explore + :Vexplore[!] [dir]... Vertical Split & Explore + :Nexplore............. used with **/patterns; go to next matching file + :Pexplore............. used with **/patterns; go to previous matching file The Explore command will open the local-directory browser on the current file's directory (or on directory [dir] if specified). The window @@ -762,6 +767,23 @@ optional ! does the Explore with |abovel Vexplore does an Explore with |leftabove| vertical splitting; the optiona ! does an Explore with |topleft| vertical splitting. +(Following needs v7.0 or later) +When Explore, Sexplore, Hexplore, or Vexplore are used with +**/filename-patterns, netrw will attempt to find a (sub)directory which +matches the filename pattern. The Nexplore and Pexplore commands enable +one to proceed to the next/previous matching file, respectively. If your +console or gui produce recognizable shift-up or shift-down sequences, then + + == Nexplore, and + == Pexplore. + +As an example, consider > + + :Explore **/*.c + :Nexplore + :Nexplore + :Pexplore +< REFRESHING THE LISTING *netrw-ctrl-l* @@ -993,10 +1015,10 @@ the current directory to the current bro BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks* -One may easily "bookmark" a directory by using +One may easily "bookmark" a directory by using > {cnt}b - +< Any count may be used. One may use viminfo's "!" option to retain bookmarks between vim sessions. See |netrw-B| for how to return to a bookmark and |netrw-q| for how to list them. @@ -1143,6 +1165,21 @@ which is loaded automatically at startup ============================================================================== 10. History *netrw-history* + v58: * Explore and relatives can now handle **/somefilepattern (v7) + * Nexplore and Pexplore introduced (v7). shift-down and shift-up + cursor keys will invoke Nexplore and Pexplore, respectively. + * bug fixed with o and v + * autochdir only worked around for vim when it has been + compiled with either |+netbeans_intg| or |+sun_workshop| + * Under Windows, all directories and files were being preceded + with a "/" when local browsing. Fixed. + * When: syntax highlighting is off, laststatus=2, and remote + browsing is used, sometimes the laststatus highlighting + bleeds into the entire display. Work around - do an extra + redraw in that case. + * Bugfix: when g:netrw_keepdir=0, due to re-use of buffers, + netrw didn't change the directory when it should've + * Bugfix: D and R commands work again v57: * Explore and relatives can now handle RO files * reverse sort restored with vim7's sort command * g:netrw_keepdir now being used to keep the current directory diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4456,6 +4456,8 @@ compl-occult insert.txt /*compl-occult* compl-tag insert.txt /*compl-tag* compl-vim insert.txt /*compl-vim* compl-whole-line insert.txt /*compl-whole-line* +complete_add() eval.txt /*complete_add()* +complete_check() eval.txt /*complete_check()* complex-change change.txt /*complex-change* complex-repeat repeat.txt /*complex-repeat* compress pi_gzip.txt /*compress* @@ -5163,6 +5165,7 @@ 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* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- 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 02 +*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -66,8 +66,6 @@ PLANNED FOR VERSION 7.0: make it work for all completion methods. First cleanup the Insert-mode completion. - - check security of 'completefunc'. - - use callback to interrupt searching for matches. UI: - At first: use 'wildmenu' kind of thing. @@ -76,7 +74,8 @@ PLANNED FOR VERSION 7.0: alternatives). Completion logic: - Use 'coupler' option to list items that connect words. For C: ".,->". + Use something like 'completefunc'? + runtime/complete/{filetype}.vim files? In function arguments suggest variables of expected type. Ideas from others: @@ -102,7 +101,7 @@ PLANNED FOR VERSION 7.0: "Visual Assist" http://www.wholetomato.com/products: Completion in .NET framework SharpDevelop: http://www.icsharpcode.net - - Pre-expand abbreviations, show which abbrevs would match? + - Pre-expand abbreviations, show which abbrevs would match? - UNDO TREE: keep all states of the text, don't delete undo info. When making a change, instead of clearing any future undo (thus redo) diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt --- 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 04 +*version7.txt* For Vim version 7.0aa. Last change: 2005 Aug 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -399,6 +399,8 @@ New functions: ~ |browsedir()| dialog to select a directory |byteidx()| index of a character (Ilya Sher) |call()| call a function with List as arguments +|complete_add()| add match for 'completefunc' +|complete_check()| check for key pressed, for 'completefunc' |copy()| make a shallow copy of a List or Dictionary |count()| count nr of times a value is in a List or Dictionary |deepcopy()| make a full copy of a List or Dictionary diff --git a/runtime/plugin/netrw.vim b/runtime/plugin/netrw.vim --- a/runtime/plugin/netrw.vim +++ b/runtime/plugin/netrw.vim @@ -1,8 +1,16 @@ " netrw.vim: Handles file transfer and remote directory listing across a network -" Last Change: Aug 02, 2005 +" Last Change: Aug 05, 2005 " Maintainer: Charles E Campbell, Jr -" Version: 58b NOT RELEASED +" Version: 58e ASTRO-ONLY " 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, +" with or without modifications, provided that this copyright +" notice is copied with it. Like anything else that's free, +" netrw.vim is provided *as is* and comes with no +" warranty of any kind, either expressed or implied. In no +" event will the copyright holder be liable for any damages +" resulting from the use of this software. " " But be doers of the Word, and not only hearers, deluding your own selves " (James 1:22 RSV) @@ -14,7 +22,7 @@ if exists("g:loaded_netrw") || &cp finish endif -let g:loaded_netrw = "v58b" +let g:loaded_netrw = "v58e" let loaded_explorer = 1 let s:keepcpo = &cpo set cpo&vim @@ -263,15 +271,17 @@ endfun " NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{1 fun! NetRestorePosn() " call Dfunc("NetRestorePosn() winnr=".s:netrw_winnr." line=".s:netrw_line." col=".s:netrw_col." hline=".s:netrw_hline) + let eikeep= &ei + set ei=all " 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 +" 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") @@ -281,6 +291,7 @@ fun! NetRestorePosn() " call Decho("restore posn: exe norm! ".s:netrw_line."G0".s:netrw_col."|") exe "norm! ".s:netrw_line."G0".s:netrw_col."\" + let &ei= eikeep " call Dret("NetRestorePosn") endfun @@ -354,7 +365,7 @@ fun! s:NetRead(...) let ichoice = ichoice + 1 if ichoice > a:0 if !exists("g:netrw_quiet") - echoerr "***netrw*** Unbalanced string in filename '". wholechoice ."'" + echohl Error | echo "***netrw*** Unbalanced string in filename '". wholechoice ."'" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif " call Dret("NetRead") @@ -441,7 +452,7 @@ fun! s:NetRead(...) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' let debugkeep= &debug set debug=msg - echoerr "***netrw*** ".getline(1) + echohl Error | echo "***netrw*** ".getline(1) | echohl None call inputsave()|call input("Press to continue")|call inputrestore() let &debug= debugkeep endif @@ -487,7 +498,7 @@ fun! s:NetRead(...) if getline(1) !~ "^$" " call Decho("error<".getline(1).">") if !exists("g:netrw_quiet") - echoerr "***netrw*** ".getline(1) + echohl Error | echo "***netrw*** ".getline(1) | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif endif @@ -520,7 +531,7 @@ fun! s:NetRead(...) " call Decho("read via http (method #5)") if g:netrw_http_cmd == "" if !exists("g:netrw_quiet") - echoerr "***netrw*** neither wget nor fetch command is available" + echohl Error | echo "***netrw*** neither wget nor fetch command is available" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif exit @@ -598,7 +609,7 @@ fun! s:NetRead(...) elseif b:netrw_method == 8 " read with fetch if g:netrw_fetch_cmd == "" if !exists("g:netrw_quiet") - echoerr "***netrw*** fetch command not available" + echohl Error | echo "***netrw*** fetch command not available" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif exit @@ -805,7 +816,7 @@ fun! s:NetWrite(...) range let ichoice = ichoice + 1 if choice > a:0 if !exists("g:netrw_quiet") - echoerr "***netrw*** Unbalanced string in filename '". wholechoice ."'" + echohl Error | echo "***netrw*** Unbalanced string in filename '". wholechoice ."'" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif " call Dret("NetWrite") @@ -876,7 +887,7 @@ fun! s:NetWrite(...) range " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" if !exists("g:netrw_quiet") - echoerr "***netrw*** ".getline(1) + echohl Error | echo "***netrw*** ".getline(1) | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif let mod=1 @@ -916,7 +927,7 @@ fun! s:NetWrite(...) range " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" if !exists("g:netrw_quiet") - echoerr "***netrw*** ".getline(1) + echohl Error | echo "***netrw*** ".getline(1) | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif let mod=1 @@ -945,7 +956,7 @@ fun! s:NetWrite(...) range " http: NetWrite Method #5 elseif b:netrw_method == 5 if !exists("g:netrw_quiet") - echoerr "***netrw*** currently does not support writing using http:" + echohl Error | echo "***netrw*** currently does not support writing using http:" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif @@ -1044,7 +1055,7 @@ fun! NetBrowse(dirname) " call Decho("b:netrw_method=".b:netrw_method) if !executable("ftp") if !exists("g:netrw_quiet") - echoerr "***netrw*** this system doesn't support remote directory listing via ftp" + echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ftp" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif " call Dret("NetBrowse") @@ -1052,9 +1063,10 @@ fun! NetBrowse(dirname) endif elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == '' if !exists("g:netrw_quiet") - echoerr "***netrw*** this system doesn't support remote directory listing via ssh" + echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ssh" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif + " call Dret("NetBrowse") return endif @@ -1068,7 +1080,7 @@ fun! NetBrowse(dirname) " call Decho("dirpat<".dirpat.">") if dirname !~ dirpat if !exists("g:netrw_quiet") - echoerr "***netrw*** netrw doesn't understand your dirname<".dirname.">" + echohl Error | echo "***netrw*** netrw doesn't understand your dirname<".dirname.">" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif " call Dret("NetBrowse : badly formatted dirname<".dirname.">") @@ -1100,7 +1112,7 @@ fun! NetBrowse(dirname) " optionally sort by time (-t) or by size (-S) if listcmd == "dir" && g:netrw_sort_by =~ "^[ts]" - echoerr "***netrw*** windows' ftp doesn't support time/size sorts (get cygwin, set g:netrw_cygwin)" + echohl WarningMsg | echo "***netrw*** windows' ftp doesn't support time/size sorts (get cygwin, set g:netrw_cygwin)" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() else if g:netrw_sort_by =~ "^t" @@ -1140,7 +1152,8 @@ fun! NetBrowse(dirname) silent call s:NetRead(method."://".user.machine."/".path) exe "silent doau BufReadPost ".fname keepjumps 1d - setlocal nomod + + setlocal nonu nomod noma " call Dret("NetBrowse : file<".fname.">") return @@ -1180,7 +1193,7 @@ fun! NetBrowse(dirname) " set up buffer-local mappings " call Decho("set up buffer-local mappings") nnoremap :exe "norm! 0"call NetBrowse(NetBrowseChgDir(expand("%"),NetGetWord())) - nnoremap :exe "norm! 0"call NetBrowse(NetBrowseChgDir(expand("%"),'./')) + nnoremap :call NetRefresh(NetBrowseChgDir(expand("%"),'./')) nnoremap - :exe "norm! 0"call NetBrowse(NetBrowseChgDir(expand("%"),'../')) nnoremap a :let g:netrw_hide=(g:netrw_hide+1)%3exe "norm! 0"call NetBrowse(NetBrowseChgDir(expand("%"),'./')) nnoremap b :call NetBookmarkDir(0,expand("%")) @@ -1279,26 +1292,25 @@ fun! NetBrowse(dirname) " use ssh to get remote file listing " call Decho("use ssh to get remote file listing") let shq= &shq? &shq : ( &sxq? &sxq : "'") -" call Decho("exe silent r! ".listcmd." ".shq.escape(path,s:netrw_cd_escape).shq) +" call Decho("exe silent r! ".listcmd." '".shq.escape(path,s:netrw_cd_escape).shq."'") exe "silent r! ".listcmd." ".shq.escape(path,s:netrw_cd_escape).shq -if !exists("g:junk") - let g:junk=1 -else - put ='testing' - return -endif keepjumps 1d " cleanup if g:netrw_ftp_browse_reject != "" exe "silent! g/".g:netrw_ssh_browse_reject."/keepjumps d" endif endif + " set up syntax highlighting if has("syntax") setlocal ft=netrwlist - if !has("syntax_items") + if !exists("g:syntax_on") || !g:syntax_on setlocal ft= + " Ugly workaround -- when syntax highlighting is off and laststatus==2, + " sometimes the laststatus highlight bleeds into the entire display. + " Only seems to happen with remote browsing. Weird. + redraw endif endif @@ -1315,7 +1327,7 @@ endif if method == "ftp" " cleanup exe "keepjumps ".s:netrw_bannercnt - while getline(".") =~ '^total\s\+\d\+$' || getline(".") =~ 'Trying\s\+\d\+.*$' + while getline(".") =~ g:netrw_ftp_browse_reject keepjumps d endwhile " if there's no ../ listed, then put ./ and ../ in @@ -1355,9 +1367,8 @@ endif endif endif exe "keepjumps ".s:netrw_bannercnt - setlocal nomod - setlocal noma - setlocal nonu + + setlocal nomod noma nonu " call Dret("NetBrowse") return @@ -1497,7 +1508,7 @@ fun! NetBrowseRm(usrhost,path) rang " call Decho("returned=".ret." errcode=".v:shell_error) if v:shell_error != 0 && !exists("g:netrw_quiet") - echoerr "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" + echohl Error | echo "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif endif @@ -1561,6 +1572,17 @@ fun! NetBrowseRename(usrhost,path) endfun " --------------------------------------------------------------------- +" NetRefresh: {{{2 +fun! NetRefresh(dirname) +" call Dfunc("NetRefresh(dirname<".a:dirname.">)") + set ma + %d + call NetBrowse(dirname) + redraw! +" call Dret("NetRefresh") +endfun + +" --------------------------------------------------------------------- " NetBrowseX: allows users to write custom functions to operate on {{{2 " files given their extension. Passes 0=local, 1=remote fun! NetBrowseX(fname,remote) @@ -1580,10 +1602,8 @@ fun! NetBrowseX(fname,remote) let fname= tempname().".".exten " call Decho("create a local copy of <".a:fname."> as <".fname.">") exe "keepjumps silent bot 1new ".a:fname - let eikeep= &ei - set ei=all bh=delete + set bh=delete exe "w! ".fname - let &ei= eikeep q endif " call Decho("exten<".exten."> "."NetrwFileHandler_".exten."():exists=".exists("*NetrwFileHandler_".exten)) @@ -1627,10 +1647,8 @@ fun! NetBrowseX(fname,remote) endif if a:remote == 1 - let eikeep= &ei - set ei=all bh=delete bt=nofile noswf + set bh=delete bt=nofile noswf exe "norm! \" - let &ei= eikeep redraw! endif @@ -1764,7 +1782,7 @@ fun! NetHideEdit(mode) if a:mode == 0 silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./')) else - silent call s:LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,"./")) + silent call s:LocalRefresh(LocalBrowseChgDir(b:netrw_curdir,"./")) endif " call Dret("NetHideEdit") @@ -1809,6 +1827,8 @@ fun! NetLongList(mode) let g:netrw_list_cmd = g:netrw_list_cmd." -l" endif setlocal ma + + " clear buffer - this will cause NetBrowse/LocalBrowse to do a refresh %d " refresh the listing @@ -1818,7 +1838,7 @@ fun! NetLongList(mode) silent call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,"./")) endif - call s:NetRestorePosn() +" call s:NetRestorePosn() " call Dret("NetLongList : g:netrw_longlist=".g:netrw_longlist) endfun @@ -1866,7 +1886,7 @@ fun! NetMakeDir(usrhost) " call Decho("fullnewdir<".fullnewdir.">") if isdirectory(fullnewdir) if !exists("g:netrw_quiet") - echoerr "***netrw*** <".newdirname."> is already a directory!" + echohl WarningMsg | echo "***netrw*** <".newdirname."> is already a directory!" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif " call Dret("NetMakeDir : directory<".newdirname."> exists previously") @@ -1874,7 +1894,7 @@ fun! NetMakeDir(usrhost) endif if filereadable(fullnewdir) if !exists("g:netrw_quiet") - echoerr "***netrw*** <".newdirname."> is already a file!" + echohl WarningMsg | echo "***netrw*** <".newdirname."> is already a file!" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif " call Dret("NetMakeDir : file<".newdirname."> exists previously") @@ -1900,11 +1920,12 @@ fun! NetMakeDir(usrhost) let linenum= line(".") norm! H0 let hline = line(".") + set ma|norm! 2D call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,'./')) exe "norm! ".hline."G0z\" exe linenum elseif !exists("g:netrw_quiet") - echoerr "***netrw*** unable to make directory<".newdirname.">" + echohl Error | echo "***netrw*** unable to make directory<".newdirname.">" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif redraw! @@ -1924,7 +1945,7 @@ fun! NetMakeDir(usrhost) exe "norm! ".hline."G0z\" exe linenum elseif !exists("g:netrw_quiet") - echoerr "***netrw*** unable to make directory<".newdirname.">" + echohl Error | echo "***netrw*** unable to make directory<".newdirname.">" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif redraw! @@ -1935,8 +1956,12 @@ endfun " --------------------------------------------------------------------- " NetBookmarkDir: {{{2 -" 0: bookmark the current directory -" 1: change to the bookmarked directory +" 0: (user: ) bookmark current directory +" 1: (user: ) change to the bookmarked directory +" 2: (user: ) list bookmarks +" 3: (LocalBrowse) record current directory history +" 4: (user: ) go up (previous) bookmark +" 5: (user: ) go down (next) bookmark fun! NetBookmarkDir(chg,curdir) " call Dfunc("NetBookmarkDir(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count) @@ -1958,8 +1983,8 @@ fun! NetBookmarkDir(chg,curdir) endif elseif a:chg == 2 + " list user's bookmarks if exists("g:NETRW_BOOKMARKMAX") - " list user's bookmarks " call Decho("list bookmarks [0,".g:NETRW_BOOKMARKMAX."]") let cnt= 0 while cnt <= g:NETRW_BOOKMARKMAX @@ -1990,10 +2015,12 @@ fun! NetBookmarkDir(chg,curdir) endwhile elseif a:chg == 3 - " saves most recently visited directories - let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax - let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= substitute(a:curdir,'[/\\]$','','e') -" call Decho("save dirhist#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">") + " saves most recently visited directories (when they differ) + if !exists("g:NETRW_DIRHIST_0") || g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} != a:curdir + let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax + let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= substitute(a:curdir,'[/\\]$','','e') +" call Decho("save dirhist#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">") + endif elseif a:chg == 4 " u: change to the previous directory stored on the history list @@ -2042,12 +2069,12 @@ fun! LocalBrowse(dirname) " unfortunate interaction -- when putting debugging calls " above one can no longer enter the DBG buffer. -" call Dfunc("LocalBrowse(dirname<".a:dirname.">) buf#".bufnr("%")." winnr=".winnr()) +" call Dfunc("LocalBrowse(dirname<".a:dirname.">) buf#".bufnr("%")." winnr=".winnr()." sortby=".g:netrw_sort_by) " call Dredir("ls!") if v:version < 603 if !exists("g:netrw_quiet") - echoerr "***netrw*** vim version<".v:version."> too old for browsing with netrw" + echohl Error | echo "***netrw*** vim version<".v:version."> too old for browsing with netrw" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif " call Dret("LocalBrowse : vim version<".v:version."> too old") @@ -2087,19 +2114,23 @@ fun! LocalBrowse(dirname) endif " call Decho("enew buffer") else - let eikeep= &ei - set ei=BufEnter if v:version < 700 exe "b ".bufnum else exe "keepalt b ".bufnum endif - let &ei= eikeep - if getline(2) =~ '^" Directory Listing ' -" call Dret("LocalBrowse : reusing buffer#".bufnum."<".a:dirname.">") - return + if exists("s:last_sort_by") && g:netrw_sort_by == s:last_sort_by + if getline(2) =~ '^" Directory Listing ' + if !g:netrw_keepdir +" call Decho("change directory: cd ".b:netrw_curdir) + exe 'cd '.b:netrw_curdir + endif +" call Dret("LocalBrowse : reusing buffer#".bufnum."<".a:dirname.">") + return + endif endif endif + let s:last_sort_by= g:netrw_sort_by " get the new directory name let b:netrw_curdir= substitute(a:dirname,'\\','/','ge') @@ -2119,6 +2150,7 @@ fun! LocalBrowse(dirname) " make this buffer modifiable and hidden setlocal ma hidden nonu + keepalt silent! %d " --------------------------- " Perform Directory Listing: @@ -2129,9 +2161,9 @@ fun! LocalBrowse(dirname) " set up all the maps " call Decho("Setting up local browser maps") nnoremap :exe "norm! 0"call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,NetGetWord())) - nnoremap :exe "norm! 0"call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,'./')) + nnoremap :set ma%dcall LocalRefresh(LocalBrowseChgDir(b:netrw_curdir,'./'))redraw! nnoremap - :exe "norm! 0"call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,'../')) - nnoremap a :let g:netrw_hide=(g:netrw_hide+1)%3exe "norm! 0"call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,'./')) + nnoremap a :let g:netrw_hide=(g:netrw_hide+1)%3exe "norm! 0"call LocalRefresh(LocalBrowseChgDir(b:netrw_curdir,'./')) nnoremap b :call NetBookmarkDir(0,b:netrw_curdir) nnoremap B :call NetBookmarkDir(1,b:netrw_curdir) nnoremap c :exe "cd ".b:netrw_curdir @@ -2148,7 +2180,9 @@ fun! LocalBrowse(dirname) nnoremap U :call NetBookmarkDir(5,expand("%")) nnoremap v :exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"exe "norm! 0"call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,NetGetWord())) nnoremap x :exe "norm! 0"call NetBrowseX(LocalBrowseChgDir(b:netrw_curdir,NetGetWord(),0),0) - nnoremap <2-leftmouse> :exe "norm! 0"call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,NetGetWord())) + nnoremap <2-leftmouse> :exe "norm! 0"call LocalRefresh(LocalBrowseChgDir(b:netrw_curdir,NetGetWord())) + nnoremap :Pexplore + nnoremap :Nexplore exe 'nnoremap :exe "norm! 0"call LocalBrowseRm("'.b:netrw_curdir.'")' exe 'vnoremap :call LocalBrowseRm("'.b:netrw_curdir.'")' exe 'nnoremap D :exe "norm! 0"call LocalBrowseRm("'.b:netrw_curdir.'")' @@ -2208,7 +2242,7 @@ fun! LocalBrowse(dirname) " set up syntax highlighting if has("syntax") setlocal ft=netrwlist - if !has("syntax_items") + if !exists("g:syntax_on") || !g:syntax_on setlocal ft= endif endif @@ -2305,11 +2339,11 @@ fun! LocalBrowseList() if isdirectory(filename) let pfile= filename."/" endif - let pfile= substitute(pfile,'^/','','e') if pfile =~ '//$' let pfile= substitute(pfile,'//$','/','e') endif let pfile= strpart(pfile,dirnamelen) + let pfile= substitute(pfile,'^/','','e') " call Decho(" ") " call Decho("filename<".filename.">") " call Decho("pfile <".pfile.">") @@ -2401,7 +2435,7 @@ fun! LocalBrowseChgDir(dirname,newd endfun " --------------------------------------------------------------------- -" LocalBrowseRm: +" LocalBrowseRm: {{{2 fun! LocalBrowseRm(path) range " call Dfunc("LocalBrowseRm(path<".a:path.">)") " call Decho("firstline=".a:firstline." lastline=".a:lastline) @@ -2480,11 +2514,11 @@ fun! LocalBrowseRm(path) range " call Decho("3rd attempt to remove directory<".rmfile.">") call system("rm ".rmfile) if v:shell_error != 0 && !exists("g:netrw_quiet") - echoerr "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" + echohl Error | echo "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif elseif !exists("g:netrw_quiet") - echoerr "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" + echohl Error | echo "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif endif @@ -2501,7 +2535,7 @@ fun! LocalBrowseRm(path) range " refresh the directory let curline= line(".") " call Decho("refresh the directory") - call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,'./')) + call s:LocalRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./')) exe curline " call Dret("LocalBrowseRm") @@ -2531,7 +2565,7 @@ fun! LocalBrowseRename(path) range endif norm! 0 - let oldname= a:path.curword + let oldname= a:path."/".curword " call Decho("oldname<".oldname.">") call inputsave() @@ -2547,7 +2581,7 @@ fun! LocalBrowseRename(path) range " refresh the directory let curline= line(".") " call Decho("refresh the directory listing") - call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,'./')) + call s:LocalRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./')) exe "keepjumps ".curline " call Dret("LocalBrowseRename") endfun @@ -2560,17 +2594,28 @@ fun! LocalPreview(path) range if !isdirectory(a:path) exe "pedit ".a:path elseif !exists("g:netrw_quiet") - echoerr "***netrw*** sorry, cannot preview a directory such as <".a:path.">" + echohl WarningMsg | echo "***netrw*** sorry, cannot preview a directory such as <".a:path.">" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif elseif !exists("g:netrw_quiet") - echoerr "***netrw*** sorry, to preview your vim needs the quickfix feature compiled in" + echohl WarningMsg | echo "***netrw*** sorry, to preview your vim needs the quickfix feature compiled in" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif " call Dret("LocalPreview") endfun " --------------------------------------------------------------------- +" LocalRefresh: {{{2 +fun! LocalRefresh(dirname) +" call Dfunc("LocalRefresh(dirname<".a:dirname.">)") + set ma + %d + call LocalBrowse(a:dirname) + redraw! +" call Dret("LocalRefresh") +endfun + +" --------------------------------------------------------------------- " Explore: launch the local browser in the directory of the current file {{{2 " dosplit==0: the window will be split iff the current file has " been modified @@ -2602,7 +2647,7 @@ fun! s:Explore(indx,dosplit,style,...) " call Decho("calling LocalBrowse(newdir<".newdir.">)") call s:LocalBrowse(newdir) - elseif a:1 =~ '\*\*' || a:indx < 0 + elseif a:1 =~ '\*\*/' || a:indx < 0 if has("path_extra") if !exists("s:indx") @@ -2617,13 +2662,20 @@ fun! s:Explore(indx,dosplit,style,...) let s:indx = 0 let s:explorelist = split(expand(b:netrw_curdir."/".a:1),'\n') let s:listlen = len(s:explorelist) + if s:listlen == 1 && s:explorelist[0] =~ '\*\*\/' + echohl WarningMsg | echo "***netrw*** no files matched" | echohl None + call inputsave()|call input("Press to continue")|call inputrestore() +" call Dret("Explore") + return + endif endif let s:indx = indx " call Decho("explorelist<".join(s:explorelist,',')."> len=".s:listlen) " sanity check - if indx >= s:listlen - echoerr "***netrw*** no more directories with matching files" + if indx >= s:listlen || indx < 0 + let indx= (indx < 0)? 0 : ( s:listlen - 1 ) + echohl WarningMsg | echo "***netrw*** no more files match Explore pattern" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() " call Dret("Explore") return @@ -2639,9 +2691,9 @@ fun! s:Explore(indx,dosplit,style,...) else if v:version < 700 - echoerr "***netrw*** you need vim version 7.0 or later for Exploring with **!" + echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for Exploring with **!" | echohl None elseif !exists("g:netrw_quiet") - echoerr "***netrw*** your vim needs the path_extra feature for Exploring with **!" + echohl WarningMsg | echo "***netrw*** your vim needs the +path_extra feature for Exploring with **!" | echohl None | echohl None endif call inputsave()|call input("Press to continue")|call inputrestore() endif @@ -2847,7 +2899,7 @@ fun! s:NetMethod(choice) " globals: met else if !exists("g:netrw_quiet") - echoerr "***netrw*** cannot determine method" + echohl Error | echo "***netrw*** cannot determine method" | echohl None call inputsave()|call input("Press to continue")|call inputrestore() endif let b:netrw_method = -1 diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Dr. Charles E. Campbell, Jr. " Previous Maintainer: Lennart Schultz -" Last Change: Mar 24, 2005 -" Version: 74 +" Last Change: Jul 01, 2005 +" Version: 75 " URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax " " Using the following VIM variables: {{{1 @@ -71,6 +71,7 @@ syn cluster shCaseEsacList contains=shCa syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shSpecial syn cluster shColonList contains=@shCaseList syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shNumber,shOperator,shPosnParm,shSpecial,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest +syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shSpecial,shPosnParm syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError @@ -154,7 +155,7 @@ syn match shCharClass contained "\[:\( " ====== syn region shDo transparent matchgroup=shConditional start="\" matchgroup=shConditional end="\" contains=@shLoopList syn region shIf transparent matchgroup=shConditional start="\" matchgroup=shConditional end="\<;\_s*then\>" end="\" contains=@shLoopList,shDblBrace,shDblParen -syn region shFor matchgroup=shLoop start="\" end="\" end="\"me=e-2 contains=@shLoopList,shDblParen +syn region shFor matchgroup=shLoop start="\" end="\" end="\"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shCaseList add=shRepeat syn region shRepeat matchgroup=shLoop start="\" end="\" end="\"me=e-2 contains=@shLoopList,shDblParen,shDblBrace @@ -164,6 +165,8 @@ else syn region shRepeat matchgroup=shLoop start="\" end="\"me=e-2 contains=@shLoopList syn region shRepeat matchgroup=shLoop start="\" end="\"me=e-2 contains=@shLoopList endif +syn region shCurlyIn contained matchgroup=Delimiter start="{" end="}" contains=@shCurlyList +syn match shComma contained "," " Case: case...esac {{{1 " ==== diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 7.0 script " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: March 21, 2005 -" Version: 7.0-10 +" Last Change: August 02, 2005 +" Version: 7.0-11 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -16,11 +16,11 @@ syn keyword vimTodo contained COMBAK NOT syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 -syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] lan[guage] la[st] lc[d] lch[dir] le[ft] lefta[bove] l[ist] lm[ap] lmapc[lear] ln[oremap] lo[adview] loc[kmarks] lockv[ar] ls lu[nmap] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] sandbox sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] so[urce] sp[lit] spr[evious] sre[wind] sta[g] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] y[ank] +syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cad[dfile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] lan[guage] la[st] lc[d] lch[dir] le[ft] lefta[bove] l[ist] lm[ap] lmapc[lear] ln[oremap] lo[adview] loc[kmarks] lockv[ar] ls lu[nmap] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] y[ank] syn match vimCommand contained "\