Showing the same file in both columns of a Sublime Text windowSet default syntax to different filetype in Sublime Text 2How to customise file type to syntax associations in Sublime Text?How do I reformat HTML code using Sublime Text 2?How do I force Sublime Text to indent two spaces per tab?Indenting code in Sublime text 2?Sublime Text 2 - View whitespace charactersSublime Text 2 - Show file navigation in sidebarOpen Sublime Text from Terminal in macOSConvert selection to lowercase (or uppercase) in Sublime Text?Replace n with actual new line in Sublime Text
Can the sorting of a list be verified without comparing neighbors?
Is a vertical stabiliser needed for straight line flight in a glider?
What food production methods would allow a metropolis like New York to become self sufficient
Is the schwa sound consistent?
"Fīliolō me auctum scito, salva Terentia"; what is "me" role in this phrase?
Thesis' "Future Work" section – is it acceptable to omit personal involvement in a mentioned project?
How to pronounce "r" after a "g"?
Ubuntu won't let me edit or delete .vimrc file
Renting a house to a graduate student in my department
Make all the squares explode
Why does increasing the sampling rate make implementing an anti-aliasing filter easier?
Was the Highlands Ranch shooting the 115th mass shooting in the US in 2019
Pre-1993 comic in which Wolverine's claws were turned to rubber?
Is there any evidence to support the claim that the United States was "suckered into WW1" by Zionists, made by Benjamin Freedman in his 1961 speech?
What did Rocket give Hawkeye in "Avengers: Endgame"?
stdout and stderr redirection to different files
What happened to python's ~ when working with boolean?
What is the best way for a skeleton to impersonate human without using magic?
Is a diamond sword feasible?
Is the homebrew weapon attack cantrip 'Arcane Strike' balanced?
Composite Factor Soup
Can I use my laptop, which says 240V, in the USA?
How to select certain lines (n, n+4, n+8, n+12...) from the file?
What are the ramifications of setting ARITHABORT ON for all connections in SQL Server?
Showing the same file in both columns of a Sublime Text window
Set default syntax to different filetype in Sublime Text 2How to customise file type to syntax associations in Sublime Text?How do I reformat HTML code using Sublime Text 2?How do I force Sublime Text to indent two spaces per tab?Indenting code in Sublime text 2?Sublime Text 2 - View whitespace charactersSublime Text 2 - Show file navigation in sidebarOpen Sublime Text from Terminal in macOSConvert selection to lowercase (or uppercase) in Sublime Text?Replace n with actual new line in Sublime Text
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
When I have 2 columns set in a Sublime Text window, can I display the same file in both columns?
sublimetext2 sublimetext sublimetext3
add a comment |
When I have 2 columns set in a Sublime Text window, can I display the same file in both columns?
sublimetext2 sublimetext sublimetext3
add a comment |
When I have 2 columns set in a Sublime Text window, can I display the same file in both columns?
sublimetext2 sublimetext sublimetext3
When I have 2 columns set in a Sublime Text window, can I display the same file in both columns?
sublimetext2 sublimetext sublimetext3
sublimetext2 sublimetext sublimetext3
edited Mar 23 at 10:59
mattst
5,61832131
5,61832131
asked May 30 '14 at 15:05
user2777473user2777473
1,50631627
1,50631627
add a comment |
add a comment |
9 Answers
9
active
oldest
votes
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).
11
Ctrl+Shift+2 shortcut for split screen and drag the file over
– Abuzzy
Dec 18 '14 at 14:15
You can also use Windows+Ctrl+arrow key to arrange windows.
– Shital Shah
Apr 15 '16 at 7:22
The cmd in the next post works - shift + Alt + 2 to split into 2 screens, not this one below.
– LED Fantom
Oct 21 '16 at 17:12
@LEDFantom When you say this answer doesn't work, what do you mean? The OP already knew how to create split windows, which is why I didn't explain how to do that in my answer. I'm not sure what the downvote is for.
– MattDMo
Oct 21 '16 at 17:32
@MattDMo , I see what you meant now. How do I remove the down vote?
– LED Fantom
Oct 22 '16 at 2:28
|
show 2 more comments
Its Shift + Alt + 2 to split into 2 screens. More options are found under the menu item View -> Layout.
Once the screen is split, you can open files using the shortcuts:
1. Ctrl + P (From existing directories within sublime) or
2. Ctrl + O(Browse directory)
2
To expand, CTRL + P will allow you to "open" the same file more than once.
– jayflo
Jun 23 '16 at 20:13
add a comment |
Inside sublime editor,Find the Tab named View,
View --> Layout --> "select your need"
1
View --> Layout --> "select your need"select your needs = [single,columns,rows,grids]. So this means the options available when you go to Layout .try out first ,Tested in Sublime 2.
– sg28
Jan 29 '16 at 23:02
2
I wish I could upvote this answer twice.
– PDKnight
Aug 11 '16 at 14:02
appreciate the menu navigation instead of just a shortcut which happens to work for some users and doesn't explain what sublime feature is in use - which the menu clearly defines. :)
– keen
Dec 22 '17 at 17:17
This should be the only accepted, this is what worked for me. The accepted one doesn't work anymore. Probably it doesn't work in current versions.
– VaTo
Jan 8 at 23:11
add a comment |
Here is a simple plugin to "open / close a splitter" into the current file, as found in other editors:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self):
w = self.window
if w.num_groups() == 1:
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
Save it as Packages/User/split_pane.py and bind it to some hotkey:
"keys": ["f6"], "command": "split_pane",
If you want to change to vertical split change with following
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
add a comment |
I regularly work on the same file in 2 different positions. I solved this in Sublime Text 3 using origami and chain with some additional config.
My workflow is ctrl-k 2 splits the view of the file in two (horizontal) panes with the lower one active. Use ctrl-k o to toggle between the panes. When done ensure the lower pane is the active and press ctrl-f4 to close the duplicated view and the pane.
In sublime global settings (not origami settings!) add
"origami_auto_close_empty_panes": true,
Add the following shortcuts
"keys": ["ctrl+k", "2"],
"command": "chain",
"args":
"commands": [
["create_pane", "direction": "down"],
["clone_file_to_pane", "direction": "down"],
],
,
"keys": ["ctrl+k", "o"], "command": "focus_neighboring_group" ,
to make thechaincommand work (seen in the shortcut), you will also need the Chain of Command package installed.
– wehal3001
Sep 12 '16 at 21:19
@wehal3001 Thanks, updated (also updated the globals settings, where the wrong setting was pasted).
– mrtnlrsn
Sep 13 '16 at 6:48
add a comment |
I would suggest you to use Origami. Its a great plugin for splitting the screen. For better information on keyboard short cuts install it and after restarting Sublime text open Preferences->Package Settings -> Origami -> Key Bindings - Default
For specific to your question I would suggest you to see the short cuts related to cloning of files in the above mentioned file.
add a comment |
It is possible to edit same file in Split mode.
It is best explained in following youtube video.
https://www.youtube.com/watch?v=q2cMEeE1aOk
add a comment |
View -> Layout -> Choose one option or use shortcut
Layout Shortcut
Single Alt + Shift + 1
Columns: 2 Alt + Shift + 2
Columns: 3 Alt + Shift + 3
Columns: 4 Alt + Shift + 4
Rows: 2 Alt + Shift + 8
Rows: 3 Alt + Shift + 9
Grid: 4 Alt + Shift + 5

