Spent 4 hours trying to fix this stupid behavior on ST3 and finally got a plugin working...
import sublime
import sublime_plugin
import os
class NoPreview(sublime_plugin.EventListener):
def on_load(self, view):
if (os.path.exists(view.file_name())):
view.run_command('save')
Save this file in the User Packages directory (~/.config/sublime-text-3/Packages/User/ on Linux). Keep the setting preview_on_click set to true: when a "previewed" file is saved, it becomes a "regular" file. That's all... Note that it's necessary to check that the file actually exists, because some "files" loaded are not actual files (like default settings, for example).
Spent 4 hours trying to fix this stupid behavior on ST3 and finally got a plugin working...
Save this file in the User Packages directory (~/.config/sublime-text-3/Packages/User/ on Linux). Keep the setting preview_on_click set to true: when a "previewed" file is saved, it becomes a "regular" file. That's all...
Note that it's necessary to check that the file actually exists, because some "files" loaded are not actual files (like default settings, for example).