Search code examples
intellij-ideavimwebstormideavim

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?


Solution

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