Password:
Title:
Case-sensitivity is a given in most *NIX and programming environments. But in your editors and tools, case sensitivity is a double-edged sword. Sometimes it's nice to have case-insensitive search so you can find every matching sequence, but just as often I end up getting "too many hits". And doing find and replace insensitively can be really annoying. If only there was a smarter way to manage case! There is. vim has a neat feature called "smartcase" that searches insensitively if you use all lower-case, but searches case-sensitively if you include any capital letters in your search. So, <code>/foo</code> ... would find "foo", "Foo", "fOO", etc., but <code>/Foo</code> ... would only match on "Foo". To enable smartcase, you also need to enable case-insensitivity. You can put this in your <code>.vimrc</code>: <code> set ignorecase " Do case insensitive matching set smartcase " I'm sensitive, but not too sensitive. </code> However, if you want to do this on a <em>case by case basis</em>, you can do this in vim at runtime with <code>:set ignorecase</code> and <code>:set smartcase</code>. (<code>:set nosmartcase</code> and <code>:set noignorecase</code> will undo the option.) Happy hacking!