Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple views into single file in Sublime Text 3

Tags:

sublimetext3

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)?

like image 996
Joe Casadonte Avatar asked Feb 28 '16 20:02

Joe Casadonte


1 Answers

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.

like image 167
Enteleform Avatar answered Sep 19 '22 07:09

Enteleform