Skip to content

Commit 82038d7

Browse files
committed
updated for version 7.1b
1 parent e34bd1f commit 82038d7

17 files changed

Lines changed: 371 additions & 70 deletions

runtime/autoload/getscript.vim

Lines changed: 77 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
" ---------------------------------------------------------------------
22
" getscript.vim
33
" Author: Charles E. Campbell, Jr.
4-
" Date: Nov 27, 2006
5-
" Version: 23
4+
" Date: May 05, 2007
5+
" Version: 25
66
" Installing: :help glvs-install
77
" Usage: :help glvs
88
"
@@ -15,14 +15,14 @@ if &cp
1515
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
1616
finish
1717
endif
18-
let s:keepfo = &fo
1918
let s:keepcpo = &cpo
2019
set cpo&vim
20+
"DechoTabOn
2121

2222
if exists("g:loaded_getscript")
2323
finish
2424
endif
25-
let g:loaded_getscript= "v23"
25+
let g:loaded_getscript= "v25"
2626

2727
" ---------------------------------------------------------------------
2828
" Global Variables: {{{1
@@ -278,22 +278,28 @@ fun! s:GetOneScript(...)
278278
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".fname.")=".filereadable(fname))
279279
if filereadable(fname)
280280
" call Decho("move <".fname."> to ".s:autoinstall)
281-
" call Decho("DISABLED for testing")
282281
exe "silent !".g:GetLatestVimScripts_mv." ".fname." ".s:autoinstall
283282
let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
283+
" call Decho("exe cd ".s:autoinstall)
284284
exe "cd ".s:autoinstall
285+
286+
" decompress
285287
if fname =~ '\.bz2$'
286288
" call Decho("attempt to bunzip2 ".fname)
287289
exe "silent !bunzip2 ".fname
288290
let fname= substitute(fname,'\.bz2$','','')
291+
" call Decho("new fname<".fname."> after bunzip2")
289292
elseif fname =~ '\.gz$'
290293
" call Decho("attempt to gunzip ".fname)
291294
exe "silent !gunzip ".fname
292295
let fname= substitute(fname,'\.gz$','','')
296+
" call Decho("new fname<".fname."> after gunzip")
293297
endif
298+
299+
" distribute archive(.zip, .tar, .vba) contents
294300
if fname =~ '\.zip$'
295301
" call Decho("attempt to unzip ".fname)
296-
exe "silent !unzip -o".fname
302+
exe "silent !unzip -o ".fname
297303
elseif fname =~ '\.tar$'
298304
" call Decho("attempt to untar ".fname)
299305
exe "silent !tar -xvf ".fname
@@ -304,10 +310,13 @@ fun! s:GetOneScript(...)
304310
so %
305311
q
306312
endif
313+
307314
if fname =~ '.vim$'
308315
" call Decho("attempt to simply move ".fname." to plugin")
309316
exe "silent !".g:GetLatestVimScripts_mv." ".fname." plugin"
310317
endif
318+
319+
" helptags step
311320
let docdir= substitute(&rtp,',.*','','e')."/doc"
312321
" call Decho("helptags docdir<".docdir.">")
313322
exe "helptags ".docdir
@@ -318,7 +327,7 @@ fun! s:GetOneScript(...)
318327
" update the data in the <GetLatestVimScripts.dat> file
319328
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
320329
call setline(line("."),modline)
321-
" call Decho("modline<".modline."> (updated GetLatestVimScripts.dat file)")
330+
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
322331
endif
323332

324333
" restore options
@@ -351,10 +360,11 @@ fun! getscript#GetLatestVimScripts()
351360
break
352361
endif
353362
if filereadable(datadir."GetLatestVimScripts.dat")
354-
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
355-
break
363+
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
364+
break
356365
endif
357366
endfor
367+
358368
" Sanity checks: readability and writability
359369
if datadir == ""
360370
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
@@ -399,63 +409,84 @@ fun! getscript#GetLatestVimScripts()
399409
" call Decho(" ")
400410
" call Decho("searching plugins for GetLatestVimScripts dependencies")
401411
let lastline = line("$")
402-
let plugins = globpath(&rtp,"plugin/*.vim")
412+
" call Decho("lastline#".lastline)
413+
let plugins = split(globpath(&rtp,"plugin/*.vim"))
403414
let foundscript = 0
415+
let firstdir= ""
404416

