Intelligently setting case sensitivity
Vim has a really nice option for setting case sensitivity intelligently. It’s called smartcase, and it makes your search case sensitive if your search pattern uses uppercase characters.
You can enable it with :set ignorecase followed by :set smartcase and disable it with :set nosmartcase.
Try it in the editor.