vim smartcase is Vim's built-in semi-insensitive case matching

To update (replacing the current version) run webi vim-smartcase.


These are the files / directories that are created and/or modified with this install:


Cheat Sheet

Vim search /foo is case-sensitive by default, but comes with options for swapping that to be:

  1. case-insensitive by default - i.e. /foo\c
  2. and case-sensitive on mixed-case search - i.e. /Foo\C

This vim-smartcase plugin adds set ignorecase and set smartcase to your ~/.vimrc.

Case Sensitivity in Vim

" treat everything in text and search as lowercase
set ignorecase
" treat mixed case as case sensitive
" requires 'ignorecase' to work
set smartcase
" explicit case-insensitive search for 'Bar'
" (\c can go anywhere in the search)
" explicit case-sensitive search for 'Bar'
" (\C can go anywhere in the search)

How to do this manually

Set ~/.vimrc:

" make searches case-insensitive by default (i.e. /foo\c)
:set ignorecase
" make mixed-case searches case-sensitive by default  (i.e. /Foo\C)
:set smartcase

" fyi: you can put \c or \C before, after, or in the middle of a search
" ex: /Bar\c or /\cBar or /B\car

Available at


Report an Issue Submit Installer Star on GitHub