When installing Vim on Mac OS with +python3
support I get the following error:
% brew install vim --with-python3
Usage: brew install [options] formula
...
Error: invalid option: --with-python3
[vim/vim] Vim requires +python or +python3 even when installing with python support, installing with yum the syntax.
Run :ve[rsion] in command-line mode or run vim --version from Bash. If vim was compiled with Python 3, you'll find -python and +python3 . If vim was compiled with Python 2, you'll find +python and -python3 . If vim was compiled without Python support, you'll find -python and -python3 1.
+python3
is now enabled by default on Vim via Homebrew as of 2019. Older instructions out on the internets are not accurate (and I will not link to them to avoid raising their search ranking).
Simply install/upgrade via Homebrew:
% brew uninstall vim # optional, only if you previously installed it
% brew install vim
Verify +python3
:
% /usr/local/bin/vim --version
...
+cmdline_compl +lambda +profile +virtualedit
+cmdline_hist +langmap -python +visual
+cmdline_info +libcall +python3 +visualextra
+comments +linebreak +quickfix +viminfo
+conceal +lispindent +reltime +vreplace
...
Note, you still will have the system default Vim installed and it may be in your PATH before your Homebrew installed version, so if you do vim --version
and it doesn't show +python3
:
alias vim=/usr/local/bin/vim
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With