Eclipse 有哪些 vim 插件可用?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2220653/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 19:11:00  来源:igfitidea点击:

What vim plugins are available for Eclipse?

eclipsevimide

提问by John Oxley

I have found three and would like to know if there are others and what their advantages or disadvantages might be:

我找到了三个,想知道是否还有其他的,以及它们的优缺点是什么:

I've included Eclim, but it differs from the other two options in that it makes Eclipse functionality available in vim and what I'm really after is vim functionality within the Eclipse environment.

我已经包含了 Eclim,但它与其他两个选项的不同之处在于它使 Eclipse 功能在 vim 中可用,而我真正想要的是 Eclipse 环境中的 vim 功能。

采纳答案by Pierre-Antoine LaFayette

Eclim

埃克林

Eclim is not the correct approach in my opinion. You want to retain the flexibility and functionality of the IDE while gaining the editing power of Vim.

在我看来,Eclim 不是正确的方法。您希望在获得 Vim 的编辑能力的同时保留 IDE 的灵活性和功能。

viPlugin

插件

I used viPluginwhen I was working with Eclipse. However it is not free (unlike the IntelliJ Idea Vim plugin). It also is not as thorough as the Visual Studio Vim plugin. You'll find that certain functionality is missing. Things like Ctrl+] to "go to definition" or Ctrl+o for "go back" don't work. Macros don't work either however it does have marks. It provides the core functionality of Vim text editing. If I recall correctly you can even have a simple vimrc configuration file. You can do a free trial to test it out.

我在使用Eclipse时使用了viPlugin。但是它不是免费的(不像 IntelliJ Idea Vim 插件)。它也没有 Visual Studio Vim 插件那么彻底。您会发现缺少某些功能。像 Ctrl+] 用于“转到定义”或 Ctrl+o 用于“返回”之类的东西不起作用。宏也不起作用,但它确实有标记。它提供了 Vim 文本编辑的核心功能。如果我没记错的话,你甚至可以有一个简单的 vimrc 配置文件。您可以免费试用以进行测试。

Vrapper

Vrapper

Apparently Vrapper has macros and marks, as well as the following commands:

显然 Vrapper 有宏和标记,以及以下命令:

Motions

议案

h j k l w W e E b B f F t T ; , ^ $ 0 % G H M L gg ge gE

h j k l w W e E b B f F t T ; , ^ $ 0 % G H M L gg ge gE

Operators

运营商

y Y d D c C s S p P r J x X i I a A o O . < > gc gu gU

y Y d D c C s S p P r J x X i I a A o O . < > gc gu gU

Search

搜索

/ ? n N * #

/ ? n N * #

Text Objects(only in normal mode)

文本对象(仅在正常模式下)

ib i( i) i[ i] iB i{ i} i i" i' i` iw iW ab a( a) a[ a] aB a{ a} a a" a' a` aw aW

Counts

计数

You can use the number keys to specify counts in front of other commands. Other Commands

您可以使用数字键在其他命令之前指定计数。其他命令

v V u <C-R> <C-F> <C-B> ~ q @ zo zR zc zM zz gt gT

v V u <C-R> <C-F> <C-B> ~ q @ zo zR zc zM zz gt gT

Plus it's free, so I'd go with that one.

另外它是免费的,所以我会选择那个。

回答by ldog

I have tried Viableand it's my top pick out of them all. It's got pretty much all the features of Vrapper, but some additional features that none of the others have like window splitting, command history, and external filters and commands.

我尝试过Viable,它是我的首选。它几乎拥有 Vrapper 的所有功能,但还有一些其他功能没有的功能,例如窗口拆分、命令历史记录以及外部过滤器和命令。

It is pay, but it's free to try. It does lack some of the basics like Pierre mentioned, no support for Ctrl+]for example, however the development is active so chances are it will be implemented.

这是付费的,但可以免费试用。它确实缺乏像 Pierre 提到的一些基础知识Ctrl+],例如没有支持,但是开发是活跃的,所以它有可能被实施。

回答by heathkit

I used viplugin for quite a while, but now that I've built up a pretty customized vim environment I've switched to eclim. Vim already gives you most of what you need - tags, file navigation, and project view. Eclim gives you a way to plug into eclipse and gets you the completion and refactoring tools. You use vim for what it's best at and eclipse for what it's best at.

我使用 viplugin 已经有一段时间了,但是现在我已经建立了一个非常定制的 vim 环境,我已经切换到 eclim。Vim 已经为您提供了大部分您需要的东西——标签、文件导航和项目视图。Eclim 为您提供了一种插入 Eclipse 的方法,并为您提供完成和重构工具。您将 vim 用于其最擅长的领域,而将 Eclipse 用于其最擅长的领域。

Really, I think trying to reimplement vim within the eclipse environment is just a losing proposition. If all you care about are the basic movement and navigation functions, one of the plugins will work just fine. But if you've invested time in getting vim to work the way you want it to, eclim is a painless way to easily hook into eclipse.

真的,我认为尝试在 eclipse 环境中重新实现 vim 只是一个失败的提议。如果您只关心基本的移动和导航功能,那么其​​中一个插件就可以正常工作。但是,如果您已经投入时间让 vim 以您希望的方式工作,那么 eclim 是一种轻松连接到 eclipse 的无痛方法。

回答by Nicholas Brekhus

Sadly, viplugin is the best one.

可悲的是,viplugin 是最好的。