vimvsvim

Avoid dual maintaining vimrc and vsvimrc files


I just discovered keithn/vsvimguide for using VsVim with Resharper and added some useful key-mappings that use Resharper's functionality to a new _vsvimrc file I created.

Unfortunately, all my settings in my _vimrc which I use for gVim/vim elsewhere are no longer loaded. Is there a good way to not have to dual maintain my settings in two files? Perhaps a conditional I can use to check if I'm running inside Visual Studio? I'm assuming you can't load two settings files in VsVim.


Solution

  • glad you found it useful, I keep meaning to update it as I've changed around a bunch of how I use vsvim and resharper.

    But to your question, you can load files with source which is a Vim standard way of loading files (you can :source <file> ) but in your vs vim file just put

    source <path to vimrc>

    you can source any other files you like into your .vsvimrc you can do the same in your actual vim config as well, so you could break out certain things into a "common" file if you wanted as well