Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open file from vim in case insensitive manner

Tags:

vim

Lets say you have a file ExAMplE.java in your current directory and you are editing some other file in the same directory using vim. I would open a file from vim using :e fileName but since the name of this file is all crappy , is there a way to make vim edit command suggest you the name of file ExAMple.java if you just type exam<tab> .

like image 253
Vihaan Verma Avatar asked Dec 18 '12 20:12

Vihaan Verma


People also ask

How do you search for case-insensitive patterns in the open file?

Case-insensitive file searching with the find command The key to that case-insensitive search is the use of the -iname option, which is only one character different from the -name option. The -iname option is what makes the search case-insensitive.

How do I search for a word in Vim case-insensitive?

Searches normally are case-sensitive: a search for "china" will not find "China." If you want vi to ignore case during a search, type :set ic . To change it back to the default, case-sensitive mode, type :set noic . If vi finds the requested string, the cursor will stop at its first occurrence.

What is Smartcase Vim?

Case-insensitive search in Vim. If you want this behavior by default, you can turn on the option: set ignorecase. There's also a so-called "smartcase" ( :help smartcase ) which works as case-insensitive if you only use lowercase letters; otherwise, it will search in case-sensitive mode.06-Jul-2020.


1 Answers

set wildignorecase

See :h 'wildignorecase'.

like image 98
romainl Avatar answered Sep 25 '22 11:09

romainl