As you are reading this article, it is obvious, you are using Linux as your operating system. If you are a programmer, you mostly using Vi/Vim as your coding playground.
Vim is the simple text editor with a powerful bundle of features for coding. From highlighting the syntax in Vi/Vim editor to auto-completion of the variable names. Vi/Vim has all that. But, very few of us know these features.
Because of not having a better UI interface, many of the programmers are not aware of these features. Linux is known for its powerful set of commands and so the Vim editor.
Before making Vim case-insensitive search, let’s start learning from the beginning to search the text in Vim editor file.
You have written long programming code and now you want to search all the occurrences of the particular variable.
:and enter the term you want to search.
This will highlight all the occurrences of variable name strName.
This is case sensitive search. So it will not highlight “strname” or “STRNAME” or all other variants of upper and lower case characters.
You can use
set command for case sensitive search in vim editor.
Follow the steps given below.
setcommand for case-insensitive search
This command is easy to remember as it sounds “ignore case” which is more meaningful here.
What if you want to go back to case-sensitive search?
You can enable the case-sensitive search again with a simple command.
Now, every time you search in Vim, it will be case-sensitive search.
This is all from this simple
set command that helps you for Vim case-insensitive search.
Do you want to know my favorite editor? You can read all the different editors I personally use for different projects and OS.
I have tested all the commands on my Ubuntu Linux system.
For more such simple and powerful Linux commands, stay tuned.