如何使用键盘更改 Eclipse 中文件的视图/编辑器?
Eclipse 有一个常见的习惯用法,当您编辑 XML 文件时,它可能有一个“可视化”编辑视图(键/值对、树视图,甚至 Android UI 编辑器),并且可以选择切换到编辑“原始”文件。 " 使用窗口底部的选项卡的 XML。我可以使用 CTRL+PGUP/PGDN 在打开的文档之间切换。有没有办法切换编辑器?
我在编辑 Android UI 时经常这样做,并且总是伸手去拿鼠标/触控板已经变得非常老了。
ETA:另一个可能更常见的示例是,考虑编辑安装了 Maven 插件的 pom.xml 文件。您可以获得项目设置、依赖项、报告等的多个“子选项卡”,以及直接编辑原始 XML。我希望能够使用键盘快捷键在这些选项卡之间切换。
Eclipse has a common idiom where when you're editing say an XML file, it may have a "visual" editing view (key/value pairs, tree view, even the Android UI editor), with the option to switch to editing "raw" XML using a tab at the bottom of the window. I can switch between open documents with CTRL+PGUP/PGDN. Is there a way to switch editors?
I do this a ton when editing Android UIs, and always reaching for the mouse / trackpad is getting really old.
ETA: As another, perhaps more common example, consider editing a pom.xml file with the Maven plugin installed. You can get multiple "sub-tabs" for project settings, dependencies, reporting, etc., as well as editing the raw XML directly. I'd like to be able to switch between those tabs with a keyboard shortcut.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如这篇文章https://stackoverflow.com/a/9479062所示,使用 Alt + Pg Up 和 Alt + Pg Down 进行切换XML 编辑器的底部选项卡。
As seen on this post https://stackoverflow.com/a/9479062 use Alt + Pg Up and Alt + Pg Down to switch the bottom tabs on the XML editor.
我不知道是否有现有的(标准)键绑定可以做到这一点。 (事实上,我不太确定我理解你想要做什么)。
但是,如果您转到“窗口”>首选项>一般>键,您将看到许多当前没有绑定键的命令。选择与您要执行的操作最接近的命令并添加自定义键绑定。
I don't know if there is an existing (standard) key binding to do that. (Indeed, I'm not exactly sure I understand what you are trying to do).
However, if you go to Window > Preferences > General > Keys, you will see lots of commands that currently have no bound keys. Select the command that corresponds most closely to whatever you are trying to do and add a custom key binding.