Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac 打开.java文件报错 #54

Open
upupupsheng opened this issue Dec 27, 2023 · 2 comments
Open

mac 打开.java文件报错 #54

upupupsheng opened this issue Dec 27, 2023 · 2 comments

Comments

@upupupsheng
Copy link

(1)如图所示,vim打开.java报错,但是再按一下ENTER是可以打开java文件的。

image image (2)另外,看了报错这块儿的源码,是判断有没有安装python,但我本地是有python环境的,搞不懂为什么会报错 image image

(3)打开其他.py .scala .md等文件不报错

@qcsmallblack
Copy link

同问,虽然我的python是内置而python3是官网另下的版本

@qcsmallblack
Copy link

找到解决方案了。原因是当前使用的vim没有支持python/python3(可以使用 vim --version | grep python查看)。如果发现python/python3不支援,可以通过把python/python3通过brew重装后,再通过brew安装一遍vim(似乎是因为Mac内置的vim不支持python),之后这个新安装的vim在重启terminal之后就会是默认的了,并且应该支援了python3,之后通过vim打开java文件就不会出现报错了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants