开发者

Importing Netbeans keymap to Eclipse

开发者 https://www.devze.com 2023-03-30 15:30 出处:网络
I have been a happy NetBeans user for a few years and I am pretty used to the keyboard shortcuts. Is there a way for import my NB preferences, a开发者_StackOverflownd more specifically the keymap, int

I have been a happy NetBeans user for a few years and I am pretty used to the keyboard shortcuts. Is there a way for import my NB preferences, a开发者_StackOverflownd more specifically the keymap, into Eclipse? I know the opposite is possible.

PS I have to say I do not insist on using Eclipse, but I found the PyDev plugin is superior to NB's python plugin. Could you recommend any good Python IDEs that will act like NB?


Netbeans' preferences can be exported in XML, but it uses different parameter names than those accepted by Eclipse. See this post for information on other python IDE's if you're considering switching beyond Eclipse.

I personally use Komodo-Edit, due to the fact it provides better-than-average code completion.

UPDATE: Sublime-Text 2 has rocked Komodo-Edit right out of my toolkit. It's not a complete IDE (neither is Komodo-Edit), but has IDE-like features that make it ideal for working in Python.


You can import key preferences in Eclipse. Go to file -> Import -> preferences, There you can input a preferences file where one of the sections that this file type supports is "Key Preferences".

Now I don't know which format NetBeans uses when it exports the key prefs file, or exactly which format Eclipse recognizes (It's some xml you need to figure out), but I'm pretty sure you can:

  1. export your keys from NetBeans
  2. Reverse Engineer the Eclipse preferences file format (the keys section) by exporting (file->export->preferences) the current settings.
  3. write code to convert NB export format to Eclipse format..

Good Luck :)

EDIT:

I just looked at my own favorite preferences file. It has a lot of lines like:

<keyBinding commandId\="org.tigris.subversion.subclipse.ui.synchronize" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="ALT+CTRL+K S"/>\r\n

You're going to have a hard time figuring out the commandId and contextId. So scratch that idea..


For anyone going in the other direction i.e. from Eclipse to Netbeans, you can setup Netbeans to use Eclipse shortcut key mappings.

In Netbeans select Tools > Options > Keymap and select the Eclipse option from the Profile dropdown list.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号