如何在 Eclipse 中启用重复选项卡?(即重复的窗口)

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

How to enable duplicate tabs in Eclipse? (i.e. duplicate windows)

eclipsewindow

提问by emish

If there's one thing I miss about emacs it's having 4 windows of the same file open, each at a different location in that file, for super quick referencing. Is there a way to get Eclipse to present multiple tabs of the same file?

如果我想念 emacs 的一件事,那就是打开同一个文件的 4 个窗口,每个窗口都在该文件的不同位置,以便快速引用。有没有办法让 Eclipse 显示同一文件的多个选项卡?

回答by Uriah Carpenter

On the Windowmenu choose Editor, then Clone(since 4.4.x) or New Editor(earlier versions). You can then drag the title bar around to get side-by-side views.

Window菜单上选择Editor,然后Clone(自 4.4.x 起)或New Editor(早期版本)。然后,您可以拖动标题栏以获取并排视图。

回答by VonC

Another way would be to split the code editor view twice

另一种方法是将代码编辑器视图拆分两次

But this will only be possible with Eclipse Luna 4.4 M4, as detailed by Lars Vogel in "Split editor implemented in Eclipse M4 Luna", in Bug 8009:

但这只能在 Eclipse Luna 4.4 M4 中实现,正如 Lars Vogel 在“在 Eclipse M4 Luna 中实现的拆分编辑器”中的详细说明,在错误 8009 中

The split editor functionality has been developed in Bug 378298, and will be available as of Eclipse Luna M4. The Note & Newsworthy of Eclipse Luna M4 will contain the announcement.
Current shortcut for splitting is:

  • Ctrl+ _for split horizontally, and
  • Ctrl+ {for split vertically.

拆分编辑器功能已在错误 378298 中开发,并将从 Eclipse Luna M4 开始提供。Eclipse Luna M4 的注释和新闻价值将包含该公告。
当前拆分的快捷方式是:

  • Ctrl+_用于水平分割,以及
  • Ctrl+{用于垂直拆分

Depending on your keyboard layout:

根据您的键盘布局:

  • Andrewadds in the commentsthat you can need Ctrl+ Shift.
  • el-teedeementions (also in the comments) that, when pressing CTRL+{in my Javascript editor, it inserts ''.
    To fix this, I need to press CTRL+ALTGR+{(Linux Ubuntu French keyboard),
  • Andrew在评论中添加您可能需要的Ctrl+ Shift
  • el-teedee提到(也在评论中),在我的 Javascript 编辑器中按CTRL+时{,它会插入''.
    要解决此问题,我需要按CTRL+ ALTGR+ {(Linux Ubuntu 法语键盘),

https://bugs.eclipse.org/bugs/attachment.cgi?id=238285

https://bugs.eclipse.org/bugs/attachment.cgi?id=238285

回答by Adrian Petrescu

Yeah, just right-click on the editor tab you want, and select "New Editor". It'll create a new tab editing the same file. You can then drag this new tab to the left or right edge of the view to get them in a "split screen" state. It's really very flexible.

是的,只需右键单击所需的编辑器选项卡,然后选择“新建编辑器”。它将创建一个新选项卡来编辑相同的文件。然后,您可以将此新选项卡拖动到视图的左侧或右侧边缘,以使它们处于“分屏”状态。它真的非常灵活。

回答by emish

I figured it out. Right-click tab > New Editor.

我想到了。右键单击选项卡 > 新建编辑器。

回答by arghtype

I faced similar problem, but not with the main edit tabs: I wanted to have duplicate tabs in additional view panel (exactly: two junit views to compare different test runs).

我遇到了类似的问题,但不是主编辑选项卡:我想在附加视图面板中有重复的选项卡(确切地说:两个 junit 视图来比较不同的测试运行)。

In my case the only possible way to achive such thing was creating separate window: Window> New Windowand openning new view there.

在我的情况下,实现这样的事情的唯一可能方法是创建单独的窗口:Window>New Window并在那里打开新视图。

p.s. I'm using eclipse kepler 4.3.1.

ps 我正在使用 Eclipse 开普勒 4.3.1。

回答by Saikat Guha

For eclipse kepler , you can try right-click > open-with > any other like text editor

对于 eclipse kepler ,您可以尝试右键单击> 打开方式> 任何其他类似文本编辑器