From 76b92b2830841fd4e05006cc3cad1d8f0bc8101b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 24 Mar 2006 22:46:53 +0000 Subject: updated for version 7.0b --- runtime/autoload/ccomplete.vim | 73 ++++++++++++++++++++++++++++++++++++------ runtime/doc/arabic.txt | 2 +- runtime/doc/eval.txt | 2 +- runtime/doc/farsi.txt | 2 +- runtime/doc/filetype.txt | 10 +++--- runtime/doc/getscript.txt | 6 ++-- runtime/doc/hebrew.txt | 2 +- runtime/doc/howto.txt | 2 +- runtime/doc/intro.txt | 2 +- runtime/doc/os_amiga.txt | 2 +- runtime/doc/os_dos.txt | 2 +- runtime/doc/os_win32.txt | 2 +- runtime/doc/pattern.txt | 2 +- runtime/doc/pi_spec.txt | 2 +- runtime/doc/quickfix.txt | 18 +++++------ runtime/doc/quotes.txt | 2 +- runtime/doc/remote.txt | 2 +- runtime/doc/repeat.txt | 2 +- runtime/doc/scroll.txt | 2 +- runtime/doc/spell.txt | 2 +- runtime/doc/sql.txt | 2 +- runtime/doc/starting.txt | 2 +- runtime/doc/syntax.txt | 2 +- runtime/doc/tagsrch.txt | 2 +- runtime/doc/todo.txt | 34 +++++++++----------- runtime/doc/usr_01.txt | 2 +- runtime/doc/usr_04.txt | 2 +- runtime/doc/usr_05.txt | 7 ++-- runtime/doc/usr_06.txt | 2 +- runtime/doc/usr_07.txt | 2 +- runtime/doc/usr_11.txt | 2 +- runtime/doc/usr_12.txt | 2 +- runtime/doc/usr_20.txt | 2 +- runtime/doc/usr_23.txt | 2 +- runtime/doc/usr_27.txt | 2 +- runtime/doc/usr_28.txt | 2 +- runtime/doc/usr_30.txt | 2 +- runtime/doc/usr_31.txt | 6 ++-- runtime/doc/usr_40.txt | 4 +-- runtime/doc/various.txt | 2 +- runtime/doc/version7.txt | 6 ++-- runtime/doc/vimball.txt | 5 ++- runtime/doc/windows.txt | 2 +- runtime/doc/workshop.txt | 2 +- runtime/filetype.vim | 66 ++++++++++++++++++++++++++------------ runtime/macros/matchit.vim | 12 ++++--- 46 files changed, 203 insertions(+), 112 deletions(-) (limited to 'runtime') diff --git a/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim index 6f5e0c025..2d5e0ee1e 100644 --- a/runtime/autoload/ccomplete.vim +++ b/runtime/autoload/ccomplete.vim @@ -1,7 +1,7 @@ " Vim completion script " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2006 Mar 19 +" Last Change: 2006 Mar 24 " This function is used for the 'omnifunc' option. @@ -166,9 +166,11 @@ function! ccomplete#Complete(findstart, base) let res = [] for i in range(len(diclist)) - " New ctags has the "typename" field. + " New ctags has the "typeref" field. Patched version has "typename". if has_key(diclist[i], 'typename') call extend(res, s:StructMembers(diclist[i]['typename'], items[1:], 1)) + elseif has_key(diclist[i], 'typeref') + call extend(res, s:StructMembers(diclist[i]['typeref'], items[1:], 1)) endif " For a variable use the command, which must be a search pattern that @@ -232,10 +234,9 @@ function! s:Tag2item(val) let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename']) - " Use the whole search command as the "info" entry. - let s = matchstr(a:val['cmd'], '/^\s*\zs.*\ze$/') + let s = s:Dict2info(a:val) if s != '' - let res['info'] = substitute(s, '\\\(.\)', '\1', 'g') + let res['info'] = s endif let res['tagline'] = '' @@ -253,6 +254,51 @@ function! s:Tag2item(val) return res endfunction +" Use all the items in dictionary for the "info" entry. +function! s:Dict2info(dict) + let info = '' + for k in sort(keys(a:dict)) + let info .= k . repeat(' ', 10 - len(k)) + if k == 'cmd' + let info .= substitute(matchstr(a:dict['cmd'], '/^\s*\zs.*\ze$/'), '\\\(.\)', '\1', 'g') + else + let info .= a:dict[k] + endif + let info .= "\n" + endfor + return info +endfunc + +" Parse a tag line and return a dictionary with items like taglist() +function! s:ParseTagline(line) + let l = split(a:line, "\t") + let d = {} + if len(l) >= 3 + let d['name'] = l[0] + let d['filename'] = l[1] + let d['cmd'] = l[2] + let n = 2 + if l[2] =~ '^/' + " Find end of cmd, it may contain Tabs. + while n < len(l) && l[n] !~ '/;"$' + let n += 1 + let d['cmd'] .= " " . l[n] + endwhile + endif + for i in range(n + 1, len(l) - 1) + if l[i] == 'file:' + let d['static'] = 1 + elseif l[i] !~ ':' + let d['kind'] = l[i] + else + let d[matchstr(l[i], '[^:]*')] = matchstr(l[i], ':\zs.*') + endif + endfor + endif + + return d +endfunction + " Turn a match item "val" into an item for completion. " "val['match']" is the matching item. " "val['tagline']" is the tagline in which the last part was found. @@ -265,10 +311,10 @@ function! s:Tagline2item(val, brackets) " Use info from Tag2item(). let res['info'] = a:val['info'] else - " Use the whole search command as the "info" entry. - let s = matchstr(line, '\t/^\s*\zs.*\ze$/') + " Parse the tag line and add each part to the "info" entry. + let s = s:Dict2info(s:ParseTagline(line)) if s != '' - let res['info'] = substitute(s, '\\\(.\)', '\1', 'g') + let res['info'] = s endif endif @@ -348,7 +394,11 @@ function! s:Nextitem(lead, items, depth, all) for tagidx in range(len(diclist)) let item = diclist[tagidx] - " New ctags has the "typename" field. + " New ctags has the "typeref" field. Patched version has "typename". + if has_key(item, 'typeref') + call extend(res, s:StructMembers(item['typeref'], a:items, a:all)) + continue + endif if has_key(item, 'typename') call extend(res, s:StructMembers(item['typename'], a:items, a:all)) continue @@ -496,11 +546,16 @@ function! s:SearchMembers(matches, items, all) if has_key(a:matches[i], 'dict') if has_key(a:matches[i].dict, 'typename') let typename = a:matches[i].dict['typename'] + elseif has_key(a:matches[i].dict, 'typeref') + let typename = a:matches[i].dict['typeref'] endif let line = "\t" . a:matches[i].dict['cmd'] else let line = a:matches[i]['tagline'] let e = matchend(line, '\ttypename:') + if e < 0 + let e = matchend(line, '\ttyperef:') + endif if e > 0 " Use typename field let typename = matchstr(line, '[^\t]*', e) diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index 27990e023..59282704e 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -1,4 +1,4 @@ -*arabic.txt* For Vim version 7.0aa. Last change: 2005 Mar 29 +*arabic.txt* For Vim version 7.0b. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Nadim Shaikli diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index b25a88e3a..08e56d03c 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 22 +*eval.txt* For Vim version 7.0b. Last change: 2006 Mar 22 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/farsi.txt b/runtime/doc/farsi.txt index 0e7d9bbf7..c9df1f6b4 100644 --- a/runtime/doc/farsi.txt +++ b/runtime/doc/farsi.txt @@ -1,4 +1,4 @@ -*farsi.txt* For Vim version 7.0aa. Last change: 2005 Mar 29 +*farsi.txt* For Vim version 7.0b. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Mortaza Ghassab Shiran diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 778b639b0..f0121d07d 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 7.0aa. Last change: 2006 Mar 21 +*filetype.txt* For Vim version 7.0b. Last change: 2006 Mar 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -549,10 +549,10 @@ If the first line of a *.tex file has the form > %& then this determined the file type: plaintex (for plain TeX), context (for ConTeXt), or tex (for LaTeX). Otherwise, the file is searched for keywords to -choose context or tex. If no keywords are found, it defaults to tex. You can -change the default by defining the variable g:tex_flavor to the format (not -the file type) you use most: plain or context or latex. (Currently no other -formats are recognized.) +choose context or tex. If no keywords are found, it defaults to plaintex. +You can change the default by defining the variable g:tex_flavor to the format +(not the file type) you use most: plain or context or latex. (Currently no +other formats are recognized.) vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/getscript.txt b/runtime/doc/getscript.txt index 1459723d9..b9d2543c6 100644 --- a/runtime/doc/getscript.txt +++ b/runtime/doc/getscript.txt @@ -1,4 +1,6 @@ -*getscript.txt* Get the Latest VimScripts Dec 23, 2005 +*getscript.txt* For Vim version 7.0b. Last change: 2006 Mar 24 + + Get the Latest VimScripts Authors: Charles E. Campbell, Jr. (remove NOSPAM from the email address) @@ -23,7 +25,7 @@ Copyright: (c) 2004-2005 by Charles E. Campbell, Jr. ============================================================================== -2. GetLatestVimScripts Usage *getlatestvimscripts* *getscript* *glvs* +2. GetLatestVimScripts Usage *getlatestvimscripts* *getscript* *glvs* While in vim, type > diff --git a/runtime/doc/hebrew.txt b/runtime/doc/hebrew.txt index f595e29e8..cb32526f9 100644 --- a/runtime/doc/hebrew.txt +++ b/runtime/doc/hebrew.txt @@ -1,4 +1,4 @@ -*hebrew.txt* For Vim version 7.0aa. Last change: 2003 May 11 +*hebrew.txt* For Vim version 7.0b. Last change: 2003 May 11 VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem) diff --git a/runtime/doc/howto.txt b/runtime/doc/howto.txt index aa99190bd..e9cd6cfbe 100644 --- a/runtime/doc/howto.txt +++ b/runtime/doc/howto.txt @@ -1,4 +1,4 @@ -*howto.txt* For Vim version 7.0aa. Last change: 2001 Sep 03 +*howto.txt* For Vim version 7.0b. Last change: 2001 Sep 03 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 89f020c50..917c6d094 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 7.0aa. Last change: 2005 Sep 01 +*intro.txt* For Vim version 7.0b. Last change: 2005 Sep 01 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_amiga.txt b/runtime/doc/os_amiga.txt index 0e42c5d82..1fe1997d1 100644 --- a/runtime/doc/os_amiga.txt +++ b/runtime/doc/os_amiga.txt @@ -1,4 +1,4 @@ -*os_amiga.txt* For Vim version 7.0aa. Last change: 2005 Mar 29 +*os_amiga.txt* For Vim version 7.0b. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_dos.txt b/runtime/doc/os_dos.txt index 09f915d46..213ddbe37 100644 --- a/runtime/doc/os_dos.txt +++ b/runtime/doc/os_dos.txt @@ -1,4 +1,4 @@ -*os_dos.txt* For Vim version 7.0aa. Last change: 2006 Feb 14 +*os_dos.txt* For Vim version 7.0b. Last change: 2006 Feb 14 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index 880981d74..24b35595c 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 7.0aa. Last change: 2005 Mar 29 +*os_win32.txt* For Vim version 7.0b. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by George Reilly diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 8772334c8..b4f9cb08b 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.0aa. Last change: 2006 Mar 06 +*pattern.txt* For Vim version 7.0b. Last change: 2006 Mar 06 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pi_spec.txt b/runtime/doc/pi_spec.txt index 80773afbb..c0d4591fe 100644 --- a/runtime/doc/pi_spec.txt +++ b/runtime/doc/pi_spec.txt @@ -1,4 +1,4 @@ -*pi_spec.txt* For Vim version 7.0aa. Last change: 2005 Oct 03 +*pi_spec.txt* For Vim version 7.0b. Last change: 2005 Oct 03 by Gustavo Niemeyer ~ diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 81a382267..1b24604e8 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Mar 23 +*quickfix.txt* For Vim version 7.0b. Last change: 2006 Mar 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -225,6 +225,14 @@ command with 'l'. < *:lex* *:lexpr* :lex[pr][!] {expr} Same as ":cexpr", except the location list for the + current window is used instead of the quickfix list. + + *:cgete* *:cgetexpr* +:cgete[xpr][!] {expr} Create a quickfix list using the result of {expr}. + Just like ":cexpr", but don't jump to the first error. + + *:lgete* *:lgetexpr* +:lgete[xpr][!] {expr} Same as ":cgetexpr", except the location list for the current window is used instead of the quickfix list. *:cad* *:caddexpr* @@ -238,14 +246,6 @@ command with 'l'. < *:lad* *:laddexpr* :lad[dexpr][!] {expr} Same as ":caddexpr", except the location list for the - current window is used instead of the quickfix list. - - *:cgete* *:cgetexpr* -:cgete[xpr][!] {expr} Create a quickfix list using the result of {expr}. - Just like ":cexpr", but don't jump to the first error. - - *:lgete* *:lgetexpr* -:lgete[xpr][!] {expr} Same as ":cgetexpr", except the location list for the current window is used instead of the quickfix list. *:cl* *:clist* diff --git a/runtime/doc/quotes.txt b/runtime/doc/quotes.txt index 9cc94ff76..d10fac810 100644 --- a/runtime/doc/quotes.txt +++ b/runtime/doc/quotes.txt @@ -1,4 +1,4 @@ -*quotes.txt* For Vim version 7.0aa. Last change: 2005 Apr 04 +*quotes.txt* For Vim version 7.0b. Last change: 2005 Apr 04 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt index 35a995c92..4d577709f 100644 --- a/runtime/doc/remote.txt +++ b/runtime/doc/remote.txt @@ -1,4 +1,4 @@ -*remote.txt* For Vim version 7.0aa. Last change: 2006 Mar 11 +*remote.txt* For Vim version 7.0b. Last change: 2006 Mar 11 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 5135db601..b97a4710b 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 7.0aa. Last change: 2006 Mar 21 +*repeat.txt* For Vim version 7.0b. Last change: 2006 Mar 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index 847c83fe4..6c8395840 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -1,4 +1,4 @@ -*scroll.txt* For Vim version 7.0aa. Last change: 2005 Dec 16 +*scroll.txt* For Vim version 7.0b. Last change: 2005 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index c2dbe1a24..f782dbce2 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.0aa. Last change: 2006 Mar 10 +*spell.txt* For Vim version 7.0b. Last change: 2006 Mar 10 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/sql.txt b/runtime/doc/sql.txt index a0e6f0240..230ed128b 100644 --- a/runtime/doc/sql.txt +++ b/runtime/doc/sql.txt @@ -1,4 +1,4 @@ -*sql.txt* For Vim version 7.0aa. Last change: Fri Jan 06 2006 8:09:25 AM +*sql.txt* For Vim version 7.0b. Last change: Fri Jan 06 2006 8:09:25 AM by David Fishburn diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index fbca4251b..242f9b1db 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 7.0aa. Last change: 2006 Mar 05 +*starting.txt* For Vim version 7.0b. Last change: 2006 Mar 05 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index a606489ce..51d841936 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.0aa. Last change: 2006 Mar 12 +*syntax.txt* For Vim version 7.0b. Last change: 2006 Mar 12 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index e6c2740f0..50a25120f 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -1,4 +1,4 @@ -*tagsrch.txt* For Vim version 7.0aa. Last change: 2006 Feb 24 +*tagsrch.txt* For Vim version 7.0b. Last change: 2006 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 22d060863..1ee9f2a3e 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 23 +*todo.txt* For Vim version 7.0b. Last change: 2006 Mar 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,8 +30,18 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -Include patch for recognizing TeX flavor. (Benji Fisher) -And new tex.vim and plaintex.vim. +The 16 bit DOS version doesn't link because too much static memory is used. +Drop it? + +test61 sometimes fails, probably because of timing variations. + +Check version7.txt for: +- new syntax files and other runtime files. +- new functions +- new options +- etc. + +Add more tests for all new functionality in Vim 7. Especially new functions. Win32: Describe how to do debugging. (George Reilly) @@ -44,24 +54,12 @@ Mac unicode patch (Da Woon Jung, Eckehard Berns): - With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work. (Alan Schmitt) -Darren is including the patch in ctags. Test it when it's ready. Change -"typename" to "typeref" in C complete code. - -HTML indenting can be slow. Caused by using searchpair(). Can search() be -used instead? - -ccomplete: use "signature:" field from tags file when it's present. -Or list all the fields? (Martin Stubenschrott) - -Add more tests for all new functionality in Vim 7. Especially new functions. - -Add text in user manual for using the undo tree. Example with finding the -text of a previous change. - -Links in docs to GetLatestVimScripts (getscript) plugin. +Darren is including the patch in ctags. Test it when it's ready. Awaiting updated patches: +9 HTML indenting can be slow. Caused by using searchpair(). Can search() + be used instead? 8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible. Aric Blumer has a patch for this. He will update the patch for 6.3. diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index 6827552ca..13b4419d8 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -1,4 +1,4 @@ -*usr_01.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 +*usr_01.txt* For Vim version 7.0b. Last change: 2005 Apr 01 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_04.txt b/runtime/doc/usr_04.txt index d9664ca78..bdebfb682 100644 --- a/runtime/doc/usr_04.txt +++ b/runtime/doc/usr_04.txt @@ -1,4 +1,4 @@ -*usr_04.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 +*usr_04.txt* For Vim version 7.0b. Last change: 2005 Apr 01 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index c5128ae8c..7a2215e9d 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim version 7.0aa. Last change: 2005 Oct 04 +*usr_05.txt* For Vim version 7.0b. Last change: 2006 Mar 24 VIM USER MANUAL - by Bram Moolenaar @@ -300,10 +300,13 @@ GETTING A GLOBAL PLUGIN Where can you find plugins? - Some come with Vim. You can find them in the directory $VIMRUNTIME/macros and its sub-directories. -- Download from the net, check out http://vim.sf.net. +- Download from the net. There is a large collection on http://www.vim.org. - They are sometimes posted in a Vim |maillist|. - You could write one yourself, see |write-plugin|. +Some plugins come as a vimball archive, see |vimball|. +Some plugins can be updated automatically, see |getscript|. + USING A GLOBAL PLUGIN diff --git a/runtime/doc/usr_06.txt b/runtime/doc/usr_06.txt index a68340187..7ae52e7d0 100644 --- a/runtime/doc/usr_06.txt +++ b/runtime/doc/usr_06.txt @@ -1,4 +1,4 @@ -*usr_06.txt* For Vim version 7.0aa. Last change: 2006 Feb 16 +*usr_06.txt* For Vim version 7.0b. Last change: 2006 Feb 16 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_07.txt b/runtime/doc/usr_07.txt index 1b97c2d01..ffc488c15 100644 --- a/runtime/doc/usr_07.txt +++ b/runtime/doc/usr_07.txt @@ -1,4 +1,4 @@ -*usr_07.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 +*usr_07.txt* For Vim version 7.0b. Last change: 2005 Apr 01 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_11.txt b/runtime/doc/usr_11.txt index 05af29e56..b51e80942 100644 --- a/runtime/doc/usr_11.txt +++ b/runtime/doc/usr_11.txt @@ -1,4 +1,4 @@ -*usr_11.txt* For Vim version 7.0aa. Last change: 2005 Jun 09 +*usr_11.txt* For Vim version 7.0b. Last change: 2005 Jun 09 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt index b2530cc8b..112d42edc 100644 --- a/runtime/doc/usr_12.txt +++ b/runtime/doc/usr_12.txt @@ -1,4 +1,4 @@ -*usr_12.txt* For Vim version 7.0aa. Last change: 2006 Feb 26 +*usr_12.txt* For Vim version 7.0b. Last change: 2006 Feb 26 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_20.txt b/runtime/doc/usr_20.txt index 235b8a8ae..901a1293e 100644 --- a/runtime/doc/usr_20.txt +++ b/runtime/doc/usr_20.txt @@ -1,4 +1,4 @@ -*usr_20.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 +*usr_20.txt* For Vim version 7.0b. Last change: 2005 Apr 01 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_23.txt b/runtime/doc/usr_23.txt index dede37cb3..42cec3f96 100644 --- a/runtime/doc/usr_23.txt +++ b/runtime/doc/usr_23.txt @@ -1,4 +1,4 @@ -*usr_23.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 +*usr_23.txt* For Vim version 7.0b. Last change: 2005 Apr 01 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_27.txt b/runtime/doc/usr_27.txt index b7836ef38..d67f73959 100644 --- a/runtime/doc/usr_27.txt +++ b/runtime/doc/usr_27.txt @@ -1,4 +1,4 @@ -*usr_27.txt* For Vim version 7.0aa. Last change: 2005 Feb 08 +*usr_27.txt* For Vim version 7.0b. Last change: 2005 Feb 08 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_28.txt b/runtime/doc/usr_28.txt index 8ad98a3ea..172603a56 100644 --- a/runtime/doc/usr_28.txt +++ b/runtime/doc/usr_28.txt @@ -1,4 +1,4 @@ -*usr_28.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 +*usr_28.txt* For Vim version 7.0b. Last change: 2005 Apr 01 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index a4e869088..e0dc69ff5 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -1,4 +1,4 @@ -*usr_30.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 +*usr_30.txt* For Vim version 7.0b. Last change: 2005 Apr 01 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_31.txt b/runtime/doc/usr_31.txt index d7f2138cf..af6644c82 100644 --- a/runtime/doc/usr_31.txt +++ b/runtime/doc/usr_31.txt @@ -1,4 +1,4 @@ -*usr_31.txt* For Vim version 7.0aa. Last change: 2006 Feb 28 +*usr_31.txt* For Vim version 7.0b. Last change: 2006 Mar 24 VIM USER MANUAL - by Bram Moolenaar @@ -15,7 +15,7 @@ between alternatives. Use keyboard shortcuts to access menu items quickly. |31.4| Vim window position and size |31.5| Various - Next chapter: |usr_40.txt| Make new commands + Next chapter: |usr_32.txt| The undo tree Previous chapter: |usr_30.txt| Editing programs Table of contents: |usr_toc.txt| @@ -262,6 +262,6 @@ another font size, for example. ============================================================================== -Next chapter: |usr_40.txt| Make new commands +Next chapter: |usr_32.txt| The undo tree Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt index 7d2a7df55..79c57e390 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: 2005 Apr 01 +*usr_40.txt* For Vim version 7.0b. Last change: 2006 Mar 24 VIM USER MANUAL - by Bram Moolenaar @@ -14,7 +14,7 @@ Autocommands make it possible to execute commands automatically. |40.3| Autocommands Next chapter: |usr_41.txt| Write a Vim script - Previous chapter: |usr_31.txt| Exploiting the GUI + Previous chapter: |usr_32.txt| The undo tree Table of contents: |usr_toc.txt| ============================================================================== diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index e3e8655ed..61bc5bc42 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.0aa. Last change: 2006 Mar 21 +*various.txt* For Vim version 7.0b. Last change: 2006 Mar 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index 777dff0b5..c38f27241 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 23 +*version7.txt* For Vim version 7.0b. Last change: 2006 Mar 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -628,13 +628,13 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind) don't jump to the first error. (Yegappan Lakshmanan). |:lfile| Like |:cfile| but use the location list. -|:lgetbuffer| Like |:cgetbuffer| but use the location list. -|:lgetexpr| Like |:cgetexpr| but use the location list. |:lgetfile| Like |:cgetfile| but use the location list. |:laddfile| Like |:caddfile| but use the location list. |:lbuffer| Like |:cbuffer| but use the location list. +|:lgetbuffer| Like |:cgetbuffer| but use the location list. |:laddbuffer| Like |:caddbuffer| but use the location list. |:lexpr| Like |:cexpr| but use the location list. +|:lgetexpr| Like |:cgetexpr| but use the location list. |:laddexpr| Like |:caddexpr| but use the location list. |:ll| Like |:cc| but use the location list. |:llist| Like |:clist| but use the location list. diff --git a/runtime/doc/vimball.txt b/runtime/doc/vimball.txt index cd5f32f4d..4a5fbb5db 100644 --- a/runtime/doc/vimball.txt +++ b/runtime/doc/vimball.txt @@ -1,4 +1,7 @@ -*vimball.txt* Vimball Archiver Mar 20, 2006 +*vimball.txt* For Vim version 7.0b. Last change: 2006 Mar 24 + + Vimball Archiver + Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright* diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 93757a2eb..7fd0cd012 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 7.0aa. Last change: 2006 Mar 11 +*windows.txt* For Vim version 7.0b. Last change: 2006 Mar 11 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/workshop.txt b/runtime/doc/workshop.txt index f51390555..7c0fc6a00 100644 --- a/runtime/doc/workshop.txt +++ b/runtime/doc/workshop.txt @@ -1,4 +1,4 @@ -*workshop.txt* For Vim version 7.0aa. Last change: 2005 Mar 29 +*workshop.txt* For Vim version 7.0b. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Gordon Prieur diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 2ab098705..5b82dbeea 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2006 Mar 23 +" Last Change: 2006 Mar 24 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -1664,30 +1664,56 @@ au BufNewFile,BufRead *.ti setf terminfo au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex au BufNewFile,BufRead *.tex call s:FTtex() +" Choose context, plaintex, or tex (LaTeX) based on these rules: +" 1. Check the first line of the file for "%&". +" 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords. +" 3. Default to "latex" or to g:tex_flavor, can be set in user's vimrc. fun! s:FTtex() - let lnum = 1 - let checked = 0 - while checked < 25 && lnum < line("$") - let line = getline(lnum) - if line !~ '^\s*%' - if line =~ '^\s*\\\%(documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>\)' - setf tex - return - elseif line =~ '^\s*\\\%(start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\)\>' - setf context - return - endif - let checked = checked + 1 + let firstline = getline(1) + if firstline =~ '^%&\s*\a\+' + let format = tolower(matchstr(firstline, '\a\+')) + let format = substitute(format, 'pdf', '', '') + if format == 'tex' + let format = 'plain' endif - let lnum = lnum + 1 - endwhile - - " Didn't recognize anything, guess. - if exists("g:tex_flavour") && g:tex_flavour == "context" - setf context else + " Default value, may be changed later: + let format = exists("g:tex_flavor") ? g:tex_flavor : 'plain' + " Save position, go to the top of the file, find first non-comment line. + let save_cursor = getpos('.') + call cursor(1,1) + let firstNC = search('^\s*[^[:space:]%]', 'c', 1000) + if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword. + let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>' + let cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>' + let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)', + \ 'cnp', firstNC + 1000) + if kwline == 1 " lpat matched + let format = 'latex' + elseif kwline == 2 " cpat matched + let format = 'context' + endif " If neither matched, keep default set above. + " let lline = search('^\s*\\\%(' . lpat . '\)', 'cn', firstNC + 1000) + " let cline = search('^\s*\\\%(' . cpat . '\)', 'cn', firstNC + 1000) + " if cline > 0 + " let format = 'context' + " endif + " if lline > 0 && (cline == 0 || cline > lline) + " let format = 'tex' + " endif + endif " firstNC + call setpos('.', save_cursor) + endif " firstline =~ '^%&\s*\a\+' + + " Translation from formats to file types. TODO: add AMSTeX, RevTex, others? + if format == 'plain' + setf plaintex + elseif format == 'context' + setf context + else " probably LaTeX setf tex endif + return endfun " Context diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim index 296099474..a2f205076 100644 --- a/runtime/macros/matchit.vim +++ b/runtime/macros/matchit.vim @@ -1,7 +1,7 @@ " matchit.vim: (global plugin) Extended "%" matching -" Last Change: Sat May 15 11:00 AM 2004 EDT +" Last Change: Sun Feb 26 10:00 AM 2006 EST " Maintainer: Benji Fisher PhD -" Version: 1.9, for Vim 6.3 +" Version: 1.10, for Vim 6.3 " URL: http://www.vim.org/script.php?script_id=39 " Documentation: @@ -220,6 +220,10 @@ function! s:Match_wrapper(word, forward, mode) range let ini = strpart(group, 0, i-1) let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g') let fin = strpart(group, j) + "Un-escape the remaining , and : characters. + let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') + let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') + let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') " searchpair() requires that these patterns avoid \(\) groups. let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g') let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g') @@ -565,7 +569,7 @@ fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...) if a:branch == "" let currpat = current else - let currpat = substitute(current, a:branch, '\\|', 'g') + let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g') endif while a:string !~ a:prefix . currpat . a:suffix let tail = strpart(tail, i) @@ -577,7 +581,7 @@ fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...) if a:branch == "" let currpat = current else - let currpat = substitute(current, a:branch, '\\|', 'g') + let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g') endif if a:0 let alttail = strpart(alttail, j) -- cgit v1.2.1