[vim/vim] Fix GetLatestVimScript and get it working again, including on Windows (Issue #13898)

39 views
Skip to first unread message

Timothy Madden

unread,
Jan 22, 2024, 12:44:39 AM1/22/24
to vim/vim, Subscribed

The built-in :GetLatestVimScripts command is long time out of date. To my knowledge it never worked as intended for Windows OS

Yes, I know plugin managers like Vundle are much better !

But ... it is good to have some basic plugin management built into Vim by default, that works out-of-the box. And for single-file scripts and colorschemes, I don't really want a git clone, or a separate &runtimepath entry for each of them, like Vundle does ...

The original author appears to have stopped development in 2013. The current version is no longer working, on both Windows and Linux. But I had a look into the script and found a chain of simple enough issues for Widnows OS:

  • The vim scripts website is no longer on http://vim.sourceforge.net/, but on https://www.vim.org/scripts/
  • The default "Move" command in g:GetLatestVimScripts_mv (equivalent to mv on Linux) should be the cmd Move command instead of Ren (because for Windows Rename command can rename files only in the strict sense (changing the basename), without implying a move)
  • The default "wget" command in g:GetLatestVimScripts_wget should be curl instead of wget, because curl command is now available by default with Windows
  • The default options for curl should change from -s -O to -s -o (lowercase 'o' instead of uppercase), or better yet, use the long form of the options
  • The decompress and extract commands used internally (bunzip2, gunzip, unxz, tar, unzip should have associated variables like g:GetLatestVimScripts_unxz, and for Windows these should by default invoke 7-zip, except for tar which is again available with Windows. A dependency on 7-zip should be documented for Windows OS
  • Errors are not properly reported when above external tools are missing or do not work. The script should check v:shell_error variable (or similar) when running the external commands

I think these fixes are simple enough that I can make a PR for it, would it be acceptable ?

Otherwise, I could still get the script to work, but I had to write a wrapper script around curl, that translates the old URLs from the command line to the new URLS (from vim.sourceforge.net to www.vim.org/scripts), and similarly I had to create wrapper .cmd scripts for the Linux tools like unxz, unzip ... that internally invoke 7-zip


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/13898@github.com>

Timothy Madden

unread,
Jan 23, 2024, 2:18:47 AM1/23/24
to vim/vim, Subscribed

Uploaded a 'patch' type script to vim.org/scripts, that can apply all the above fixes. The default tar tool on Windows may still be limited though and not support all the expected archive types.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/13898/1905431905@github.com>

Maxim Kim

unread,
Jan 23, 2024, 3:18:40 AM1/23/24
to vim_dev
I think it would be better to either contact Charles E. Campbell or do it with PR against vim repo.

Christian Brabandt

unread,
Jan 23, 2024, 5:35:54 PM1/23/24
to vim/vim, Subscribed

I am surprised there are actually still users of :GetLatestVimScripts. If you want to make some changes, please go ahead. Thank you.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/13898/1907034894@github.com>

Phạm Bình An

unread,
Mar 27, 2025, 5:53:53 AMMar 27
to vim/vim, Subscribed

Isn't this already fixed by https://github.com/vim/vim/pull/15640/files

I am surprised there are actually still users of :GetLatestVimScripts

So maybe Vim should remove this feature? It hadn't worked for a long time, and there was no attempt to fix it until 8 months after it was discovered that it doesn't work

Also may I ask if Vim is still planning for another built-in plugin manager, like what's said in :h todo.txt?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/13898/2757417529@github.com>

brianhusterbrianhuster left a comment (vim/vim#13898)

Isn't this already fixed by https://github.com/vim/vim/pull/15640/files

I am surprised there are actually still users of :GetLatestVimScripts

So maybe Vim should remove this feature? It hadn't worked for a long time, and there was no attempt to fix it until 8 months after it was discovered that it doesn't work

Also may I ask if Vim is still planning for another built-in plugin manager, like what's said in :h todo.txt?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/13898/2757417529@github.com>

Reply all
Reply to author
Forward
0 new messages