If you’re developing for the web, the chances are good that you have a server out there somewhere running a LAMP stack. If you’re doing a lot of iteration – which is probably a good idea – you’ll want to find a quick way of changing code on your server rather than downloading & uploading all the time.
Option one: Use vi
The cleanest way to develop code on that box is to SSH directly in there, and use vi, but it’s not all roses.
- Great syntax highlighting
- vi is frighteningly fast if you know how to use it
- You can use the same environment from any laptop running os x or linux, and it’s instantly familiar
- You don’t even need to install any software locally
- vi’s learning curve
For newbies like me, watching someone who’s familiar with vi makes me feel like Emmy from Mannequin. (“Where did they hide all the musicians?”)
So, you could spend a long time learning vi, or try something else.
Option two: Use something else
If you’ve ever used Dropbox, you’ll know that having a remote filesystem mounted in Finder makes working with files super easy. Luckily, there’s some great OSS around to help you do just that. Here’s how to get started:
After restarting your mac, you’ll be able to mount both SSH and FTP servers right into your filesystem. Now, you can use your text editor of choice on the mac, directly working on the files you want to play with.
- Use any text editor you want (I use TextWrangler because I’m cheap)
- Use all your mac’s keyboard shortcuts
- You need to install some software locally, so you’re screwed if you have to move between laptops
Being a vi numpty, I chose this second path, and so far it’s working a treat. However, there is a bug in the current version of MacFusion (v2 final).
Macfusion Bug on sshnodelay.so
When connecting over SSH, you’ll note that the connection can’t be made. You’ll see a “remote host disconnected” error, and on examining the log in MacFusion, you’ll see this:
dyld: could not load inserted library: /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshnodelay.so
The solution is to rename the file to something else. Head into Terminal, and type this:
mv sshnodelay.so MOVED_sshnodelay.so
… and voila, you can now mount over SSH no problem! (source)