ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Prevent​Fake​Clones

by titoBouzout ST2/ST3 Removed

Prevents opening the same file twice, if does not share a buffer (ie is not a clone/duplicate or cloned view/tab/file).

Details

  • 2016.03.18.06.51.42
  • github.​com
  • github.​com
  • 2 years ago
  • 2 years ago
  • 3 years ago

Installs

  • Total 165
  • Win 88
  • OS X 55
  • Linux 22
Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OS X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Description

Prevent Corruption [1] is a simple Sublime Text 3 plug-in which will try hard to prevent situations on which files may be corrupted because of a misinterpretation on how ST works, or just caused by human distraction.

Fake Clones

A fake clone is a file that has been opened in more than one view/tab/column/group/window and does not share a buffer with the first instance of it. Changes in one instance of the file opened will overwrite the other instance, making us lose changes if we don't notice it.​ Specially happens when we have many windows opened, or when the amount of opened files is really huge.​ There are a number of situations on which you may be able to open “fake clones” in the same window.. or in other windows… This package tries hard to Prevent that.

[1] ​I'm sorry this is not about political corruption.

Real Clones

To create a “clone” of a view, you should use: Main Menubar -> File -> “New File Into View”. This will open other view/tab that is a real clone of the file you are writing, and changes to any of the view/tabs will be reflected in all the instances. Some of us consider the name of that menuitem(“New File Into View”) is not appropriated, and opened an issue to try to call attention, please visit: https://github.com/SublimeTextBugs/Issues/issues/34

Bugs

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 currenlty there is no way to move a “real clone” from one window to another. Then, we will likely fail at this for now..

Installation

Download or clone the contents of this repository to a folder named exactly as the package name into the Packages/ folder of ST.

Source-code

https://github.com/titoBouzout/PreventFakeClones

Forum Thread​​

http://www.sublimetext.com/forum/viewtopic.php?f=3&t=16019

License

See license.txt