31

I am an Emacs lover probably because I love the key binding and I am able to do things very quickly. I also use Eclipse IDE for my Java/Android/Python/ development because it is free, most of my peers use it, and it works. I find myself switching between emacs and Eclipse and the workflow just isn't great. What I would like to do is setup the key bindings in Eclipse so that they are like Emacs.

Can someone suggest the best Eclipse plugin I could use for this. Or can anyone talk about how they've used Eclipse to be more Emacs like. Thanks in advance

Drew
  • 29,895
  • 7
  • 74
  • 104
Peter Delaney
  • 5,278
  • 9
  • 33
  • 40

5 Answers5

38

No plugin needed for basic Emacs keybindings!

Go to

    Windows → Preferences → General → Keys

and select Emacs scheme.


    enter image description here


It won't provide all Emacs commands (obviously) but it covers the things you can't live without such as navigation, selection, cutting / pasting etc.

aioobe
  • 413,195
  • 112
  • 811
  • 826
  • 10
    It even has C-x M-c M-butterfly, for real programmers. – corsiKa May 17 '10 at 14:43
  • 1
    This did the trick. This is what I was looking for for so long and it was always there. Thank you very much. – Peter Delaney May 17 '10 at 20:08
  • 4
    @corsiKa but it doesn't have `M-x just-one-space` (`M-space`) or `C-space` for selecting stuff :(. I've started using it just 5 minutes ago and I'm disappointed already. – Vicky Chijwani Mar 11 '12 at 20:14
  • @VickyChijwani, I just tried on Eclipse 3.7 and I can do C-space, move around, and cut the region with C-w, so try with a newer version. – aioobe Oct 01 '13 at 08:08
17

I have to second the recommendation of Emacs+. I've been using and loving Emacs since the dawn of time and the key bindings and functionality of Emacs are hard-wired into my fingers and brain by now. Before Emacs+ came along, I found Eclipse to be a complete bear to use, as years of muscle memory and knowing how to get things done without even thinking about it, were not only useless in Eclipse, but in fact detrimental.

Emacs+ has fixed all of this for me. Now using Eclipse is nearly as seamless as using Emacs, plus I get all the features of a modern IDE. It's practically the best of all worlds. The only thing I still really miss from Emacs is M-q filling of "//" comments.

I should also point out that this is far more than a simple set of key-bindings. It faithfully reproduces a lot of subtle Emacs behavior that you take for granted, until it's not there.

Douglas
  • 2,555
  • 3
  • 24
  • 30
9

First try turning on the Emacs key bindings in your key preferences. If that doesn't give you all that you need, then you might try installing the Emacs+ plugin. Of course, if you have any elisp customizations, I think you might be out-of-luck.

Personally, I always prefer to just learn editor-centric way to do things so that I am not helpless when I sit at someone else's computer.

Christopher Barber
  • 2,548
  • 1
  • 22
  • 23
3

The Emacs+ plugin does a good bit better job providing Emacs keys than the standard Eclipse install.

Allen
  • 5,034
  • 22
  • 30
0

I enabled the Emacs key 'scheme' as @aioobe suggested a long time ago in all my copies of Eclipse. However, recently, a new form of perverse behavior popped up in some of my Eclipse installations: I type any one of several Emacs commands, such as Ctrl-L (to center the window), and this annoying dialog box pops up, offering me the correct Emacs action for that key and another option, which comes from nothing I recognize, but is certainly NOT an Emacs key binding.

This is problematic for two reasons 1) it pops up out of the blue, in some but not all projects (I haven't figured out a pattern yet) 2) it is obviously a violation of the promised support of an Emacs key scheme, a violation that only emerged recently, making the Emacs support far less valuable.

Emacs support in Eclipse was never very complete, but I would like to get back to the state I had a few months ago, when Ctrl-L, Ctrl-D and Ctrl-K all worked correctly as Emacs keys w/o this annoying dialog in all projects.

If Emacs+ worked in Indigo and Juno, I would try that. But as it is...

Valery Viktorovsky
  • 6,487
  • 3
  • 39
  • 47
Matt J.
  • 400
  • 1
  • 4
  • 15