Wednesday, March 9, 2016

Multiple views into single file in Sublime Text 3

Leave a Comment

In Sublime Text 3 (and ST2), if I have the same file open in multiple windows they are not linked together, so changes made in one window are not reflected in the other -- unless I use "New View into File" to open the subsequent file, in which case they are linked. Even if I do use this option to create the new view, though, if I quit with both views open, when I reopen ST3, the files are no longer linked.

Is there a way to do this so that, no matter how I open the file, if both views point to the same file, they're linked? Or, can I manually link them after the fact (in which case what happens if both views are modified in different ways)?

1 Answers

Answers 1

You can add this to your User/Default.sublime-keymap to give you a quick way to clone files:
{ "keys": ["ctrl+super+n"], "command": "clone_file", },


PreventFakeClones will prevent you from accidentally opening non-linked tabs.

I attempted to modify it for what you requested, but it still does not work when first opening Sublime Text.

The author of PreventFakeClones posted:

Instead of preventing the opening of the “fake clone”, it would be nice to just close the “fake clone” and create a real clone. Problem is that currently there is no way to move a “real clone” from one window to another.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment