Создайте файл в Сабле: sublime_text_4\Packages\User\cursor_positions.py В него кладем # cursor_positions.py
"""
A plugin for SublimeText which saves (remembers) cursor position when
a file is closed.
Install it by copying this file in ~/.config/sublime-text-3/Packages/User/
directory (Linux).
Author: Giampaolo Rodola'
License: MIT
"""
import datetime
import json
import os
import tempfile
import threading
import sublime
import sublime_plugin
SUBLIME_ROOT = os.path.realpath(os.path.join(sublime.packages_path(), '..'))
SESSION_FILE = os.path.join(
SUBLIME_ROOT, "Local", "cursor_positions.session.json")
# when reading the session file on startup, we'll remove entries
# older than X days
RM_FILE_OLDER_THAN_DAYS = 180
print (SESSION_FILE)
def log(*args):
print(" %s: " % os.path.basename(__file__), end="")
print(*args)
class Session:
def __init__(self):
self._lock = threading.Lock()
os.makedirs(os.path.dirname(SESSION_FILE), exist_ok=True)
self.prune_old_entries()
# --- file
def r