Cambiar IntelliJ para tener un mapa de teclas Eclipse en Mac (es decir, cmd + alt + R para refactorizar / renombrar)

I want to be able to use the standard Eclipse Mac keymap, i.e. Refactor/Rename is cmd + alt + R

Having done a bit of searching, I found the Keymap option in Preferences, however the "Eclipse" key map option is actually the Windows keymap. For example, Refactor/Rename is Alt + Shift + R.

I know I can manually change all the shortcuts I need, but is there any sort of tool/method which will change all the keymaps to Eclipse Mac style for me?

¡Gracias!

preguntado el 02 de febrero de 12 a las 11:02

3 Respuestas

1 - Grab this xml file (Eclipse on Mac):

https://github.com/thatha/IntelliJ-IDEA-Eclipse-on-Mac-Keymap/blob/master/Eclipse%20on%20Mac.xml

2 - Save the file to this directory:

~/Library/Preferences/IntelliJIdea11/keymaps/

note - this directory may vary depending on your system/version of IntelliJ. According to this link:

http://www.jetbrains.com/idea/webhelp/configuring-keyboard-shortcuts.html

It should be of the form: ~/Library/Preferences/.IntelliJ IDEA/keymaps/

Dig around and you will find it!

3 - Open IntelliJ, navigate to Preferences ( cmd + , ). Under IDE Settings > Keymap, select "Eclipse on Mac" from the Keymaps drop down list.

Respondido 02 Feb 12, 19:02

Thanks Will, I tested that file and found some issues but it works well otherwise! - arkangelofkaos

JetBrains' own webhelp is garbled.

The directory has either changed in Idea 12, or they don't mention a difference between the Ultimate and Community Edition versions.

I found the correct directory at ~/Library/Preferences/IdeaIC12.

Respondido el 19 de junio de 13 a las 16:06

Still applies as of 14. - Brian Bowman

To make a replacement keymap yourself:

  • go to /Applications/IntelliJ Idea XX.app/lib
  • extract resources.jar/lib/Keymap_Eclipse.xml file

In an editor, make the following changes:

  • remove the first and last lines (<component> and </component>)
  • add <?xml version="1.0" encoding="UTF-8"?> as the first line
  • replace all occurrences of 'control' with 'meta'
  • in the <keymap ...> tag give it a new name="YourName" and set parent="Eclipse"

Then save your shiny new keymap in ~/Library/Preferences/IntelliJIdeaXX/keymaps/YourName.xml. You'll have to restart IntelliJ to have your new keymap to appear in IntelliJ Idea -> Preferences -> IDE Settings -> Keymap.

Respondido el 02 de enero de 13 a las 13:01

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.