有没有办法在IDEA中为同一个文件打开两个选项卡?

huangapple go评论69阅读模式
英文:

Is there a way to open two tabs for the same file in IDEA?

问题

有时候我需要查看已经写好的一部分代码,然后在同一个文件中再写另一部分代码。当代码太长时,出于美观或其他原因,我不得不写一段时间,然后滑到我想要查看的代码部分,然后再滑回来继续写。有没有什么好的方法可以避免这种麻烦呢?非常感谢。

英文:

Sometimes I need to look at one piece of code already written and write another piece in the same file. When the code is too long, for beauty or other reasons, I have to write for a while and then slide to the piece of code I want to see, and then slide it back to write again. Is there any good way to avoid this trouble?

thanks a lot

答案1

得分: 3

你不必使用鼠标来操作!记住,IDEA中的一切都是可配置的,所以我的键盘快捷键可能对你不起作用,但你可以在keymap中进行配置。

有两种方法可以在IDEA中打开多个文件:

第一种方法是分割编辑器:

  1. 在Mac上通过cmd shift A进行搜索操作
  2. 输入split并选择您想要的分割方式有没有办法在IDEA中为同一个文件打开两个选项卡?

第二种方法是在新的可流式窗口中打开文件:

  1. 项目窗口中选择一个文件
  2. 使用快捷键shift f4,或者在Mac上通过搜索操作cmd shift A
  3. 输入open source in new window并按Enter键
    有没有办法在IDEA中为同一个文件打开两个选项卡?
英文:

You don't have to use a mouse to do it! Remember everything in IDEA is configurable so my keyboard shortcuts may not work for you though you can configure them in the keymap.

There are two ways which you can open multiple files in IDEA:

The first method would be to split the editor:

  1. search by action cmd shift A on mac
  2. type split and choose how you'd like to split 有没有办法在IDEA中为同一个文件打开两个选项卡?

The second method would be to open the file in a new flowable window:

  1. Select on a file in the project window
  2. Use shortcut shift f4 or search by action cmd shift A on mac
  3. Type open source in new window and hit enter
    有没有办法在IDEA中为同一个文件打开两个选项卡?

答案2

得分: 2

right click into tab name, and select split vertically or horizontally

if you are using git. then find "local changes". it will compare your current changes with the origin
链接

英文:

right click into tab name, and select split vertically or horizontally有没有办法在IDEA中为同一个文件打开两个选项卡?

if you are using git. then find "local changes". it will compare your current changes with the origin
https://www.jetbrains.com/help/idea/viewing-changes-information.html#comparing_local_changes

答案3

得分: 1

在Android Studio中,当我在选项卡名称上右键单击时,我看到“垂直/水平拆分”选项,可以实现您想要的效果。由于AS衍生自IDEA,该功能可能也存在于其中。

英文:

In Android Studio I see "Split Vertically/Horizontally" options when I right-click on the tab name which do exactly what you want. Since AS is derived from IDEA the functionality might be there too.

答案4

得分: 0

如果您使用的是JetBrains IDEA,可以通过右键单击来垂直拆分窗体。
如果您使用Eclipse,您可以使用ctrl + shift + [。

英文:

If you use JetBrains IDEA, the form can be split vertically by right-clicking
If you use Eclipse, you can ctrl + shift + [

huangapple
  • 本文由 发表于 2020年7月24日 09:56:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/63065624.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定