2

How many key bindings are there in your brain? I personally use Intellij Idea as my primary IDE for development, but sometimes switch to Eclipse and Netbeans a bit, and sometimes I use Jedit,Notepad++, Emacs, Vim.

I am always trying to find a perfect key bindings that I can use crossing all the editors. What's your idea to solve this problem?

2
  • IntelliJ has keymaps for Eclipse and Netbeans, as well as Emacs, JBuilder, Visual Studio. Hopefully Eclipse has the same, but if not, just use Eclipse mappings in IntelliJ.
    – Nicole
    Dec 21 '10 at 5:32
  • All the Editors that "support" emacs key bindings are most of the movement bindings, which is not very much useful.
    – ZZcat
    Dec 21 '10 at 9:30
3

According to me, you should know any one editor/IDE fully, and a little bit of everyone of the others. e.g. I know Emacs most than others, Vim a little less than emacs, and knows where to click in visual studio. Each of the editor/ide is created with certain ideas in mind and the default key bindings are the best suited for that idea. So better to learn those than to try changing those.

2

My approach has changed over the years (30+ in this field). It used to be simple because emacs could do everything. :-) Nowadays, vim can do most everything, but Eclipse, IntelliJ, and Visual Studio are widely used. I currently use IntelliJ.

I have used vi, emacs, vim, notepad++, eclipse, Microsoft Word, Visual Studio, IntelliJ, Chrome Debugger, Atom, Sublime, and most recently VSCode.

I do the following:

  • I have a primary set of key bindings that I use across every one that will allow me to change my key bindings. I currently use emacs key bindings for: emacs, eclipse, Microsoft Word, IntelliJ, Sublime, and vscode.

    So the basic's of navigation (up,down,left,right,home,end) all work the same. This gets me 70% there. I've come to use the windows cut/copy/paste, undo/redo which for better or worse seems to be the default for most systems except emacs (so that's easy for them). In emacs, I use emacs defaults. This is somehow still natural (probably I've used emacs for 30 years).

  • I have a MS Word document with the different tools and the key bindings I use for them. I keep: "what I want to do", tool/keybinding/commandname, default command name (for that key binding) for each of the tools. It's a bit of a pain, but it is what I do.

  • Export the key bindings for each tool and save them to a file that is stored in GITHUB. When I get to a new machine I download them and configure them on the new machine.

NOTE: I tried using IntelliJ's Settings Repository and that helped some (if you're not aware if it, it lets you sync IntelliJ settings in GITHUB and then when you change settings they are synced with the repo, and when you get to the next system, those changes are merged). It's a great idea in concept but I and others have had issues with it.

I was just searching for another solution to this when I saw your post. I'm not seeing any wonderful answers, and mine isn't one either!

I want an application that lets me define the key bindings I want to use and then configures the applications to use those key bindings. I don't see that coming anytime soon, unless I write it. :-)

NOTE: I've also run into issues where in Citrix (remote desktop environment for windows) or using different Window Manager's in Linux that different keys that you might want to use (like Alt+RightArrow) don't work because another app "eats" that key combination so the IDE never even sees that that key was pressed.

I do wish it were simpler.

1
  • I use / remember very few key bindings, (~7, plus the arrow keys) and use the IDE menus a lot. However, if I were to try to remember and use many keybindings across editors, I really like your idea of storing them online at GitHub.
    – user949300
    Mar 31 '18 at 16:03
0
  1. Choose Vim (or I guess Emacs, if you're that kind of person)
  2. Set your bindings in everything else to mimic that.

Alternative 2.: Why are you using a separate IDE? Just stick with Vim.

3
  • 1
    Binding MSVS2008 to save on ':w' is an interesting challenge... Dec 21 '10 at 6:45
  • There are plenty of plugins that allow that behaviour. VsVim, for example.
    – Anon.
    Dec 21 '10 at 20:18
  • ViEmu is by far the best VIM emulation is VS. I highly recommend it. Dec 21 '10 at 23:44
0

Like the other posters have said, choose one of the two great editors - Vim or Emacs. I am a Vim user, and after having learnt to use vim well, I realised that the best way to keep up with this key sequence complexity is to learn to synthesize, and combine existing ones. I also use my muscle memory of vim keyboard shortcuts everywhere - I use vimperator in firefox, and xmonad as my window manager, apart from a host of other settings.

Not the answer you're looking for? Browse other questions tagged or ask your own question.