add a comment |
Kinda little late but I tried to extend @Tobia's answer to set the layout "horizontal" or "vertical" driven by the command argument e.g.
"keys": ["f6"], "command": "split_pane", "args": "split_type": "vertical"
Plugin code:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self, split_type):
w = self.window
if w.num_groups() == 1:
if (split_type == "horizontal"):
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
elif (split_type == "vertical"):
w.run_command('set_layout',
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23957730%2fshowing-the-same-file-in-both-columns-of-a-sublime-text-window%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
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).
11
Ctrl+Shift+2 shortcut for split screen and drag the file over
– Abuzzy
Dec 18 '14 at 14:15
You can also use Windows+Ctrl+arrow key to arrange windows.
– Shital Shah
Apr 15 '16 at 7:22
The cmd in the next post works - shift + Alt + 2 to split into 2 screens, not this one below.
– LED Fantom
Oct 21 '16 at 17:12
@LEDFantom When you say this answer doesn't work, what do you mean? The OP already knew how to create split windows, which is why I didn't explain how to do that in my answer. I'm not sure what the downvote is for.
– MattDMo
Oct 21 '16 at 17:32
@MattDMo , I see what you meant now. How do I remove the down vote?
– LED Fantom
Oct 22 '16 at 2:28
|
show 2 more comments
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).
11
Ctrl+Shift+2 shortcut for split screen and drag the file over
– Abuzzy
Dec 18 '14 at 14:15
You can also use Windows+Ctrl+arrow key to arrange windows.
– Shital Shah
Apr 15 '16 at 7:22
The cmd in the next post works - shift + Alt + 2 to split into 2 screens, not this one below.
– LED Fantom
Oct 21 '16 at 17:12
@LEDFantom When you say this answer doesn't work, what do you mean? The OP already knew how to create split windows, which is why I didn't explain how to do that in my answer. I'm not sure what the downvote is for.
– MattDMo
Oct 21 '16 at 17:32
@MattDMo , I see what you meant now. How do I remove the down vote?
– LED Fantom
Oct 22 '16 at 2:28
|
show 2 more comments
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).
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).
edited Oct 22 '16 at 3:40
answered May 30 '14 at 23:33
MattDMoMattDMo
77.6k16173187
77.6k16173187
11
Ctrl+Shift+2 shortcut for split screen and drag the file over
– Abuzzy
Dec 18 '14 at 14:15
You can also use Windows+Ctrl+arrow key to arrange windows.
– Shital Shah
Apr 15 '16 at 7:22
The cmd in the next post works - shift + Alt + 2 to split into 2 screens, not this one below.
– LED Fantom
Oct 21 '16 at 17:12
@LEDFantom When you say this answer doesn't work, what do you mean? The OP already knew how to create split windows, which is why I didn't explain how to do that in my answer. I'm not sure what the downvote is for.
– MattDMo
Oct 21 '16 at 17:32
@MattDMo , I see what you meant now. How do I remove the down vote?
– LED Fantom
Oct 22 '16 at 2:28
|
show 2 more comments
11
Ctrl+Shift+2 shortcut for split screen and drag the file over
– Abuzzy
Dec 18 '14 at 14:15
You can also use Windows+Ctrl+arrow key to arrange windows.
– Shital Shah
Apr 15 '16 at 7:22
The cmd in the next post works - shift + Alt + 2 to split into 2 screens, not this one below.
– LED Fantom
Oct 21 '16 at 17:12
@LEDFantom When you say this answer doesn't work, what do you mean? The OP already knew how to create split windows, which is why I didn't explain how to do that in my answer. I'm not sure what the downvote is for.
– MattDMo
Oct 21 '16 at 17:32
@MattDMo , I see what you meant now. How do I remove the down vote?
– LED Fantom
Oct 22 '16 at 2:28
11
11
Ctrl+Shift+2 shortcut for split screen and drag the file over
– Abuzzy
Dec 18 '14 at 14:15
Ctrl+Shift+2 shortcut for split screen and drag the file over
– Abuzzy
Dec 18 '14 at 14:15
You can also use Windows+Ctrl+arrow key to arrange windows.
– Shital Shah
Apr 15 '16 at 7:22
You can also use Windows+Ctrl+arrow key to arrange windows.
– Shital Shah
Apr 15 '16 at 7:22
The cmd in the next post works - shift + Alt + 2 to split into 2 screens, not this one below.
– LED Fantom
Oct 21 '16 at 17:12
The cmd in the next post works - shift + Alt + 2 to split into 2 screens, not this one below.
– LED Fantom
Oct 21 '16 at 17:12
@LEDFantom When you say this answer doesn't work, what do you mean? The OP already knew how to create split windows, which is why I didn't explain how to do that in my answer. I'm not sure what the downvote is for.
– MattDMo
Oct 21 '16 at 17:32
@LEDFantom When you say this answer doesn't work, what do you mean? The OP already knew how to create split windows, which is why I didn't explain how to do that in my answer. I'm not sure what the downvote is for.
– MattDMo
Oct 21 '16 at 17:32
@MattDMo , I see what you meant now. How do I remove the down vote?
– LED Fantom
Oct 22 '16 at 2:28
@MattDMo , I see what you meant now. How do I remove the down vote?
– LED Fantom
Oct 22 '16 at 2:28
|
show 2 more comments
Its Shift + Alt + 2 to split into 2 screens. More options are found under the menu item View -> Layout.
Once the screen is split, you can open files using the shortcuts:
1. Ctrl + P (From existing directories within sublime) or
2. Ctrl + O(Browse directory)
2
To expand, CTRL + P will allow you to "open" the same file more than once.
– jayflo
Jun 23 '16 at 20:13
add a comment |
Its Shift + Alt + 2 to split into 2 screens. More options are found under the menu item View -> Layout.
Once the screen is split, you can open files using the shortcuts:
1. Ctrl + P (From existing directories within sublime) or
2. Ctrl + O(Browse directory)
2
To expand, CTRL + P will allow you to "open" the same file more than once.
– jayflo
Jun 23 '16 at 20:13
add a comment |
Its Shift + Alt + 2 to split into 2 screens. More options are found under the menu item View -> Layout.
Once the screen is split, you can open files using the shortcuts:
1. Ctrl + P (From existing directories within sublime) or
2. Ctrl + O(Browse directory)
Its Shift + Alt + 2 to split into 2 screens. More options are found under the menu item View -> Layout.
Once the screen is split, you can open files using the shortcuts:
1. Ctrl + P (From existing directories within sublime) or
2. Ctrl + O(Browse directory)
edited Nov 8 '16 at 21:19
Hizqeel
88931620
88931620
answered Jan 2 '15 at 5:52
RamrajRamraj
1,357915
1,357915
2
To expand, CTRL + P will allow you to "open" the same file more than once.
– jayflo
Jun 23 '16 at 20:13
add a comment |
2
To expand, CTRL + P will allow you to "open" the same file more than once.
– jayflo
Jun 23 '16 at 20:13
2
2
To expand, CTRL + P will allow you to "open" the same file more than once.
– jayflo
Jun 23 '16 at 20:13
To expand, CTRL + P will allow you to "open" the same file more than once.
– jayflo
Jun 23 '16 at 20:13
add a comment |
Inside sublime editor,Find the Tab named View,
View --> Layout --> "select your need"
1
View --> Layout --> "select your need"select your needs = [single,columns,rows,grids]. So this means the options available when you go to Layout .try out first ,Tested in Sublime 2.
– sg28
Jan 29 '16 at 23:02
2
I wish I could upvote this answer twice.
– PDKnight
Aug 11 '16 at 14:02
appreciate the menu navigation instead of just a shortcut which happens to work for some users and doesn't explain what sublime feature is in use - which the menu clearly defines. :)
– keen
Dec 22 '17 at 17:17
This should be the only accepted, this is what worked for me. The accepted one doesn't work anymore. Probably it doesn't work in current versions.
– VaTo
Jan 8 at 23:11
add a comment |
Inside sublime editor,Find the Tab named View,
View --> Layout --> "select your need"
1
View --> Layout --> "select your need"select your needs = [single,columns,rows,grids]. So this means the options available when you go to Layout .try out first ,Tested in Sublime 2.
– sg28
Jan 29 '16 at 23:02
2
I wish I could upvote this answer twice.
– PDKnight
Aug 11 '16 at 14:02
appreciate the menu navigation instead of just a shortcut which happens to work for some users and doesn't explain what sublime feature is in use - which the menu clearly defines. :)
– keen
Dec 22 '17 at 17:17
This should be the only accepted, this is what worked for me. The accepted one doesn't work anymore. Probably it doesn't work in current versions.
– VaTo
Jan 8 at 23:11
add a comment |
Inside sublime editor,Find the Tab named View,
View --> Layout --> "select your need"
Inside sublime editor,Find the Tab named View,
View --> Layout --> "select your need"
answered Jan 29 '16 at 21:20
sg28sg28
1,100717
1,100717
1
View --> Layout --> "select your need"select your needs = [single,columns,rows,grids]. So this means the options available when you go to Layout .try out first ,Tested in Sublime 2.
– sg28
Jan 29 '16 at 23:02
2
I wish I could upvote this answer twice.
– PDKnight
Aug 11 '16 at 14:02
appreciate the menu navigation instead of just a shortcut which happens to work for some users and doesn't explain what sublime feature is in use - which the menu clearly defines. :)
– keen
Dec 22 '17 at 17:17
This should be the only accepted, this is what worked for me. The accepted one doesn't work anymore. Probably it doesn't work in current versions.
– VaTo
Jan 8 at 23:11
add a comment |
1
View --> Layout --> "select your need"select your needs = [single,columns,rows,grids]. So this means the options available when you go to Layout .try out first ,Tested in Sublime 2.
– sg28
Jan 29 '16 at 23:02
2
I wish I could upvote this answer twice.
– PDKnight
Aug 11 '16 at 14:02
appreciate the menu navigation instead of just a shortcut which happens to work for some users and doesn't explain what sublime feature is in use - which the menu clearly defines. :)
– keen
Dec 22 '17 at 17:17
This should be the only accepted, this is what worked for me. The accepted one doesn't work anymore. Probably it doesn't work in current versions.
– VaTo
Jan 8 at 23:11
1
1
View --> Layout --> "select your need" select your needs = [single,columns,rows,grids]. So this means the options available when you go to Layout .try out first ,Tested in Sublime 2.– sg28
Jan 29 '16 at 23:02
View --> Layout --> "select your need" select your needs = [single,columns,rows,grids]. So this means the options available when you go to Layout .try out first ,Tested in Sublime 2.– sg28
Jan 29 '16 at 23:02
2
2
I wish I could upvote this answer twice.
– PDKnight
Aug 11 '16 at 14:02
I wish I could upvote this answer twice.
– PDKnight
Aug 11 '16 at 14:02
appreciate the menu navigation instead of just a shortcut which happens to work for some users and doesn't explain what sublime feature is in use - which the menu clearly defines. :)
– keen
Dec 22 '17 at 17:17
appreciate the menu navigation instead of just a shortcut which happens to work for some users and doesn't explain what sublime feature is in use - which the menu clearly defines. :)
– keen
Dec 22 '17 at 17:17
This should be the only accepted, this is what worked for me. The accepted one doesn't work anymore. Probably it doesn't work in current versions.
– VaTo
Jan 8 at 23:11
This should be the only accepted, this is what worked for me. The accepted one doesn't work anymore. Probably it doesn't work in current versions.
– VaTo
Jan 8 at 23:11
add a comment |
Here is a simple plugin to "open / close a splitter" into the current file, as found in other editors:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self):
w = self.window
if w.num_groups() == 1:
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
Save it as Packages/User/split_pane.py and bind it to some hotkey:
"keys": ["f6"], "command": "split_pane",
If you want to change to vertical split change with following
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
add a comment |
Here is a simple plugin to "open / close a splitter" into the current file, as found in other editors:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self):
w = self.window
if w.num_groups() == 1:
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
Save it as Packages/User/split_pane.py and bind it to some hotkey:
"keys": ["f6"], "command": "split_pane",
If you want to change to vertical split change with following
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
add a comment |
Here is a simple plugin to "open / close a splitter" into the current file, as found in other editors:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self):
w = self.window
if w.num_groups() == 1:
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
Save it as Packages/User/split_pane.py and bind it to some hotkey:
"keys": ["f6"], "command": "split_pane",
If you want to change to vertical split change with following
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
Here is a simple plugin to "open / close a splitter" into the current file, as found in other editors:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self):
w = self.window
if w.num_groups() == 1:
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
Save it as Packages/User/split_pane.py and bind it to some hotkey:
"keys": ["f6"], "command": "split_pane",
If you want to change to vertical split change with following
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
edited Jun 13 '17 at 21:15
J4cK
22.4k63449
22.4k63449
answered Feb 2 '16 at 16:09
TobiaTobia
10.9k35066
10.9k35066
add a comment |
add a comment |
I regularly work on the same file in 2 different positions. I solved this in Sublime Text 3 using origami and chain with some additional config.
My workflow is ctrl-k 2 splits the view of the file in two (horizontal) panes with the lower one active. Use ctrl-k o to toggle between the panes. When done ensure the lower pane is the active and press ctrl-f4 to close the duplicated view and the pane.
In sublime global settings (not origami settings!) add
"origami_auto_close_empty_panes": true,
Add the following shortcuts
"keys": ["ctrl+k", "2"],
"command": "chain",
"args":
"commands": [
["create_pane", "direction": "down"],
["clone_file_to_pane", "direction": "down"],
],
,
"keys": ["ctrl+k", "o"], "command": "focus_neighboring_group" ,
to make thechaincommand work (seen in the shortcut), you will also need the Chain of Command package installed.
– wehal3001
Sep 12 '16 at 21:19
@wehal3001 Thanks, updated (also updated the globals settings, where the wrong setting was pasted).
– mrtnlrsn
Sep 13 '16 at 6:48
add a comment |
I regularly work on the same file in 2 different positions. I solved this in Sublime Text 3 using origami and chain with some additional config.
My workflow is ctrl-k 2 splits the view of the file in two (horizontal) panes with the lower one active. Use ctrl-k o to toggle between the panes. When done ensure the lower pane is the active and press ctrl-f4 to close the duplicated view and the pane.
In sublime global settings (not origami settings!) add
"origami_auto_close_empty_panes": true,
Add the following shortcuts
"keys": ["ctrl+k", "2"],
"command": "chain",
"args":
"commands": [
["create_pane", "direction": "down"],
["clone_file_to_pane", "direction": "down"],
],
,
"keys": ["ctrl+k", "o"], "command": "focus_neighboring_group" ,
to make thechaincommand work (seen in the shortcut), you will also need the Chain of Command package installed.
– wehal3001
Sep 12 '16 at 21:19
@wehal3001 Thanks, updated (also updated the globals settings, where the wrong setting was pasted).
– mrtnlrsn
Sep 13 '16 at 6:48
add a comment |
I regularly work on the same file in 2 different positions. I solved this in Sublime Text 3 using origami and chain with some additional config.
My workflow is ctrl-k 2 splits the view of the file in two (horizontal) panes with the lower one active. Use ctrl-k o to toggle between the panes. When done ensure the lower pane is the active and press ctrl-f4 to close the duplicated view and the pane.
In sublime global settings (not origami settings!) add
"origami_auto_close_empty_panes": true,
Add the following shortcuts
"keys": ["ctrl+k", "2"],
"command": "chain",
"args":
"commands": [
["create_pane", "direction": "down"],
["clone_file_to_pane", "direction": "down"],
],
,
"keys": ["ctrl+k", "o"], "command": "focus_neighboring_group" ,
I regularly work on the same file in 2 different positions. I solved this in Sublime Text 3 using origami and chain with some additional config.
My workflow is ctrl-k 2 splits the view of the file in two (horizontal) panes with the lower one active. Use ctrl-k o to toggle between the panes. When done ensure the lower pane is the active and press ctrl-f4 to close the duplicated view and the pane.
In sublime global settings (not origami settings!) add
"origami_auto_close_empty_panes": true,
Add the following shortcuts
"keys": ["ctrl+k", "2"],
"command": "chain",
"args":
"commands": [
["create_pane", "direction": "down"],
["clone_file_to_pane", "direction": "down"],
],
,
"keys": ["ctrl+k", "o"], "command": "focus_neighboring_group" ,
edited Sep 13 '16 at 6:51
answered Jul 29 '16 at 8:33
mrtnlrsnmrtnlrsn
168111
168111
to make thechaincommand work (seen in the shortcut), you will also need the Chain of Command package installed.
– wehal3001
Sep 12 '16 at 21:19
@wehal3001 Thanks, updated (also updated the globals settings, where the wrong setting was pasted).
– mrtnlrsn
Sep 13 '16 at 6:48
add a comment |
to make thechaincommand work (seen in the shortcut), you will also need the Chain of Command package installed.
– wehal3001
Sep 12 '16 at 21:19
@wehal3001 Thanks, updated (also updated the globals settings, where the wrong setting was pasted).
– mrtnlrsn
Sep 13 '16 at 6:48
to make the
chain command work (seen in the shortcut), you will also need the Chain of Command package installed.– wehal3001
Sep 12 '16 at 21:19
to make the
chain command work (seen in the shortcut), you will also need the Chain of Command package installed.– wehal3001
Sep 12 '16 at 21:19
@wehal3001 Thanks, updated (also updated the globals settings, where the wrong setting was pasted).
– mrtnlrsn
Sep 13 '16 at 6:48
@wehal3001 Thanks, updated (also updated the globals settings, where the wrong setting was pasted).
– mrtnlrsn
Sep 13 '16 at 6:48
add a comment |
I would suggest you to use Origami. Its a great plugin for splitting the screen. For better information on keyboard short cuts install it and after restarting Sublime text open Preferences->Package Settings -> Origami -> Key Bindings - Default
For specific to your question I would suggest you to see the short cuts related to cloning of files in the above mentioned file.
add a comment |
I would suggest you to use Origami. Its a great plugin for splitting the screen. For better information on keyboard short cuts install it and after restarting Sublime text open Preferences->Package Settings -> Origami -> Key Bindings - Default
For specific to your question I would suggest you to see the short cuts related to cloning of files in the above mentioned file.
add a comment |
I would suggest you to use Origami. Its a great plugin for splitting the screen. For better information on keyboard short cuts install it and after restarting Sublime text open Preferences->Package Settings -> Origami -> Key Bindings - Default
For specific to your question I would suggest you to see the short cuts related to cloning of files in the above mentioned file.
I would suggest you to use Origami. Its a great plugin for splitting the screen. For better information on keyboard short cuts install it and after restarting Sublime text open Preferences->Package Settings -> Origami -> Key Bindings - Default
For specific to your question I would suggest you to see the short cuts related to cloning of files in the above mentioned file.
answered Jan 8 '15 at 13:23
Gautam SinghGautam Singh
81111
81111
add a comment |
add a comment |
It is possible to edit same file in Split mode.
It is best explained in following youtube video.
https://www.youtube.com/watch?v=q2cMEeE1aOk
add a comment |
It is possible to edit same file in Split mode.
It is best explained in following youtube video.
https://www.youtube.com/watch?v=q2cMEeE1aOk
add a comment |
It is possible to edit same file in Split mode.
It is best explained in following youtube video.
https://www.youtube.com/watch?v=q2cMEeE1aOk
It is possible to edit same file in Split mode.
It is best explained in following youtube video.
https://www.youtube.com/watch?v=q2cMEeE1aOk
answered Jun 7 '17 at 10:14
Rahul VaradkarRahul Varadkar
12114
12114
add a comment |
add a comment |
View -> Layout -> Choose one option or use shortcut
Layout Shortcut
Single Alt + Shift + 1
Columns: 2 Alt + Shift + 2
Columns: 3 Alt + Shift + 3
Columns: 4 Alt + Shift + 4
Rows: 2 Alt + Shift + 8
Rows: 3 Alt + Shift + 9
Grid: 4 Alt + Shift + 5

