
VimSwitch: Use Your Vim Settings Everwhere - whollopfiend
https://priomsrb.github.io/vimswitch/
======
devnonymous
I understand the need to build tools and I would have used this too, if it was
a simple enough bash script with a bunch of aliases and some sweet
bash_completion love.

However, I don't see why I should replace this ...

    
    
      $ mv ~/.vimrc{,~}
      $ mv ~/.vim{,~}
      $ git clone --recursive git@github.com:lonetwin/lonetvim.git ~/.vim
      $ ln -sf ~/.vim/dot_vimrc ~/.vimrc
      # -- work --
    

^profiles^ could just as well be branches ...although, I don't think I have
use for them.

~~~
priomsrb
OP here. VimSwitch does something similar to what your script does. It just
makes it a bit more convenient. Here is a use case that I plan to use it for:

    
    
        # log into production server
        $ vimswitch priomsrb/vimrc
        # -- work --
        $ vimswitch default
        $ logout
    

This puts vim back into it's original state for the next person who logs in.

In future versions I hope to make the above workflow even simpler:

    
    
        # log in to production server
        $ vimswitch --launch priomsrb/vimrc
        # log out
    

The --launch command will launch vim with your settings without altering the
home directory.

~~~
zimbatm
If that's the symptom then I would recommend using different SSH users instead
of everyone sharing the same account. It allows each user to use it's own
config and also makes `who` more useful.

~~~
priomsrb
That's a good point. My example comes from experiences where the only
available users are 'admin' or 'logs'.

------
shawndumas
I am using GNU stow [1] to share more than just Vim (though you could just do
Vim) and it's been easy-breezy.

\-----

[1]: [http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-
to...](http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-
your-dotfiles.html)

------
Sir_Cmpwn
Another option that made the rounds on HN somewhat recently:

[https://github.com/Russell91/sshrc/](https://github.com/Russell91/sshrc/)

------
Slackwise
I just use a Rakefile to do similar. I just clone my Git repo and run 'rake'
in the directory and I'm done. (Same for many other apps.)

[https://github.com/Slackwise/dotfiles/blob/master/vim](https://github.com/Slackwise/dotfiles/blob/master/vim)

------
chintan
One feedback: It would be great if you can add head/title on your webpage. It
just helpful when going through my bookmarks at a later date. Thanks again for
the awesome tool!

<head> <title>VimSwitch: Use Your Vim Settings Everwhere</title> </head>

~~~
priomsrb
Ahh. Thank you for reminding me. It's been added now.

------
esya
How does this work with plugin managers such as Vundle/Pathogen?

~~~
priomsrb
It should work with both as VimSwitch recursively copies ~/.vim. I'm using
Vundle for my own profile without problems.

~~~
mattikus
That assumes you're using submodules or subtree as your versioning mechanism.
If you're using vundle/neobundle, does it do the magic of running the
bootstrap to download your bundles from the internet?

~~~
priomsrb
No, it does not run :BundleInstall for you. Maybe it would be a good idea if
the user could specify some commands to run after downloading a profile. For
example they could add a line in their .vimrc:

    
    
        " vimswitch-after-download=:BundleInstall

