通过 Homebrew 安装 Vim,支持 Python 和 Python3
上面的解决方案不起作用。
我试过了
brew install vim -python -python3
但它不支持python2。当前使用 vim 支持 python2 和 python3 的方法是什么?谢谢。(我用过 linuxbrew。)
$ vim --version | grep python
+comments +libcall -python +visual
+conceal +linebreak +python3 +visualextra
Linking: gcc-5 -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -L/home/linuxbrew/.linuxbrew/opt/libyaml/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libyaml/lib -L/home/linuxbrew/.linuxbrew/opt/openssl@1.1/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/openssl@1.1/lib -L/home/linuxbrew/.linuxbrew/opt/readline/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/readline/lib -Wl,-E -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/perl/5.32.1_1/lib/perl5/5.32.1/x86_64-linux-thread-multi/CORE -L/usr/local/lib -Wl,--as-needed -o vim -lm -lncurses -ldl -Wl,-E -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/perl/5.32.1_1/lib/perl5/5.32.1/x86_64-linux-thread-multi/CORE -fstack-protector-strong -L/usr/local/lib -L/home/linuxbrew/.linuxbrew/Cellar/perl/5.32.1_1/lib/perl5/5.32.1/x86_64-linux-thread-multi/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc -L/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.2_1/lib/python3.9/config-3.9-x86_64-linux-gnu -lpython3.9 -lcrypt -lpthread -ldl -lutil -lm -lm -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/ruby/3.0.0_1/lib -L/home/linuxbrew/.linuxbrew/Cellar/ruby/3.0.0_1/lib -lruby -lm