英文:
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中打开多个文件:
第一种方法是分割编辑器:
- 在Mac上通过
cmd shift A
进行搜索操作 - 输入
split
并选择您想要的分割方式
第二种方法是在新的可流式窗口中打开文件:
英文:
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:
- search by action
cmd shift A
on mac - type
split
and choose how you'd like to split
The second method would be to open the file in a new flowable window:
- Select on a file in the project window
- Use shortcut
shift f4
or search by actioncmd shift A
on mac - Type
open source in new window
and hit enter
答案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
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 + [
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论