Reputation: 93216
So i am in a VPS terminal using ssh.
In normal case I could just run locally
mate <file>
and it fires up TextMate with that file.
Is it possible to use the same command and somehow open the local TextMate application but editing the remote file?
That would be good if you are working in VPS and don't want to use vim all the time.
Upvotes: 16
Views: 13472
Reputation: 1689
The solution is to mount the remote system using sshfs
. On OS X, sshfs
can for instance be installed by using Homebrew.
The filesystem is mounted via SSH using your regular SSH credentials or key so it's very easy to do, and then you navigate it as if it's a local directory and enjoy the benefit of having access to all your local tools.
Upvotes: 4
Reputation: 3082
http://kennethreitz.com/remote-textmate-development-via-ssh-and-rsync.html
Upvotes: 0
Reputation: 185
Another option is to use one of the two available Textmate Sync bundles - both use rsync and ssh to keep the remote and local folders synchronized.
Textmate remote sync bundle
This is the bundle I use. It looks to have the exact same functionality as the second bundle but I found this one first.
The only word of warning I would add is the first sync will clear the remote folder and replace it with the contents from the local folder.
Upvotes: 1
Reputation: 22663
You have different options:
I used to do this in a few years back for some projects, and it worked perfectly, both for LANs and WANs.
If you want to stick to TextMate, then furtive's solution is ideal.
Upvotes: 4
Reputation: 36037
Alternatively you could sync the folder with rsync over ssh.
That way you work locally, and let rsync sync it to the server for you. That could either be explicitly initiated by you or be run in a daemon.
Upvotes: 2
Reputation: 3967
If you do ssh to another box then you can open the file using cat and pipe it to a local file. I dont think so that you can stream it to an editor in the local box.
Upvotes: 1