Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing the same file in both columns of a Sublime Text window

When I have 2 columns set in a Sublime Text window, can I display the same file in both columns?

like image 865
user2777473 Avatar asked Oct 10 '22 14:10

user2777473


1 Answers

EDIT

With the release of Sublime Text 4, there is now a feature called Split View that you can access a couple different ways. Via the menu system, you can simply use File -> Split View. You can also right-click on a tab and select Split View from the context menu. It automatically opens a new pane with a new view of the file currently selected.

You should be aware that unlike the new pane described below, the new Split View pane is temporary. This means that if you click on another tab or open a new file, the split view disappears. However, the new view into the file remains open as a separate tab, so to reopen the pane (or compare any open file(s)), select the tab you want on the left, then Ctrl-click (Command ⌘-click on macOS) on the other tab(s) you want to compare, and each one will be displayed in its own pane.

If want to have two (or more) "permanent" panes that will stay open regardless of which tab you click on, just follow the directions below.


Original Answer

(For Sublime Text 3)

Yes, you can. When a file is open, click on File -> New View Into File. You can then drag the new tab to the other pane and view the file twice.

There are several ways to create a new pane. As described in other answers, on Linux and Windows, you can use AltShift2 (Option ⌥Command ⌘2 on OS X), which corresponds to View → Layout → Columns: 2 in the menu. If you have the excellent Origami plugin installed, you can use View → Origami → Pane → Create → Right, or the CtrlK, Ctrl chord on Windows/Linux (replace Ctrl with on OS X).

like image 342
MattDMo Avatar answered Oct 13 '22 04:10

MattDMo