vim java 全方位完整
我尽力按照此处的安装说明进行操作: http://vim .sourceforge.net/scripts/script.php?script_id=1785,但我无法让它工作,而且看起来有点模糊。
这就是我所做的。
- 我确认我有 vim 7 或更高版本。
- 我创建了一个 $HOME/.vim 目录
- ,我将最新的文件解压到 $HOME/.vim 中
- ,我将以下两行添加到 .vimrc 中:
:setlocal omnifunc=javacomplete#Complete
:setlocal completefunc=javacomplete#CompleteParamsInfo
从那里我不确定我应该做什么才能让它工作。有想法吗?
I'm doing my best to follow the directions for install here: http://vim.sourceforge.net/scripts/script.php?script_id=1785, but I can't get it working and it seems sort of vague.
Here's what I've done.
- I verified that I've got vim 7 or higher.
- I created a $HOME/.vim directory
- I unzipped the latest into $HOME/.vim
- I added the following two lines to .vimrc:
:setlocal omnifunc=javacomplete#Complete
:setlocal completefunc=javacomplete#CompleteParamsInfo
From there I'm not sure what I'm supposed to do to get it working. Ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
:setlocal
命令仅设置当前缓冲区的值,在.vimrc
内没有任何区别。相反,您应该告诉 vim 为每个java
类型的文件设置值。它是这样完成的:将
.vimrc
中的命令替换为上面的行并重新加载它(您可以为此运行:source ~/.vimrc
)。请注意,您需要
autocmd
(在 vim 内运行:echo has("autocmd")
时必须观察值1
)。The
:setlocal
command set only the value for the current buffer and it makes no difference inside.vimrc
. Instead, you should tell vim to set the value for every file of typejava
. This is how it is done:Replace the commands in your
.vimrc
with the lines above and reload it (you can run:source ~/.vimrc
for that).Notice that you need
autocmd
for that (you must observe the value1
when running:echo has("autocmd")
inside vim).