Quantcast

isolate vim environment for plugin development

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 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
Loading...