22

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?

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77

1 Answers1

31

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 ignorecase 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.

Alechan
  • 817
  • 1
  • 10
  • 24
sudo bangbang
  • 27,127
  • 11
  • 75
  • 77
  • 16
    Note to turn on smartcase you have to set both of them, ie `set ignorecase smartcase`. setting `smartcase` alone does nothing. – Matt Greer Aug 06 '20 at 15:14