Reputation: 8903
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
Upvotes: 4
Views: 3300
Reputation: 6579
As of 2023, VSCode Vim search & replace is by default case-insensitive.
You could try using something like this, for Sensitive/Insensitive:
Case-Sensitive:
:s/FOO\C/BAR/
Add a \C
to the Search phrase.
\C : Is for 'Match Case'
Above will only find, 'FOO' & replace with 'BAR'
Case-Insensitive:
:s/FOO/BAR/
Above will find, FOO/Foo/FoO/foo etc & replace with 'BAR'
Upvotes: 0
Reputation: 7679
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.
Upvotes: 15