405-
" call Decho("plugins<".plugins."> lastline#".lastline)
406-
while plugins != ""
407-
let plugin = substitute(plugins,'\n.*$','','e')
408-
let plugins= (plugins =~ '\n')? substitute(plugins,'^.\{-}\n\(.*\)$','\1','e') : ""
417+
for plugin in plugins
418+
419+
" don't process plugins in system directories
420+
if firstdir == ""
421+
let firstdir= substitute(plugin,'[/\\][^/\\]\+$','','')
422+
" call Decho("firstdir<".firstdir.">")
423+
else
424+
let curdir= substitute(plugin,'[/\\][^/\\]\+$','','')
425+
" call Decho("curdir<".curdir.">")
426+
if curdir != firstdir
427+
break
428+
endif
429+
endif
430+
431+
" read plugin in
409432
$
433+
" call Decho(" ")
410434
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
411435
exe "silent r ".plugin
436+
412437
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
413438
let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
414439
let llp1 = lastline+1
415-
416-
if newscript !~ '^"'
417-
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
418-
let curline = line(".")
419-
let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
420-
exe llp1
421-
let srchline = search('\<'.noai_script.'\>','bW')
422-
" call Decho("..newscript<".newscript."> noai_script<".noai_script."> srch=".srchline." lastline=".lastline)
423-
424-
if srchline == 0
425-
" found a new script to permanently include in the datafile
426-
let keep_rega = @a
427-
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
428-
exe lastline."put a"
429-
echomsg "Appending <".@a."> to ".datafile." for ".newscript
430-
" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
431-
let @a = keep_rega
432-
let lastline = llp1
433-
let curline = curline + 1
434-
let foundscript = foundscript + 1
435-
" else " Decho
436-
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
437-
endif
438-
439-
let curline = curline + 1
440-
exe curline
441-
endif
442-
440+
" call Decho("..newscript<".newscript.">")
441+
442+
" don't process ""GetLatestVimScripts lines
443+
if newscript !~ '^"'
444+
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
445+
let curline = line(".")
446+
let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
447+
exe llp1
448+
let srchline = search('\<'.noai_script.'\>','bW')
449+
" call Decho("..noai_script<".noai_script."> srch=".srchline."curline#".line(".")." lastline#".lastline)
450+
451+
if srchline == 0
452+
" found a new script to permanently include in the datafile
453+
let keep_rega = @a
454+
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
455+
exe lastline."put a"
456+
echomsg "Appending <".@a."> to ".datafile." for ".newscript
457+
" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
458+
let @a = keep_rega
459+
let lastline = llp1
460+
let curline = curline + 1
461+
let foundscript = foundscript + 1
462+
" else " Decho
463+
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
464+
endif
465+
466+
let curline = curline + 1
467+
exe curline
468+
endif
443469
endwhile
470+
444471
let llp1= lastline + 1
445472
" call Decho(".deleting lines: ".llp1.",$d")
446473
exe "silent! ".llp1.",$d"
447-
endwhile
474+
endfor
475+
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
476+
" call Decho(" ")
448477

449478
if foundscript == 0
450479
set nomod
451480
endif
452481

453482
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
483+
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
454484
set lz
455-
" call Decho(" --- end of dependency checking loop --- ")
456-
" call Decho("call GetOneScript on lines at end of datafile<".datafile.">")
457485
1
458-
/^-----/,$g/^\s*\d/call <SID>GetOneScript()
486+
" /^-----/,$g/^\s*\d/call Decho(getline("."))
487+
1
488+
/^-----/,$g/^\s*\d/call s:GetOneScript()
489+
" call Decho("--- end out-of-date checking --- ")
459490

460491
" Final report (an echomsg)
461492
try
@@ -495,7 +526,6 @@ endfun
495526
" ---------------------------------------------------------------------
496527

497528
" Restore Options: {{{1
498-
let &fo = s:keepfo
499529
let &cpo= s:keepcpo
500530

501531
" vim: ts=8 sts=2 fdm=marker nowrap

runtime/doc/develop.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim version 7.1a. Last change: 2006 Sep 26
1+
*develop.txt* For Vim version 7.1b. Last change: 2007 May 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -437,7 +437,7 @@ the best method is. Alternatives:
437437
seconds for English, which can be acceptable for interactive use. But for
438438
some languages it takes more than ten seconds (e.g., German, Catalan),
439439
which is unacceptable slow. For batch processing (automatic corrections)
440-
it's to slow for all languages.
440+
it's too slow for all languages.
441441
2. Use a trie for the soundfolded words, so that searching can be done just
442442
like how it works without soundfolding. This requires remembering a list
443443
of good words for each soundfolded word. This makes finding matches very
@@ -471,7 +471,7 @@ initialized from words listed in COMMON items in the affix file, so that it
471471
also works when starting a new file.
472472

473473
This isn't ideal, because the longer Vim is running the higher the counts
474-
become. But in practice it is a noticable improvement over not using the word
474+
become. But in practice it is a noticeable improvement over not using the word
475475
count.
476476

477477
==============================================================================

runtime/doc/digraph.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*digraph.txt* For Vim version 7.1a. Last change: 2006 Jul 18
1+
*digraph.txt* For Vim version 7.1b. Last change: 2006 Jul 18
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/editing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*editing.txt* For Vim version 7.1a. Last change: 2006 Oct 10
1+
*editing.txt* For Vim version 7.1b. Last change: 2006 Oct 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/if_pyth.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*if_pyth.txt* For Vim version 7.1a. Last change: 2006 Apr 30
1+
*if_pyth.txt* For Vim version 7.1b. Last change: 2006 Apr 30
22

33

44
VIM REFERENCE MANUAL by Paul Moore

runtime/doc/netbeans.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*netbeans.txt* For Vim version 7.1a. Last change: 2006 Nov 14
1+
*netbeans.txt* For Vim version 7.1b. Last change: 2006 Nov 14
22

33

44
VIM REFERENCE MANUAL by Gordon Prieur

runtime/doc/os_beos.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*os_beos.txt* For Vim version 7.1a. Last change: 2005 Mar 29
1+
*os_beos.txt* For Vim version 7.1b. Last change: 2005 Mar 29
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/quickref.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*quickref.txt* For Vim version 7.1a. Last change: 2006 Nov 18
1+
*quickref.txt* For Vim version 7.1b. Last change: 2006 Nov 18
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/sponsor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*sponsor.txt* For Vim version 7.1a. Last change: 2007 Jan 05
1+
*sponsor.txt* For Vim version 7.1b. Last change: 2007 Jan 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/uganda.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*uganda.txt* For Vim version 7.1a. Last change: 2007 Jan 05
1+
*uganda.txt* For Vim version 7.1b. Last change: 2007 May 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -13,6 +13,7 @@ below or visit the ICCF web site, available at these URLs:
1313

1414
http://iccf-holland.org/
1515
http://www.vim.org/iccf/
16+
http://www.iccf.nl/
1617

1718
You can also sponsor the development of Vim. Vim sponsors can vote for
1819
features. See |sponsor|. The money goes to Uganda anyway.

0 commit comments

Comments
 (0)