Skip to content

macsplit/sublime-syncstatus-plugin

Repository files navigation

SyncStatus

SyncStatus is a Sublime Text 4 plugin that checks whether local files match files on a remote Linux server using an existing Sublime SFTP sftp-config.json.

It reads the SFTP config from the selected file or folder, maps local paths relative to the config directory, and compares local MD5/mtime values with remote md5sum and stat output over SSH.

Features

  • Sidebar and command palette commands.
  • Normal report with only files needing attention.
  • Detailed report with timestamp-only matches, remote Git context, and capped diffs for changed files.
  • Markdown-formatted scratch reports using Sublime's Markdown syntax.
  • Batched remote checks to avoid one SSH connection per file.
  • Linux-only guard, matching the intended Linux-to-Linux workflow.

Commands

  • Check Sync Status: concise report.
  • Check Sync Status: Detailed Report: includes timestamp-only matches, remote Git context, and capped diffs.

Screenshot

Markdown sync report

Requirements

  • Sublime Text 4.
  • Linux local machine.
  • Remote Linux server with md5sum, stat, diff, and optionally git.
  • SSH access already configured so ssh -o BatchMode=yes user@host ... does not prompt.
  • A Sublime SFTP sftp-config.json at or above the selected file/folder.

Assumptions And Limits

  • The directory containing sftp-config.json is treated as the local sync root.
  • remote_path from sftp-config.json is treated as the remote sync root.
  • Files are compared by MD5 hash first; mtimes are used only to classify differing files.
  • Timestamp-only differences are not content conflicts.
  • Remote checks use SSH subprocess calls, so network latency and server load still matter.
  • Detailed diffs send the local file content over SSH stdin and compare it to the remote file.
  • Diffs are capped to keep reports usable.
  • The plugin does not upload, download, delete, or modify remote files.
  • Sidebar file badges are not implemented because Sublime's public Python API does not expose arbitrary per-file sidebar badges.
  • Dotfiles and dot-directories are skipped during folder scans.
  • ignore_regexes from sftp-config.json are honored for folder scans.

Status Labels

  • MATCH: content and mtime match.
  • CONTENT_MATCH_MTIME_DIFFERS: content matches, mtime differs.
  • LOCAL_NEWER: content differs and local mtime is newer.
  • REMOTE_NEWER: content differs and remote mtime is newer.
  • CONFLICT: content differs and mtimes are identical.
  • REMOTE_MISSING: local file has no remote counterpart.
  • ERROR: config, SSH, parsing, or command failure.

Installation

Copy the package files into a Sublime Text package directory, for example:

~/.config/sublime-text/Packages/SyncStatus/

Required files:

  • sync_status.py
  • Default.sublime-commands
  • Side Bar.sublime-menu
  • Context.sublime-menu
  • .python-version

License

GPL-3.0-only. See LICENSE.

About

Sublime Text plugin that checks whether local files match files on a remote Linux server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages