Remote Text Editor
I was reading about the TextMate 2 Alpha (?) release, and found an interesting post titled TextMate 2 + rmate = Awesome and it started making me think... I use a Windows machine 90% of the time, and the rest of the time i use either a Mac or an iPad. When in Windows, I use Visual Studio or NotePad++ for editing text files. And i started to think: How hard would it be to actually create a remote text editor?
So, thinking about this, i am wondering what and how it would work...
- looking at the idea of rmate above, it seems to open an SSH tunnel between the local and remote machines. the rmate script connects to the local port (local to the remote machine) which tunnels back to the client machine. this gets around a lot of firewall issues... The joys of SSH tunnelling!
- a local service or program is sitting on the local machine waiting for the connection. once connected, the remote machine sends the text to the service, it takes the content and allows you to work on it. when you hit save, it sends it back to the remote machine and it throws it to disk...
My though on this, on how it could be done, is as follows:
- Windows EXE sitting in the desktop tray, liting on a port.
- connect to your remote machine using a simular SSH tunneling command.
- on the remote machine, have a simular script.
- the exe knows your text editor of choice (Notepad, Visual Studio, Notepad++, etc), and when a new request comes in, save the file to a temp location, and open your editor.
- watch that file for changes...
- any time the file changes, send it back over the SSH tunnel to the remote host...
the advantage of this i can see is that your text editor does not need to know about remote connections, and you do not re-write a text editor... now all i need to do is build this... watch this space...