vim smartcase is Vim's built-in semi-insensitive case matching
https://webinstall.dev/vim-smartcase| Installer Source| Releases (json) (tab)
vim smartcase is Vim's built-in semi-insensitive case matching
https://webinstall.dev/vim-smartcase| Installer Source| Releases (json) (tab)
To update (replacing the current version) run webi vim-smartcase
.
These are the files / directories that are created and/or modified with this install:
~/.vimrc
~/.vim/plugins/smartcase.vim
Vim search /foo
is case-sensitive by default, but comes with options for
swapping that to be:
/foo\c
/Foo\C
This vim-smartcase plugin adds set ignorecase
and set smartcase
to your
~/.vimrc
.
" 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)
/Bar\c
/\cBar
/Ba\cr
" explicit case-sensitive search for 'Bar'
" (\C can go anywhere in the search)
/Bar\C
/\CBar
/Ba\Cr
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 https://github.com/webinstall/webi-installers/blob/master/vim-smartcase/smartcase.vim