Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move file from one editor window to another (split mode)

Is it possible to move a file (already opened) from one editor to another in split mode without using mouse and without using tabs (I have tabs disabled).

Example of what i want to accomplish. I enabled split mode (vertical) and opened file X in left editor. I want to move this file X to right editor because I already have file Y int left editor.

I found the command Move to opposite group which works fine only when tabs are enabled. When tabs are disabled (my case) call Move to opposite group force split mode to disappear.

like image 392
MyDogTom Avatar asked Jun 18 '15 14:06

MyDogTom


People also ask

How do I switch between split windows in IntelliJ?

In the editor, press Ctrl+Tab . Keep pressing Ctrl for the Switcher window to stay open. Use Tab to switch between tabs and other files.

How do I open multiple tabs in IntelliJ?

Split a single file into multiple tabsRight-click a tab and choose Split Right or Split Down. Choose Window | Editor Tabs | Split Right/Split Down from the main menu.


2 Answers

  • Goto File->Settings
  • Then Keymap
  • Type in the searchbox "Move To Opposite Group"
  • Assign a shortcut

Also useful is "Goto Next Splitter" which allows you to switch between your Splitter.

But you'll hardly find a shortcut which is not already occupied.

I used Ctrl + NumPad+ for "Move To Opposite Group" and Ctrl + ArrowRight for "Goto Next Splitter"

You'll be notified that this shortcut is already in use, but you can ignore that. I had no conflicts so far

like image 76
Daveloper Avatar answered Oct 03 '22 10:10

Daveloper


I agree with David Viehtauer and would add to his setup. This also won't work with tabs disabled, but has become essential to my workflow.

My prefered setup under Preferences > Keymap:


Move Right: ⌃ + ⌘ + ↓
Move To Opposite Group: ⌃ + ⌘ + ↑
Goto Next Splitter: ⌃ + ⌘ + →
Goto Previous Splitter: ⌃ + ⌘ + ←


Move Right will create a new splitter and send your current tab to it (if you have more than one tab on your current splitter). Once your file is in a new splitter you can go between your splitters with the Goto Next Splitter and Goto Previous Splitter shorcuts above. Now, using the Move To Opposite Group shortcut you can move your active tab to the preferred side.

Once you get familiar with this setup, you can quickly manage your tabs.

like image 39
Nate Johnson Avatar answered Oct 03 '22 12:10

Nate Johnson