Mr. Robot
Mr. Robot

Reputation: 1824

Can I open a file in a new split screen tab with a keyboard shortcut in IntelliJ?

In VS Code I can press command + P to search for files and then when I find the one I'm looking for I can press Command + Shift + Enter to open the file in a new tab that adds a split pane to the window.

I can browse in a similar way in IntelliJ pressing Shift twice, but I can't figure out how to open the file in a tab in a split pane, just in a new tab in the same pane on pressing Enter. Is there a way to do it?

Upvotes: 2

Views: 791

Answers (2)

jayesh saini
jayesh saini

Reputation: 51

Mr. Robot

I think, it's too late to answer this question. But anyways, there is already a predefined keymap binding as per your requirement to open a new file in a split window.

keymap is Shift + Enter

After searching any file, you just have to press this combination and it will open that new file in a split window.

*This keymap is for Mac, it may be different for other OS.

Upvotes: 2

mnestorov
mnestorov

Reputation: 4484

On the tab line, where all of your files are tabbed and opened, you can right click and see the option Split Vertically and Split Horizontally. They will split your window as needed. You can bind these options to a macro and automatically have anything split in a second.

enter image description here

Then you can just open any file with your explorer, and then run your key combination to split it!

Edit: you can create key mapping from the Settings -> Keymap menu.

Upvotes: 2

Related Questions