python - 如何在 Git Bash 的 Vim 中添加 Python 支持?

标签 python windows vim git-bash msysgit

我想在 Vim 中添加 Python 支持 Git Bash ,我该怎么做?

运行时出现错误:

:echo has('python')

最佳答案

TL;DR: Install MSYS2 instead, a "superset" of git bash, that also comes with a package manager.


这张票出现了in the git-for-windows issue tracker ,并因以下原因关闭:

This function is not required for Git for Windows to work. In fact, Python is not required for Git for Windows to work, therefore we do not ship it to the end user.

The purpose of Git for Windows is really to bring Git to Windows.

While that implies that we have to ship quite a few Unix-like tools, it does not mean that we will include such tools unless they are needed for Git's own operations, or at least for historical reasons (needs of active contributors are sometimes a factor in deciding whether to include a tool or not).

Having said that, what you really are looking for is MSYS2. Git for Windows leverages MSYS2 and ships with a subset of its files. MSYS2 even sports a package management system called "pacman" to install more tools (including Git...), so why don't you give it a whirl?

我想您可以继续重新安装或重新编译支持 Python 的 vim,建议的做法似乎更好。

关于python - 如何在 Git Bash 的 Vim 中添加 Python 支持?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33519853/

相关文章:

linux - 为什么 vim -t ctags 不够?我无法跳转到我想要的功能

python - 在 Salesforce 中使用默认值创建多个列

python - 为什么这段 Python 代码不会在 __hash__ 中导致死循环?

vim - 如何强制 VIM/GVIM 在底部(而不是顶部)显示最后一个缓冲行?

java - 是否有等同于 JAVA pack() 的 WIN32 API?

windows - 如何复制/镜像文件,但仅作为文件长度为 0 的占位符?

vim - Vim 是否有 Notepad++ 风格的缩进指南?

iphone - 无法弄清楚如何发布在 iPhone 上生成的公钥

Python 配置分析器 : get list of unused entries

linux - OpenVPN密码认证