1) Download & install FUSE for OSX.
2) Create an empty local folder to act as a mount point.
3) Mount the filesystem over SSH.
sshfs <username>@<IP or URL>:<remote path> <path to local mount point>
sshfs firstname.lastname@example.org:/var/www/bagend ~/Desktop/mnt
I’m not a huge fan of using Vim or Nano/Pico for lengthy editing sessions on remote servers. This allows me to use Sublime Text (or whatever your editor of choice). I’ve not encountered any latency issues and it’s much smoother than forwarding X (which I never have installed on a webserver anyway).