Re: Feed for a Vim plugin?
Mateusz Czaplinski <[email protected]> Tue, 31 Dec 2019 10:44:13 +0100
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <CACZYt3S00XSuwTdLOX6PRe9qsSNH9VeZCCO6FLbW93pafTtQNA@mail.gmail.com> |
--===============5529898302611567994== Content-Type: multipart/alternative; boundary="00000000000023e549059afcce54" --00000000000023e549059afcce54 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks! The VIMPATH approach sounds interesting. A few further questions I'd love if you could help me understand answers to= : 1. Is there a way to find out from command-line which version of a particular "implementation" of a specific "interface" is currently installed? 2. For Vim, I'd like to be able to have it available on Windows in an "Open with" context menu *for all file types*, while not being the "default handler" for any file types. Do 0install desktop integrations allow for such a variation? Thanks again! /Mateusz Czapli=C5=84ski. On Sun, Dec 29, 2019 at 9:41 PM Bastian Eicher <[email protected]> wrote: > You could add the following inside the <implementation> in go-explorer.xm= l > : > > <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. > > > > 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/feeds/go-explore= r.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. > > > > *From:* Mateusz Czaplinski <[email protected]> > *Sent:* Sonntag, 29. Dezember 2019 13:51 > *To:* The Zero Install system <[email protected]> > *Subject:* Re: [Zero-install-devel] Feed for a Vim plugin? > > > > > > > > On Sat, Dec 28, 2019 at 8:41 PM Thomas Leonard <[email protected]> wrote: > > On Fri, 27 Dec 2019 at 00:30, Mateusz Czaplinski <[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 > > > > 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... > > - 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 i= n > a few places of the feed? > > > > > 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. > > > > Thanks! That seemed to work indeed! Still, could you advise how I can the= n > 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 wh= at > absolute directory it is located... > > > > Thanks & Best Regards, > > /Mateusz Czapli=C5=84ski. > _______________________________________________ > Zero-install-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/zero-install-devel > --00000000000023e549059afcce54 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Thanks! The VIMPATH approach sounds interesting.</div= ><div><br></div><div>A few further questions I'd love if you could help= me understand answers to:</div><div><br></div><div>=C2=A0 1. Is there a wa= y to find out from command-line which version of a particular "impleme= ntation" of a specific "interface" is currently installed?</= div><div>=C2=A0 2. For Vim, I'd like to be able to have it available on= Windows in an "Open with" context menu *for all file types*, whi= le not being the "default handler" for any file types. Do 0instal= l desktop integrations allow for such a variation?</div><div><br></div><div= >Thanks again!</div><div>/Mateusz Czapli=C5=84ski.<br></div></div><br><div = class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Dec 29,= 2019 at 9:41 PM Bastian Eicher <<a href=3D"mailto:[email protected]">b= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote"= style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p= adding-left:1ex"><div lang=3D"DE"><div class=3D"gmail-m_690120508278059386W= ordSection1"><p class=3D"MsoNormal"><span lang=3D"EN-US">You could add the = following inside the </span><span style=3D"font-family:Consolas" lang=3D"EN= -US"><implementation></span><span lang=3D"EN-US"> in </span><span sty= le=3D"font-family:Consolas" lang=3D"EN-US">go-explorer.xml</span><span lang= =3D"EN-US">:<u></u><u></u></span></p><p class=3D"MsoNormal"><span style=3D"= font-family:Consolas" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0 <environment nam= e=3D"VIMPATH" insert=3D""/><u></u><u></u></span></p>= <p class=3D"MsoNormal"><span style=3D"font-family:Consolas" lang=3D"EN-US">= =C2=A0=C2=A0=C2=A0 <command name=3D"run"><u></u><u></u></sp= an></p><p class=3D"MsoNormal"><span style=3D"font-family:Consolas" lang=3D"= EN-US">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <runner interface=3D"<a href= =3D"http://repo.roscidus.com/powershell/powershell" target=3D"_blank">http:= //repo.roscidus.com/powershell/powershell</a>"><u></u><u></u></span= ></p><p class=3D"MsoNormal"><span style=3D"font-family:Consolas" lang=3D"EN= -US">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <arg>-Command</arg= ><u></u><u></u></span></p><p class=3D"MsoNormal"><span style=3D"font-fam= ily:Consolas" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <= ;arg>echo $VIMPATH</arg><u></u><u></u></span></p><p class=3D"MsoNo= rmal"><span style=3D"font-family:Consolas" lang=3D"EN-US">=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 </runner><u></u><u></u></span></p><p class=3D"MsoNorm= al"><span style=3D"font-family:Consolas" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0 = </command><u></u><u></u></span></p><p class=3D"MsoNormal"><span lang= =3D"EN-US">Executing </span><span style=3D"font-family:Consolas" lang=3D"EN= -US">0install run <a href=3D"https://raw.githubusercontent.com/akavel/0cata= log/master/feeds/go-explorer.xml" target=3D"_blank">https://raw.githubuserc= ontent.com/akavel/0catalog/master/feeds/go-explorer.xml</a></span><span lan= g=3D"EN-US"> would then print the location the archive was extracted to.<u>= </u><u></u></span></p><p class=3D"MsoNormal"><span lang=3D"EN-US"><u></u>= =C2=A0<u></u></span></p><p class=3D"MsoNormal"><span lang=3D"EN-US">Alterna= tively you could create a local-only feed </span><span style=3D"font-family= :Consolas" lang=3D"EN-US">my-vim.xml</span><span lang=3D"EN-US"> like this:= <u></u><u></u></span></p><p class=3D"MsoNormal"><span style=3D"font-family:= Consolas" lang=3D"EN-US"><interface xmlns=3D"<a href=3D"http://zero= -install.sourceforge.net/2004/injector/interface" target=3D"_blank">http://= zero-install.sourceforge.net/2004/injector/interface</a>"><u></u><u= ></u></span></p><p class=3D"MsoNormal"><span style=3D"font-family:Consolas"= lang=3D"EN-US">=C2=A0 <implementation version=3D"1" id=3D&quo= t;dummy" local-path=3D"C:\Path\To\Vim" main=3D"vim.exe&= quot;><u></u><u></u></span></p><p class=3D"MsoNormal"><span style=3D"fon= t-family:Consolas" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0 <requires interface= =3D"<a href=3D"https://raw.githubusercontent.com/akavel/0catalog/maste= r/feeds/go-explorer.xml" target=3D"_blank">https://raw.githubusercontent.co= m/akavel/0catalog/master/feeds/go-explorer.xml</a>"><u></u><u></u><= /span></p><p class=3D"MsoNormal"><span style=3D"font-family:Consolas" lang= =3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <environment name=3D"VIMP= ATH" insert=3D""/><u></u><u></u></span></p><p class=3D"Ms= oNormal"><span style=3D"font-family:Consolas" lang=3D"EN-US">=C2=A0=C2=A0= =C2=A0 </requires><u></u><u></u></span></p><p class=3D"MsoNormal"><sp= an style=3D"font-family:Consolas" lang=3D"EN-US">=C2=A0 </implementation= ><u></u><u></u></span></p><p class=3D"MsoNormal"><span style=3D"font-fam= ily:Consolas" lang=3D"EN-US"></interface><u></u><u></u></span></p><p = class=3D"MsoNormal"><span lang=3D"EN-US">Executing </span><span style=3D"fo= nt-family:Consolas" lang=3D"EN-US">0install run my-vim.xml</span><span lang= =3D"EN-US"> would launch </span><span style=3D"font-family:Consolas" lang= =3D"EN-US">C:\Path\To\Vim\vim.exe</span><span lang=3D"EN-US"> with the envi= ronment variable </span><span style=3D"font-family:Consolas" lang=3D"EN-US"= >VIMPATH</span><span lang=3D"EN-US"> set to the location the plugin was ext= racted to.<u></u><u></u></span></p><p class=3D"MsoNormal"><span lang=3D"EN-= US"><u></u>=C2=A0<u></u></span></p><p class=3D"MsoNormal"><b><span lang=3D"= EN-US">From:</span></b><span lang=3D"EN-US"> Mateusz Czaplinski <<a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g= t; <br><b>Sent:</b> Sonntag, 29. Dezember 2019 13:51<br><b>To:</b> The Zero= Install system <<a href=3D"mailto:[email protected].= net" target=3D"_blank">[email protected]</a>><br>= <b>Subject:</b> Re: [Zero-install-devel] Feed for a Vim plugin?<u></u><u></= u></span></p><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p><div><div><p cl= ass=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div><p class=3D"MsoNormal"><u><= /u>=C2=A0<u></u></p><div><div><p class=3D"MsoNormal">On Sat, Dec 28, 2019 a= t 8:41 PM Thomas Leonard <<a href=3D"mailto:[email protected]" target=3D"= _blank">[email protected]</a>> wrote:<u></u><u></u></p></div><blockquote = style=3D"border-color:currentcolor currentcolor currentcolor rgb(204,204,20= 4);border-style:none none none solid;border-width:medium medium medium 1pt;= padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm"><p class=3D"Mso= Normal">On Fri, 27 Dec 2019 at 00:30, Mateusz Czaplinski <<a href=3D"mai= lto:[email protected]" target=3D"_blank">[email protected]</a>> wrot= e:<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 c= reate a feed for your custom vim [...]<br>The XML source of this page may g= ive some inspiration:<br><br>=C2=A0 <a href=3D"http://gfxmonk.net/dist/0ins= tall/vim-custom.xml" target=3D"_blank">http://gfxmonk.net/dist/0install/vim= -custom.xml</a><u></u><u></u></p></blockquote><div><p class=3D"MsoNormal"><= u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">I looked into this= file, but I don't yet understand some aspects of it. Specifically:<u><= /u><u></u></p></div><div><p class=3D"MsoNormal">- there seems to be some &q= uot;vim-custom-<ID>.tgz" file referenced; not sure what's (s= upposed 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... <u></u><u></u></p></div><div><p c= lass=3D"MsoNormal">- in my .vimrc, how can I get the list of plugins availa= ble, and how to find their paths? is it somehow done with the VIMPATH env v= ar refrenced in a few places of the feed?<u></u><u></u></p></div><div><p cl= ass=3D"MsoNormal">=C2=A0<u></u><u></u></p></div><blockquote style=3D"border= -color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style= :none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm= 0cm 6pt;margin-left:4.8pt;margin-right:0cm"><p class=3D"MsoNormal">> An= y ideas how I could make it download successfully, and how I can<br>> th= en 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.<u><= /u><u></u></p></blockquote><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u>= </p></div><div><p class=3D"MsoNormal">Thanks! That seemed to work indeed! S= till, could you advise how I can then find out the directory in the 0instal= l caches where some particular feed got downloaded and unpacked? I tried `0= install 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.= ..<u></u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u><= /p></div><p class=3D"MsoNormal">Thanks & Best Regards,<u></u><u></u></p= ></div><div><p class=3D"MsoNormal">/Mateusz Czapli=C5=84ski.<u></u><u></u><= /p></div></div></div></div>_______________________________________________<= br> Zero-install-devel mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blan= k">[email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/zero-install-devel"= rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/l= istinfo/zero-install-devel</a><br> </blockquote></div> --00000000000023e549059afcce54-- --===============5529898302611567994== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============5529898302611567994== 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 --===============5529898302611567994==--