关闭除 Eclipse 中固定选项卡之外的所有选项卡的快捷方式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15856691/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:20:28  来源:igfitidea点击:

Shortcut to close all tabs except pinned one in Eclipse

eclipsekeyboard-shortcuts

提问by tomrozb

I'm wondering if Eclipse has any shortcut to close all tabs except the pinned one. I use the CTRL+Shift+Wshortcut every day to close current tabs but it closes all the tabs no matter they were pinned or not. Do Eclipse have any settings for this shortcut to close only not pinned tabs, or does exist another shortcut to achieve such result?

我想知道 Eclipse 是否有任何快捷方式可以关闭除固定选项卡之外的所有选项卡。我每天都使用CTRL+ Shift+W快捷方式关闭当前选项卡,但无论它们是否被固定,它都会关闭所有选项卡。Eclipse 是否对此快捷方式进行了任何设置以仅关闭未固定的选项卡,或者是否存在其他快捷方式来实现此类结果?

Edit: I forgot mention I use Eclipse Indigo.

编辑:我忘了提到我使用 Eclipse Indigo。

回答by My-Name-Is

Press CTRL+Shift+Eand you will get the Switch to Editorview as shown below.

CTRL+ Shift+ E,您将获得Switch to Editor如下所示的视图。

Switch to Editor View

切换到编辑器视图

Now use the keys Upor Downto select the tab which you want to stay opened and press the Tabkey two times so that the button Invert Selectionis focused. Then press the Enterand two times Tabkey. Hit the Enterkey again to close all other tabs in editor.

现在使用键UpDown选择要保持打开状态的选项卡,然后按Tab两次键以使按钮Invert Selection聚焦。然后按Enter和 两次Tab键。Enter再次按下该键以关闭编辑器中的所有其他选项卡。

回答by Elye M.

If you right click on your window there is an option "close others" it should work for you,

If you want a shortcut for it its simple to create one, go to >Window > Preferences > General > Keys , search for "close others" then in the Binding filed enter any shortcut key you want, and in the when dropdown; select "In Windows", then apply, OK , Finish.

如果您右键单击您的窗口,有一个选项“关闭其他人”它应该对您有用,

如果您想要一个快捷方式,它很容易创建一个,请转到 >Window > Preferences > General > Keys ,搜索“close others” " 然后在 Binding 字段中输入您想要的任何快捷键,然后在 when 下拉菜单中;选择“在 Windows 中”,然后应用,确定,完成。