Search code examples
visual-studiovimvisual-studio-2017case-insensitivevsvim

VsVim - Case insensitive search by default


In Visual Studio 2017 with the VSVIM plugin, how do you set the default search to be case insensitive?

I found a question that answers it in general VIM, but I don't have a configuration file in a home directory to modify (because it is a plugin in Visual Studio): How to do case insensitive search in Vim


Solution

  • In general, you can do case insensitive searches if you have

    set ignorecase
    

    on. And even more useful is additionally turning on

    set smartcase
    

    This will search case insensitive unless you put a capital letter or \C in your search, and then it will become case sensitive again.

    but I don't have a configuration file in a home directory to modify

    That doesn't matter. Just create either a .vimrc or .vsvimrc in your home directory and add that line. VsVim will source both of those before launching.

    It doesn't really matter which one you put it in, but I'd recommend putting in .vimrc since it'll affect both regular vim and VsVim. I use .vimrc for all regular settings and then vim plugins and advanced things, and I use .vsvimrc to fix things that break when being sourced in VsVim, since more advance vimscript and vim plugins don't work super well in it.