Mac 上的 Eclipse...使用 Windows 键盘快捷键?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/602040/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse on the Mac... using Windows keyboard shortcuts?
提问by jtgameover
I'm a power Eclipse user on Linux/Windows, and the keyboard shortcuts are practically muscle memory. Just recently started developing on a Mac (love it!), using Eclipse, but was really tripped up by the use of the command
key... and not all the shortcuts map over consistently.
我是 Linux/Windows 上的强大 Eclipse 用户,键盘快捷键实际上是肌肉记忆。最近刚开始在 Mac 上开发(喜欢它!),使用 Eclipse,但真的被command
按键的使用绊倒了……而且并不是所有的快捷方式都一致映射。
I've already re-mapped all my common shortcuts to use Ctrl
, but was wondering if anyone's found a more efficient and complete way to do this? Has some kind soul gone through all the shortcuts and posted a preferences file ready for import?
我已经重新映射了所有常用快捷方式以使用Ctrl
,但想知道是否有人找到了更有效和更完整的方法来做到这一点?有没有好心人通过所有快捷方式并发布了准备导入的首选项文件?
回答by VonC
Instead of using the command key,
而不是使用命令键,
alt text http://www.pajbam.com/wp-content/uploads/2008/01/organize_imports-menu_item.png
替代文字 http://www.pajbam.com/wp-content/uploads/2008/01/organize_imports-menu_item.png
, may be this article Mac Keys for Eclipsemight contains a preference file(to be imported) with interesting shortcuts.
,可能是这篇文章Mac Keys for Eclipse可能包含一个带有有趣快捷方式的首选项文件(要导入)。
(Save your current preferences first ;) )
(先保存您当前的偏好;))
回答by Fabio Zadrozny
I have the same case... Mac is only something temporary for me to test some things, and while at it, it really annoys me that I cannot use the keybindings available on Linux/Windows (and with the short sessions, it's worthless trying to retrain my muscles), so, if someone does have a preference file for that, I'd appreciate it too.
我有同样的情况...... Mac 只是我测试一些东西的临时工具,而在此期间,我无法使用 Linux/Windows 上可用的键绑定,这真的让我很恼火(而且会话时间很短,尝试毫无价值重新训练我的肌肉),所以,如果有人确实有一个偏好文件,我也会很感激。
Edit: Just found out:
编辑:刚刚发现:
https://apple.stackexchange.com/questions/16135/remap-home-and-end-to-beginning-and-end-of-line
https://apple.stackexchange.com/questions/16135/remap-home-and-end-to-beginning-and-end-of-line
and remapping things globally helps a lot (and for Eclipse itself I just went on and edited the missing bindings manually -- after having the system ones already fixed).
并全局重新映射事物有很大帮助(对于 Eclipse 本身,我只是继续手动编辑缺少的绑定——在系统绑定已经修复之后)。
回答by Andrey Tarantsov
I had the same problem when switching. While this does not answer your direct question, I would really recommend you to learn the Mac shortcuts.
切换时我遇到了同样的问题。虽然这不能回答您的直接问题,但我真的建议您学习 Mac 快捷方式。
The command key on a Mac is located better than Ctrl key, and pressing it causes less stress for your hand. After many years of developments I gradually start to feel pain in my hands, and I know (feel) that key placement matters — so save your health while it's fine.
Mac 上的命令键比 Ctrl 键的位置更好,按下它可以减轻手部的压力。经过多年的发展,我逐渐开始感到手部疼痛,我知道(感觉)关键位置很重要——所以在好的时候保护你的健康。
The following mapping table might help you:
以下映射表可能对您有所帮助:
- Ctrl -> Command (obviously)
- Ctrl-Shift -> Command-Option (aka Command-Alt)
- Alt-Shift -> no change (Option-Shift)
- Ctrl -> 命令(显然)
- Ctrl-Shift -> Command-Option(又名 Command-Alt)
- Alt-Shift -> 无变化(Option-Shift)
Today, even when I switch between Mac and Windows, I still have no problem with shortcuts. Turns out Mac and Windows Eclipse shortcuts can be different kinds of muscle memory.
今天,即使我在 Mac 和 Windows 之间切换,我的快捷方式仍然没有问题。原来 Mac 和 Windows Eclipse 快捷方式可以是不同类型的肌肉记忆。
Also I have once drawn a set of keyboard pictures with various Mac Eclipse shortcuts, available at www.tarantsov.com/eclipse/shortcuts-illustrated/— maybe this can help you too.
此外,我曾经绘制了一组带有各种 Mac Eclipse 快捷键的键盘图片,可在www.tarantsov.com/eclipse/shortcuts-illustrated/ 上找到——也许这也能帮到你。
回答by Rhythm
I believe this should do the trick In your Eclipse for Windows machine
我相信这应该可以在您的 Eclipse for Windows 机器中解决问题
Use: File->export->General and select 'Keys Preferences'
使用:File->export->General 并选择“Keys Preferences”
and import that file to your Eclipse for Mac
并将该文件导入您的 Eclipse for Mac
File -> import -> General
文件 -> 导入 -> 常规
回答by JorgeO
I Strongly recommend you to go with the flow regarding to mac shortcuts. I am a windows user who switch to Linux and recently to Mac. i use eclipse in and most commands that involves ctrl are just change to command like: command + c and command + v for copy and paste. And Command + Shift + r to replace. Command + B to build all. and of course FN + F5 to refresh. Besides Mac shorcuts usually work for almost all mac apps so dont waste your time switching every app to be windows like because you just focus on what mac/os is missing instead of enjoying new ways to use you computer.
我强烈建议您按照有关 mac 快捷方式的流程进行操作。我是一个 Windows 用户,他切换到 Linux,最近又切换到 Mac。我使用 eclipse 并且大多数涉及 ctrl 的命令只是更改为命令,例如:command + c 和 command + v 用于复制和粘贴。和 Command + Shift + r 替换。Command + B 构建所有。当然还有 FN + F5 刷新。除了 Mac 快捷方式通常适用于几乎所有 mac 应用程序,因此不要浪费时间将每个应用程序切换为 windows 之类的应用程序,因为您只关注 mac/os 缺少的内容,而不是享受使用计算机的新方法。