Re: Feed for a Vim plugin?
"Bastian Eicher" <[email protected]> Sun, 29 Dec 2019 21:25:18 +0100
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multipart message in MIME format.
--===============4511068150217672643==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_001C_01D5BE8E.784DDD60"
Content-Language: de
This is a multipart message in MIME format.
------=_NextPart_000_001C_01D5BE8E.784DDD60
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
You could add the following inside the <implementation> in =
go-explorer.xml:
<environment name=3D"VIMPATH" insert=3D""/>
<command name=3D"run">
<runner =
interface=3D"http://repo.roscidus.com/powershell/powershell">
<arg>-Command</arg>
<arg>echo $VIMPATH</arg>
</runner>
</command>
Executing 0install run =
https://raw.githubusercontent.com/akavel/0catalog/master/feeds/go-explore=
r.xml would then print the location the archive was extracted to.
=20
Alternatively you could create a local-only feed my-vim.xml like this:
<interface =
xmlns=3D"http://zero-install.sourceforge.net/2004/injector/interface">
<implementation version=3D"1" id=3D"dummy" =
local-path=3D"C:\Path\To\Vim" main=3D"vim.exe">
<requires =
interface=3D"https://raw.githubusercontent.com/akavel/0catalog/master/fee=
ds/go-explorer.xml">
<environment name=3D"VIMPATH" insert=3D""/>
</requires>
</implementation>
</interface>
Executing 0install run my-vim.xml would launch C:\Path\To\Vim\vim.exe =
with the environment variable VIMPATH set to the location the plugin was =
extracted to.
=20
From: Mateusz Czaplinski <[email protected]>=20
Sent: Sonntag, 29. Dezember 2019 13:51
To: The Zero Install system <[email protected]>
Subject: Re: [Zero-install-devel] Feed for a Vim plugin?
=20
=20
=20
On Sat, Dec 28, 2019 at 8:41 PM Thomas Leonard <[email protected] =
<mailto:[email protected]> > wrote:
On Fri, 27 Dec 2019 at 00:30, Mateusz Czaplinski <[email protected] =
<mailto:[email protected]> > wrote:
>
> Hi!
>
> I'd like to create a feed for a Vim editor plugin. I would like to
> then be able to install/download it with 0install, and somehow
> retrieve the local path where it was unpacked, so that I could
> reference this path from my .vimrc file. (How) can I do it with
> 0install?
One way to do this is to create a feed for your custom vim [...]
The XML source of this page may give some inspiration:
http://gfxmonk.net/dist/0install/vim-custom.xml
=20
I looked into this file, but I don't yet understand some aspects of it. =
Specifically:
- there seems to be some "vim-custom-<ID>.tgz" file referenced; not sure =
what's (supposed to be) in it...? I must say I'd prefer if I didn't have =
to host some special vim tweaks in a custom-tailored tarball, I'd love =
if I could just use a vanilla vim tarball...=20
- in my .vimrc, how can I get the list of plugins available, and how to =
find their paths? is it somehow done with the VIMPATH env var refrenced =
in a few places of the feed?
=20
> Any ideas how I could make it download successfully, and how I can
> then get the local path where it was unpacked, ideally from a script?
You could solve this with `--command=3D` to tell it you're not planning
to run the plugin directly, but the above approach might be better.
=20
Thanks! That seemed to work indeed! Still, could you advise how I can =
then find out the directory in the 0install caches where some particular =
feed got downloaded and unpacked? I tried `0install store =
list-implementations <my-name>` - it seems to show the hash, but not =
sure how I can know in what absolute directory it is located...
=20
Thanks & Best Regards,
/Mateusz Czapli=C5=84ski.
------=_NextPart_000_001C_01D5BE8E.784DDD60
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DDE link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
lang=3DEN-US style=3D'mso-fareast-language:EN-US'>You could add the =
following inside the </span><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'><implementat=
ion></span><span lang=3DEN-US style=3D'mso-fareast-language:EN-US'> =
in </span><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>go-explorer.xml=
</span><span lang=3DEN-US =
style=3D'mso-fareast-language:EN-US'>:<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0 <environment name=3D"VIMPATH" =
insert=3D""/><o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0 <command name=3D"run"><o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 <runner =
interface=3D"http://repo.roscidus.com/powershell/powershell">=
;<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<arg>-Command</arg><o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <arg>echo =
$VIMPATH</arg><o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 </runner><o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0 </command><o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US style=3D'mso-fareast-language:EN-US'>Executing </span><span =
lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>0install run =
https://raw.githubusercontent.com/akavel/0catalog/master/feeds/go-explore=
r.xml</span><span lang=3DEN-US style=3D'mso-fareast-language:EN-US'> =
would then print the location the archive was extracted =
to.<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'mso-fareast-language:EN-US'><o:p> </o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'mso-fareast-language:EN-US'>Alternatively you could create a =
local-only feed </span><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>my-vim.xml</spa=
n><span lang=3DEN-US style=3D'mso-fareast-language:EN-US'> like =
this:<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'><interface =
xmlns=3D"http://zero-install.sourceforge.net/2004/injector/interface=
"><o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0 =
<implementation version=3D"1" id=3D"dummy" =
local-path=3D"C:\Path\To\Vim" =
main=3D"vim.exe"><o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0 <requires =
interface=3D"https://raw.githubusercontent.com/akavel/0catalog/maste=
r/feeds/go-explorer.xml"><o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 <environment name=3D"VIMPATH" =
insert=3D""/><o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0=C2=A0=C2=
=A0 </requires><o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>=C2=A0 =
</implementation><o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'></interface&=
gt;<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'mso-fareast-language:EN-US'>Executing </span><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>0install run =
my-vim.xml</span><span lang=3DEN-US =
style=3D'mso-fareast-language:EN-US'> would launch </span><span =
lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>C:\Path\To\Vim\=
vim.exe</span><span lang=3DEN-US style=3D'mso-fareast-language:EN-US'> =
with the environment variable </span><span lang=3DEN-US =
style=3D'font-family:Consolas;mso-fareast-language:EN-US'>VIMPATH</span><=
span lang=3DEN-US style=3D'mso-fareast-language:EN-US'> set to the =
location the plugin was extracted to.<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'mso-fareast-language:EN-US'><o:p> </o:p></span></p><p =
class=3DMsoNormal><b><span lang=3DEN-US>From:</span></b><span =
lang=3DEN-US> Mateusz Czaplinski <[email protected]> =
<br><b>Sent:</b> Sonntag, 29. Dezember 2019 13:51<br><b>To:</b> The Zero =
Install system =
<[email protected]><br><b>Subject:</b> Re: =
[Zero-install-devel] Feed for a Vim plugin?<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p> </o:p></p><div><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><p =
class=3DMsoNormal><o:p> </o:p></p><div><div><p class=3DMsoNormal>On =
Sat, Dec 28, 2019 at 8:41 PM Thomas Leonard <<a =
href=3D"mailto:[email protected]">[email protected]</a>> =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm =
6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=3DMsoNormal>On Fri, =
27 Dec 2019 at 00:30, Mateusz Czaplinski <<a =
href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>> wrote:<br>><br>> =
Hi!<br>><br>> I'd like to create a feed for a Vim editor plugin. I =
would like to<br>> then be able to install/download it with 0install, =
and somehow<br>> retrieve the local path where it was unpacked, so =
that I could<br>> reference this path from my .vimrc file. (How) can =
I do it with<br>> 0install?<br><br>One way to do this is to create a =
feed for your custom vim [...]<br>The XML source of this page may give =
some inspiration:<br><br> <a =
href=3D"http://gfxmonk.net/dist/0install/vim-custom.xml" =
target=3D"_blank">http://gfxmonk.net/dist/0install/vim-custom.xml</a><o:p=
></o:p></p></blockquote><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><div><p class=3DMsoNormal>I =
looked into this file, but I don't yet understand some aspects of it. =
Specifically:<o:p></o:p></p></div><div><p class=3DMsoNormal>- there =
seems to be some "vim-custom-<ID>.tgz" file referenced; =
not sure what's (supposed to be) in it...? I must say I'd prefer if I =
didn't have to host some special vim tweaks in a custom-tailored =
tarball, I'd love if I could just use a vanilla vim tarball... =
<o:p></o:p></p></div><div><p class=3DMsoNormal>- in my .vimrc, how can I =
get the list of plugins available, and how to find their paths? is it =
somehow done with the VIMPATH env var refrenced in a few places of the =
feed?<o:p></o:p></p></div><div><p =
class=3DMsoNormal> <o:p></o:p></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm =
6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=3DMsoNormal>> Any =
ideas how I could make it download successfully, and how I can<br>> =
then get the local path where it was unpacked, ideally from a =
script?<br><br>You could solve this with `--command=3D` to tell it =
you're not planning<br>to run the plugin directly, but the above =
approach might be better.<o:p></o:p></p></blockquote><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><div><p =
class=3DMsoNormal>Thanks! That seemed to work indeed! Still, could you =
advise how I can then find out the directory in the 0install caches =
where some particular feed got downloaded and unpacked? I tried =
`0install store list-implementations <my-name>` - it seems to show =
the hash, but not sure how I can know in what absolute directory it is =
located...<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><p class=3DMsoNormal>Thanks =
& Best Regards,<o:p></o:p></p></div><div><p =
class=3DMsoNormal>/Mateusz =
Czapli=C5=84ski.<o:p></o:p></p></div></div></div></body></html>
------=_NextPart_000_001C_01D5BE8E.784DDD60--
--===============4511068150217672643==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4511068150217672643==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Zero-install-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/zero-install-devel
--===============4511068150217672643==--