我开始使用Eclipse最近和真棒一起PyDev用于Python开发的插件。由于习惯了 Visual Studio 键绑定(bind),我发现 Eclipse 内置了对 Visual Studio(以及 Emacs)键绑定(bind)方案的支持。
但是,我想创建我自己的自定义键绑定(bind)方案,并能够加载该方案到 Eclipse 中。我该怎么做?
最佳答案
如 Schemes help page 中所述,您可以通过自定义插件定义新的 key 方案:
you can define a new type of scheme inside the
org.eclipse.ui.bindings
definition. The workbench markup that defines the default and emacs key configurations are shown below:
<scheme
name="%keyConfiguration.default.name"
description="%keyConfiguration.default.description"
id="org.eclipse.ui.defaultAcceleratorConfiguration">
</scheme>
<scheme
name="%keyConfiguration.emacs.name"
parentId="org.eclipse.ui.defaultAcceleratorConfiguration"
description="%keyConfiguration.emacs.description"
id="org.eclipse.ui.emacsAcceleratorConfiguration">
</scheme>
如 Wizard Help Page 所示,您只能导出键绑定(bind)首选项。
(来源:eclipse.org)
您将能够通过文件/导入将其导回。
至于根据您当前的上下文可用的快捷方式列表:
Ctrl+Shift+L:您可以检查您的修改是否适用。
关于Eclipse:如何创建和加载自定义键绑定(bind)方案?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1576291/