Effortless Case-Insensitive Searching in Vim and Neovim

Posted by Chaitanya Shahare on Thu, Oct 19, 2023

Introduction

Vim and Neovim are powerful text editors, and efficient searching is a crucial skill for every user. In this blog post, we’ll dive straight into the valuable world of case-insensitive searching, allowing you to find text without worrying about letter case. Whether you use Vim or Neovim, this tip is for you.

1. Ignoring Case

To enable case-insensitive searching in Vim or Neovim, type the following command:

:set ignorecase

Now Vim or Neovim will search without considering letter case.

Performing Case-Insensitive Searches

2. Start Searching

To search for text, press / in Normal mode, and type your search term. Vim or Neovim will highlight all instances, regardless of case.

For example, if you’re searching for “example,” you can simply type:

/example

To return to case-sensitive searching, use:

:set noignorecase

Conclusion

With case-insensitive searching in, you can streamline your editing tasks. No more frustration over letter case. Incorporate this simple trick into your workflow for a more efficient editing experience.