Intellij - Split Screen Creates Duplicate

Not sure when this feature was added, but you can simply right-click the tab and choose Move Right ; it has the effect of splitting horizontally and then closing the old tab.


This is not possible. The concept of a split is just that, to split an editor. See Splitting and Unsplitting Editor Window in the help guide. You can create a second editor window by dragging a tab off the main editor window. See Detaching Editor Tabs in the help guide. Note, if you already have a split in place, you can drag a file from one split pane to the other.

You can also write a macro to accomplish what you want.

  1. Give the tab you want to split focus
  2. From the menu: Edit > Macros > Start Macro Recording
  3. Record the following sequence:
  4. Right click on the tab and split it
  5. Type ctrl+F4 (or F4) to close the original window
  6. Stop the macro (either view the popup in the bottom or via the Edit > Macros > Stop Macro Recording)
  7. In the dialog, give the macro a name.

You can now either run the macro from File > Edit > Macros, or you can map a keyboard shortcut to it. See Binding Macros with Keyboard Shortcuts in the help guide for how to do such.