" Version: 36
" Installing: :help glvs-install
" Usage: :help glvs
+" Last Change: {{{1
+" 2024 Sep 08 by Vim Project: several small fixes
+" }}}
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
if g:GetLatestVimScripts_wget == "wget"
let g:GetLatestVimScripts_options= "-q -O"
elseif g:GetLatestVimScripts_wget == "curl"
- let g:GetLatestVimScripts_options= "-s -O"
+ let g:GetLatestVimScripts_options= "-s -o"
else
let g:GetLatestVimScripts_options= ""
endif
" set up default scriptaddr address
if !exists("g:GetLatestVimScripts_scriptaddr")
- let g:GetLatestVimScripts_scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='
+ let g:GetLatestVimScripts_scriptaddr = 'https://www.vim.org/scripts/script.php?script_id='
+endif
+
+if !exists("g:GetLatestVimScripts_downloadaddr")
+ let g:GetLatestVimScripts_downloadaddr = 'https://www.vim.org/scripts/download_script.php?src_id='
endif
"" For debugging:
let s:autoinstall= ""
if g:GetLatestVimScripts_allowautoinstall
- if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash"
+ if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell !~ '\cbash\|pwsh\|powershell'
" windows (but not cygwin/bash)
let s:dotvim= "vimfiles"
if !exists("g:GetLatestVimScripts_mv")
- let g:GetLatestVimScripts_mv= "ren"
+ let g:GetLatestVimScripts_mv= "move"
endif
else
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
" call Decho("lastline#".lastline)
- let firstdir = substitute(&rtp,',.*$','','')
+ let firstdir = substitute(&rtp,',.{-}$','','')
let plugins = split(globpath(firstdir,"plugin/**/*.vim"),'\n')
- let plugins = plugins + split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n')
+ let plugins += split(globpath(firstdir,"ftplugin/**/*.vim"),'\n')
+ let plugins += split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n')
let foundscript = 0
" this loop updates the GetLatestVimScripts.dat file
" call Decho(".downloading new <".sname.">")
echomsg ".downloading new <".sname.">"
if has("win32") || has("win16") || has("win95")
-" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
- new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)|q
+" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)."|q")
+ new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)|q
else
-" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='))
- exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=').latestsrcid
+" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr).latestsrcid
+ exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr).latestsrcid
endif
" --------------------------------------------------------------------------
" call Decho("no decompression needed")
endif
- " distribute archive(.zip, .tar, .vba, ...) contents
+ " distribute archive(.zip, .tar, .vba, .vmb, ...) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".shellescape(sname)
elseif sname =~ '\.txz$'
" call Decho("dearchive: attempt to untar+xz ".sname)
exe "silent !tar -Jxvf ".shellescape(sname)
- elseif sname =~ '\.vba$'
+ elseif sname =~ '\.vba$\|\.vmb$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split
if exists("g:vimball_home")
-*pi_getscript.txt* For Vim version 9.1. Last change: 2017 Aug 01
+*pi_getscript.txt* For Vim version 9.1. Last change: 2024 Sep 08
>
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
<
Getscript is a plugin that simplifies retrieval of the latest versions of the
scripts that you yourself use! Typing |:GLVS| will invoke getscript; it will
then use the <GetLatestVimScripts.dat> (see |GetLatestVimScripts_dat|) file to
-get the latest versions of scripts listed therein from http://vim.sf.net/.
+get the latest versions of scripts listed therein from https://www.vim.org/.
==============================================================================
1. Contents *glvs-contents* *glvs* *getscript*
Your computer needs to have wget or curl for GetLatestVimScripts to do its work.
- 1. if compressed: gunzip getscript.vba.gz
+ 1. if compressed: gunzip getscript.vmb.gz
2. Unix:
- vim getscript.vba
+ vim getscript.vmb
:so %
:q
cd ~/.vim/GetLatest
list of desired plugins -- see |GetLatestVimScripts_dat|)
3. Windows:
- vim getscript.vba
+ vim getscript.vmb
:so %
:q
cd **path-to-vimfiles**/GetLatest
---.tar.bz2 : decompressed & untarred in .vim/ directory
---.vba.bz2 : decompressed in .vim/ directory, then vimball handles it
+ ---.vmb.bz2 : decompressed in .vim/ directory, then vimball handles it
---.vim.bz2 : decompressed & moved into .vim/plugin directory
---.tar.gz : decompressed & untarred in .vim/ directory
---.vba.gz : decompressed in .vim/ directory, then vimball handles it
+ ---.vmb.gz : decompressed in .vim/ directory, then vimball handles it
---.vim.gz : decompressed & moved into .vim/plugin directory
- ---.vba : unzipped in .vim/ directory
+ ---.vba : moved to .vim/ directory, then vimball handles it
+ ---.vmb : moved to .vim/ directory, then vimball handles it
---.vim : moved to .vim/plugin directory
---.zip : unzipped in .vim/ directory
The <blockhl.vim> script provides block highlighting for C/C++ programs; it is
available at:
- http://vim.sourceforge.net/scripts/script.php?script_id=104
+ https://www.vim.org/scripts/script.php?script_id=104
Currently, vim's after/syntax only supports by-filetype scripts (in
blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install would
In my own case, I use <aftersyntax.vim> (renamed to after/syntax/c.vim) to
allow a after/syntax/c/ directory:
- http://vim.sourceforge.net/scripts/script.php?script_id=1023
+ https://www.vim.org/scripts/script.php?script_id=1023
The script allows multiple syntax files to exist separately in the
after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and build an
Doesn't override vimball installation.
>
g:GetLatestVimScripts_scriptaddr
-< default='http://vim.sourceforge.net/script.php?script_id='
+< default='https://www.vim.org/scripts/script.php?script_id='
Override this if your system needs
- ... ='http://vim.sourceforge.net/script/script.php?script_id='
-
+ ... ='http://vim.sourceforge.net/script.php?script_id='
+>
+ g:GetLatestVimScripts_downloadaddr
+< default='https://www.vim.org/scripts/download_script.php?src_id='
+ Override this if your system needs
+ ... ='http://vim.sourceforge.net/scripts/download_script.php?src_id='
+>
==============================================================================
8. GetLatestVimScripts Algorithm *glvs-algorithm* *glvs-alg*
The Vim sourceforge page dynamically creates a page by keying off of the
so-called script-id. Within the webpage of
- http://vim.sourceforge.net/scripts/script.php?script_id=40
+ https://www.vim.org/scripts/script.php?script_id=40
is a line specifying the latest source-id (src_id). The source identifier
numbers are always increasing, hence if the src_id is greater than the one