vim customization series #1: smart case sensitivity
Since we develop DB2 pureScale completely on Linux or AIX, I’ve been using almost 100% command line interface (less, vim, gdb, grep, find) at work. Over time, I’ve built up a small set of customizations for vim that I cannot work without. I would like to document them here so if I ever need to use vim again, I have a reference point.
To enable smart case sensitivity, add the following lines to .vimrc:
set ignorecase set smartcase
With this enabled, if you search for a keyword that is all in small letters, the search is case insensitive. However, when you have capitalized letters, the search is case sensitive. For example, “abcd” matches “abcd”, “ABCD”, “aBC”D, etc. But “aBcd” only matches “aBcd”.
Advertisement