How to partially disable the zsh's autocorrect
You can inform zsh that it should not autocorrect on specific commands by aliasing them with the prefix 'nocorrect' in your .zshrc (example here: http://dzen.geekmode.org/wiki/wiki.cgi/-main/ZshConfiguration):
alias vim='nocorrect vim'
Alternatively -- if this whitelisting process becomes too frustrating -- you can switch autocorrect off entirely with the following in your .zshrc.
For newer versions of zsh use:
unsetopt correct
for older versions of zsh use:
unsetopt correct-all
Amended to add: here is a previous discussion on this subject - Exceptions to zsh correctall feature?
I think I found a better answer to this.
Im not sure about versions and whatnot, but it seems correct_all
is supposed to correct commands and arguments, while correct
corrects only commands, therefore eliminating this annoying behaviour.
This is what I have in my config files
unsetopt correct_all
setopt correct