Use rmate with Sublime Text, an improved fork of rsub.
- Total 1K
- Win 348
- OS X 591
- Linux 224
|Feb 25||Feb 24||Feb 23||Feb 22||Feb 21||Feb 20||Feb 19||Feb 18||Feb 17||Feb 16||Feb 15||Feb 14||Feb 13||Feb 12||Feb 11||Feb 10||Feb 9||Feb 8||Feb 7||Feb 6||Feb 5||Feb 4||Feb 3||Feb 2||Feb 1||Jan 31||Jan 30||Jan 29||Jan 28||Jan 27||Jan 26||Jan 25||Jan 24||Jan 23||Jan 22||Jan 21||Jan 20||Jan 19||Jan 18||Jan 17||Jan 16||Jan 15||Jan 14||Jan 13||Jan 12||Jan 11|
RemoteSubl starts as a fork of rsub to bring
rmate feature of TextMate to Sublime Text. It transfers files to be edited from remote server using SSH port forward and transfers the files back when they are saved.
Comparing to rsub, the followings are enhanced:
- support multiple files via
rmate foo bar.
- use the same view when opening the same file twice.
- notify when connection lost.
- resume previous connection when it was lost.
- better status bar messages when saving file and when encountering errors.
- bring up Sublime Text on different platforms.
Why a new fork? It seems that the author of rsub is not actively maintaining that package.
RemoteSubl can easily be installed using Package Control.
On the remote server, we need to install rmate (this one is the bash version). You don't have to install it if you have been using
rmate with TextMate or other editors.
It is just the same executable. If not, it (the bash version) can be installed by running this script (assume that you have the right permission),
curl -o /usr/local/bin/rmate https://raw.githubusercontent.com/aurora/rmate/master/rmate sudo chmod +x /usr/local/bin/rmate
You can also rename the command to
mv /usr/local/bin/rmate /usr/local/bin/rsubl
If your remote system does not have
bash (so what else does it have?), there are different versions of
rmate to choose from:
- The official ruby version: https://github.com/textmate/rmate
- A bash version: https://github.com/aurora/rmate
- A perl version: https://github.com/davidolrik/rmate-perl
- A python version: https://github.com/sclukey/rmate-python
- A nim version: https://github.com/aurora/rmate-nim
- A C version: https://github.com/hanklords/rmate.c
- A node.js version: https://github.com/jrnewell/jmate
Open an ssh connection to the remote server with remote port forwarded. It can be done by
ssh -R 52698:localhost:52698 firstname.lastname@example.org
After running the server, you can just open the file on the remote system by
… or if you renamed it to
rsubl then …
If everything has been setup correctly, your should be able to see the opening file in Sublime Text.
It could be tedious to type
-R 52698:localhost:52698 everytime you ssh. To make your
life easier, add the following to
Host example.com RemoteForward 52698 localhost:52698 User user
From now on, you only have to do