goushiso
goushiso

Reputation: 369

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

Upvotes: 5

Views: 1919

Answers (4)

Hamza Belmellouki
Hamza Belmellouki

Reputation: 2728

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 enter image description here

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 enter image description here

Upvotes: 5

chunlong wang
chunlong wang

Reputation: 26

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

Upvotes: 0

Hiep Le
Hiep Le

Reputation: 373

right click into tab name, and select split vertically or horizontallyenter image description here

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

Upvotes: 5

FreeBird
FreeBird

Reputation: 721

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.

Upvotes: 1

Related Questions