add a comment |
View -> Layout -> Choose one option or use shortcut
Layout Shortcut
Single Alt + Shift + 1
Columns: 2 Alt + Shift + 2
Columns: 3 Alt + Shift + 3
Columns: 4 Alt + Shift + 4
Rows: 2 Alt + Shift + 8
Rows: 3 Alt + Shift + 9
Grid: 4 Alt + Shift + 5

add a comment |
View -> Layout -> Choose one option or use shortcut
Layout Shortcut
Single Alt + Shift + 1
Columns: 2 Alt + Shift + 2
Columns: 3 Alt + Shift + 3
Columns: 4 Alt + Shift + 4
Rows: 2 Alt + Shift + 8
Rows: 3 Alt + Shift + 9
Grid: 4 Alt + Shift + 5

View -> Layout -> Choose one option or use shortcut
Layout Shortcut
Single Alt + Shift + 1
Columns: 2 Alt + Shift + 2
Columns: 3 Alt + Shift + 3
Columns: 4 Alt + Shift + 4
Rows: 2 Alt + Shift + 8
Rows: 3 Alt + Shift + 9
Grid: 4 Alt + Shift + 5

answered Oct 15 '18 at 8:54
Mile MijatovicMile Mijatovic
1,1921225
1,1921225
add a comment |
add a comment |
Kinda little late but I tried to extend @Tobia's answer to set the layout "horizontal" or "vertical" driven by the command argument e.g.
"keys": ["f6"], "command": "split_pane", "args": "split_type": "vertical"
Plugin code:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self, split_type):
w = self.window
if w.num_groups() == 1:
if (split_type == "horizontal"):
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
elif (split_type == "vertical"):
w.run_command('set_layout',
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
add a comment |
Kinda little late but I tried to extend @Tobia's answer to set the layout "horizontal" or "vertical" driven by the command argument e.g.
"keys": ["f6"], "command": "split_pane", "args": "split_type": "vertical"
Plugin code:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self, split_type):
w = self.window
if w.num_groups() == 1:
if (split_type == "horizontal"):
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
elif (split_type == "vertical"):
w.run_command('set_layout',
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
add a comment |
Kinda little late but I tried to extend @Tobia's answer to set the layout "horizontal" or "vertical" driven by the command argument e.g.
"keys": ["f6"], "command": "split_pane", "args": "split_type": "vertical"
Plugin code:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self, split_type):
w = self.window
if w.num_groups() == 1:
if (split_type == "horizontal"):
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
elif (split_type == "vertical"):
w.run_command('set_layout',
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
Kinda little late but I tried to extend @Tobia's answer to set the layout "horizontal" or "vertical" driven by the command argument e.g.
"keys": ["f6"], "command": "split_pane", "args": "split_type": "vertical"
Plugin code:
import sublime_plugin
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self, split_type):
w = self.window
if w.num_groups() == 1:
if (split_type == "horizontal"):
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 0.33, 1.0],
'cells': [[0, 0, 1, 1], [0, 1, 1, 2]]
)
elif (split_type == "vertical"):
w.run_command('set_layout',
"cols": [0.0, 0.46, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
)
w.focus_group(0)
w.run_command('clone_file')
w.run_command('move_to_group', 'group': 1)
w.focus_group(1)
else:
w.focus_group(1)
w.run_command('close')
w.run_command('set_layout',
'cols': [0.0, 1.0],
'rows': [0.0, 1.0],
'cells': [[0, 0, 1, 1]]
)
answered Jan 5 at 0:55
NEONEO
9214
9214
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23957730%2fshowing-the-same-file-in-both-columns-of-a-sublime-text-window%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown