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...

Posted on 13 December 2011.

Ubuntu, Screen, IRSSI, TTYTter, and anything else...

So, been playing around with the following... though i would post some links...

  • Ubuntu my current choice of Linux... running on a VM on a dedicated server
  • GNU Screen a really handy app for using multiple Termainl "Windows"... Also handy for resuming sessions...
  • IRSSI IRC Client for *nix terminal...
  • TTYtter command line twitter client.
  • Nano Text Editor Using Nano as my text editor... Cannot get used to VI or Emacs... Giving up for the moment...
  • Putty as my SSH client on Windows, SSH built into OSX on my Mac and iSSH on my iPhone and iPad.
  • Still using GIT and Mercurial for different sites and projects. I also use Dropbox for some of my projects (see my HowTo on using Dropbox with Mercurial and Git here, as well as GitHub, Kiln and BitBucket for others. FogBugz Also comes in handy for project managment. Also, nice tip: if your in a small team (2 people or less....) or a student, and need hosting, checkout out FogCreak's Offer. Cant argue with FREE!

As i get more stuff, i will add it here.

Posted on 16 November 2011.

OpenVIM Tutorial

Check out the OpenVIM tutorail for a qalk though on how to use VIM... Only problem i have is i cannot learn this quickly enough... keep doing stupid things, deleting text, and forgetting the commands! I keep having to go back to Nano... One of these days i will figure it out... i am trying!

Posted on 27 September 2011.

OSX Clipboard Tip

Ever want to take the output of a command from the OSX Terminal and stick it in the clipboard for something? Ever want to use the output of the clipboard in your Terminal command? With this handy tip, you can!

Check out the full details at hints.macworld.com, but the basic gist is:

ls -al | pbcopy

(contents of the ls -al command now in your clipboard for pasting)

pbpaste > somefile

(paste the contents of the clipboard into the file, somefile... saves you having to open your favorite text editor and pasting in that way!

Posted on 25 September 2011.

PowerShell, Git and SSH Stuff

So, I use both Windows and Mac on a daily basis, and though some of these tips for using PowerShell and Git, and also SSH tips, may be handy.

Posted on 19 September 2011.

About Text

Geek, From Dublin, Ireland. What more can i say?