I do all of my editing in OSX, and have an rsync script watch my project directories and send any changes to an Ubuntu Server Virtual Machine for running / testing.
I like using a virtual machine for mimicking the production environment / setting up and maintaining a LAMP stack, but this is a somewhat complicated setup, and when I work on a different computer, I have to use dropbox or rely on git to keep my different work places in sync. It is also very difficult to set up tools like an IDE with debugging because my host machines don't actually have a LAMP (or any other run-time environment) set up.