Last active
March 21, 2025 16:49
-
-
Save mw3i/8e4254e3f41056d26999816411e8f40d to your computer and use it in GitHub Desktop.
Run a sublime text python build on a remote server using ssh.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// This build system connects to the server; cd's into the parent dir of the file, executes the script, and returns the result locally. | |
// | |
// It assumes you have the remote file loaded (e.g., via SSHFS) locally at `/path/to/sshfs/dir/` which has remote path `/remote/path/` (<-- replace those with your use case). | |
// | |
// Also note that you probably won't be able to type the ssh password, so you'll need to set up key-based authentication with ssh (e.g., `ssh-keygen -t rsa -b 4096 && ssh-copy-id [email protected]`). | |
// It doesn't flag the line in the sublime text pane unfortunately; I'm not sure how to do that | |
{ | |
"cmd": ["ssh", "[email protected]", "cd", "'${file_path/path\\/to\\/sshfs\\/dir/remote\\/path/}'", "&&", "/remote/path/to/python/bin/python3", "'${file/path\\/to\\/sshfs\\/dir/remote\\/path/}'"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment