Quantcast

isolate vim environment for plugin development

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

isolate vim environment for plugin development

Felipe Vieira
Dear vim mailing list,

how do I isolate vim environment?

The objective is to test and develop several different plugins without interference.

I don't want to mess my own vim "stable" setup.

For that end a setup with its own vimrc file, own variables (for instance using a different $HOME than the one used by vim) and folders would be nice.

I was trying to do this thru a bash script but could not achieve the desired goals (changing the $HOME variable and setting up vim with a different vimrc was not enough).

So before diving into details/scripting/etc I would like to know if you guys have a working solution.

Best,

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: isolate vim environment for plugin development

KF Leong-2
You can use a portable environment to isolate your setup and for testing.

http://portableapps.com/apps/development/gvim_portable

HTH,
KF

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: isolate vim environment for plugin development

hermitte
In reply to this post by Felipe Vieira
Hi,


> how do I isolate vim environment?
>
> The objective is to test and develop several different plugins
> without interference.
>
> I don't want to mess my own vim "stable" setup.
>
> For that end a setup with its own vimrc file, own variables (for
> instance using a different $HOME than the one used by vim) and
> folders would be nice.
>
> I was trying to do this thru a bash script but could not achieve the
> desired goals (changing the $HOME variable and setting up vim with a
> different vimrc was not enough).
>
> So before diving into details/scripting/etc I would like to know if
> you guys have a working solution.

New plugins are loaded through a plugin manager (VAM). In order to not add mess in all sessions, I simply Activate manually the Addons where I test them.

Regarding the maintenance of core plugins that may impact every other plugins (that's the case with my lh-vim-lib library plugin). I do branches and I don't reload the (auto/ft/0)plugin in the session I use to maintain my vim scripts. However I load and reload plugins either manually, or by restarting my (g)vim testing sessions if the changes are to complex. If I need to revert to a stable situation, I just need to checkout the stable branch.

I also have unit tests where I check the result of vim functions, and integrated test where I execute more complex sequences and check the state of my buffer afterwards. The unit tests can be executed from within a vim session [1]. The integrated tests are executed with vimrunner and a small addition that enable me to check the results on travis -- which permits me to check the behaviour of my plugin of a old vim 7.3-429.


I guess that instead of fighting with $HOME, you could also use Vim 8 packages. In "normal" sessions, load the default package, in test sessions, load sessions associated to the plugins being modified. IMO vim already has everything we need on this topic. Of course we also need a clear workflow that takes advantage of this.

[1] https://github.com/LucHermitte/vim-UT

--
Luc Hermitte

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: isolate vim environment for plugin development

Pongthep Kulkrisada
In reply to this post by Felipe Vieira
Hi Felipe,

* Felipe Vieira ([hidden email]) wrote:

> how do I isolate vim environment?
>
> The objective is to test and develop several different plugins without
> interference.
>
> I don't want to mess my own vim "stable" setup.
>
> For that end a setup with its own vimrc file, own variables (for instance
> using a different $HOME than the one used by vim) and folders would be nice.
>
> I was trying to do this thru a bash script but could not achieve the desired
> goals (changing the $HOME variable and setting up vim with a different vimrc
> was not enough).
In BSD world we call it "jail" or "chroot".
But if you use Linux, sorry I don't know.

--
Pongthep Kulkrisada
 
"UNIX is basically a simple operating system,
but you have to be a genius to understand the simplicity."
-- Dennis M. Ritchie

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: isolate vim environment for plugin development

Paul-4
In reply to this post by Felipe Vieira
I found the best way is to simply move away the ~/.vim/ directory. You could also try using a Docker approach…

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: isolate vim environment for plugin development

Felipe Vieira
In reply to this post by Felipe Vieira
On Thursday, March 9, 2017 at 4:27:02 PM UTC-3, Felipe Vieira wrote:

> Dear vim mailing list,
>
> how do I isolate vim environment?
>
> The objective is to test and develop several different plugins without interference.
>
> I don't want to mess my own vim "stable" setup.
>
> For that end a setup with its own vimrc file, own variables (for instance using a different $HOME than the one used by vim) and folders would be nice.
>
> I was trying to do this thru a bash script but could not achieve the desired goals (changing the $HOME variable and setting up vim with a different vimrc was not enough).
>
> So before diving into details/scripting/etc I would like to know if you guys have a working solution.
>
> Best,
Guys I have developed my own method. It looks robust now and allows me to isolate plugins from each other and start with a very minimal vimrc.

I'm posting here because it may be useful to others.

In order to properly initialize the plugin one may have to modify the code to copy the plugins content to the appropriate path in 'packpathdir'.

But it works great!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

vim_isolate.zip (1K) Download Attachment
Loading...