简体   繁体   English

我可以制作Eclipse键盘快捷键来切换控制台视图吗?

[英]Can I make an Eclipse keyboard shortcut to toggle the view of the Console?

I don't always want it up, I'm on a laptop screen so it'd be nice to have the vertical screen real estate for the code, and then to enable the console only when I want it. 我并不总是想要它,因为我在笔记本电脑的屏幕上,所以最好为代码保留垂直屏幕空间,然后仅在需要时启用控制台。 I know I can toggle it on, but it only seems to work for toggling it on, triggering the shortcut again won't hide it. 我知道我可以将其打开,但是它似乎只能在打开时起作用,再次触发快捷方式不会隐藏它。

You could bind the Minimize Active View or Editor command in Preferences > General > Keys to any key combination you want, and if you do it the Console, it will minimize it. 您可以将“ 首选项”>“常规”>“键”中的 最小化Active View或编辑器”命令绑定到所需的任何组合键,如果执行此操作,则“控制台”会将其最小化。 However when you do this, it will minimize all the views that share docking space with the Console. 但是,这样做时,它将最小化与控制台共享对接空间的所有视图。 You can bring it up again with Alt+Shift+Q,C but this will show the Console as a floating view, it won't maximize the dock to it's original position. 您可以使用Alt + Shift + Q,C再次将其调出但这将控制台显示为浮动视图,不会将扩展坞最大化到其原始位置。 Hit Esc in this floating Console and it will go away. 在此浮动控制台中按Esc键 ,它将消失。

If you can live with this, then it's probably OK. 如果可以忍受,那可能就可以了。

Another way would be to maximize the Code view with Ctrl+M , in case you want to focus just on the code. 另一种方法是使用Ctrl + M最大化“代码”视图,以防您只想关注代码。

You can define different perspectives for that purpose. 您可以为此目的定义不同的观点

See How To Add Perspectives In Eclipse 查看如何在Eclipse中添加透视图

You can add or edit existing shortcuts in Preferences > General > Keys (or press Ctrl+3, type Keys and select)... type in console to filter out all the irrelevant shortcuts. 您可以在“首选项”>“常规”>“键”中添加或编辑现有的快捷方式(或按Ctrl + 3,键入“键”并选择)...在控制台中键入以筛选出所有不相关的快捷键。

键

Here's an article with more details, and a video :) 这是一篇包含更多详细信息的文章和一个视频:)

http://eclipse.dzone.com/articles/how-manage-keyboard-shortcuts http://eclipse.dzone.com/articles/how-manage-keyboard-shortcuts

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM