Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editing remote files over SSH, using TextMate?

Tags:

macos

textmate

I LOVE using TextMate on my MacBook. It's great.

Unfortunately, I want to edit some files directly on my dev server, since it's difficult to recreate the environment locally. I'm using Git, so one alternative is to just edit locally, git commit, git push, and then git merge, but that's kind of complicated every time I want to make a simple change.

I'd rather just ... use another solution. One thing I tried is mounting a hard drive via MacFusion, and then loading that in an editor. But that's so freaking laggy/slow!

Has anyone cooked up a better solution?

like image 529
Zack Burt Avatar asked Apr 08 '10 05:04

Zack Burt


2 Answers

OK - here is the one that works on Mountain Lion.

  1. Go to http://osxfuse.github.com/
  2. Install FUSE for OS X
  3. Install SSHFS for OS X
  4. Then the following commands on your terminal:

mkdir /Volumes/SSHFS

/usr/local/bin/sshfs username@host:/path/to/dir /Volumes/SSHFS 

Done.

I would also recommend using the ReMate plugin as pointed out by another user to prevent TextMate from beach-balling every time you refocus it. Link:

ReMate http://ciaranwal.sh/remate

like image 69
Kim Sharma Avatar answered Oct 10 '22 17:10

Kim Sharma


I use Fetch and TextMate for just such tasks. Fetch can be set to use TextMate as an external editor and can even automatically open files in TextMate by double clicking.

Saving the window in TextMate automatically pushes the file back to the server. Of course you would have to commit the changes on the server at a later time.

I'm sure most Mac FTP clients could do the same.

like image 30
Scott Giese Avatar answered Oct 10 '22 18:10

Scott Giese