leVoT8 / remote-sublime

Enables Sublime Text to be activated on remote file from command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remote-sublime

Enables Sublime Text to be activated on remote file from command line. Instructions are credited to:

Additions

Primarily to provide a better configuration tailored to my needs.

Commands

Install on Remote Server

wget -O /usr/local/bin/rsub \https://raw.github.com/aurora/rmate/master/rmate
chmod a+x /usr/local/bin/rsub

Connect to Remote Server

ssh -R 52698:localhost:52698 server_user@server_address

Alternative: Add to your ssh config

This way you do not have to type in that command every time. Fill in the <..>
Last Line Syntax: RemoteForward <local machine>:<port> <remote server>:<port>

Host <hostname>
	User <username>
	HostName <hostname>
	Port <port number>
	IdentityFile <path to identity file>
	RemoteForward localhost:52968 localhost:52968

Command to open a file in Sublime

rsub path_to_file/file.txt

Open ZSHRC or .bashrc (whichever you use) to make a new alias.

alias edit="rsub"

About

Enables Sublime Text to be activated on remote file from command line