Search code examples
zshzsh-completion

Can zsh do smartcase completion like vim's search?


Vim has a "smartcase" feature, which makes searching case insensitive, but only if the search contains all lowercase letters. When you search on any uppercase letters, smartcase assumes you want a case sensitive search. Is there a way to get the same behavior in zsh's tab completion?


Solution

  • Take a look at my zshrc file.

    https://github.com/martincanaval/arch-conf/tree/master/etc/zsh

    I have that functionality you are asking for and I believe this line made it.

    zstyle ':completion:*'  matcher-list 'm:{a-z}={A-Z}'