Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do case insensitive search in ideavim (with / and ?)

Default search setting in IdeaVIM is case sensitive search.

For example, doing

/action

doesn't give results for Action but only actions

How to do case-insensitive search?

like image 518
sudo bangbang Avatar asked Mar 08 '19 15:03

sudo bangbang


1 Answers

The solution for Vim works for IdeaVIM as well. You can set the following setting:

:set ignorecase

to use case insensitive search every time. You can put it in .ideavimrc to have the setting persisted.

set ignorecase

If you want to switch to case sensitive search when your search keyword has a capital letter (which happens a lot), you can use smartcase

:set smartcase

When you have this setting,

/action

would give results for action, Action etc and

/Action

would only give results for Action

If you want to switch these settings for one time uses, you can use \c as an escape character to trigger case insensitive search

/\caction

Similarly, using \C will do case sensitive search.

like image 176
sudo bangbang Avatar answered Oct 25 '22 03:10

sudo bangbang