rxin en route

vim customization series #1: smart case sensitivity

leave a comment »

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

Written by rxin

October 22, 2009 at 10:45 pm

Posted in Productivity

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.