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.
Vim/NeoVim is just an editor but it relies on scp and ssh to provide access to remote files. So whenever you can ssh into any Linux box, you can also locally edit the file, while remotely saving that file into the remote server.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With