I frequently make small changes to fairly large text files via FTP (*CSS files for web development*) and because my internet connection is terribly slow, it's a very painful process. 

Even if I change only one character of the file, I still have to sit and wait for considerable time while the entire file gets re-uploaded to the server.

Is there some way I can edit remotely-hosted files on my local computer and when I save the file, **only upload the parts of the file which changed**?

**Edit:** I think I've been unclear about how I'm using my FTP client at the moment. Basically, I open a remote file over SFTP using WinSCP. WinSCP saves it to a tmp folder, launches Sublime Text and I start editing it. When I hit save, WinSCP re-uploads the file automatically. I'm never actually saving the file permanently on my computer - everything's done via WinSCP's temp folder. That's why I'm looking for a solution which can be used in this "hit and run" type manner.

---

### Previous Discussion

I previously [posted this question on ServerFault](https://serverfault.com/questions/807932/uploading-only-the-changed-parts-of-a-file-after-remotely-editing-it-to-save-ti) where using something like git was suggested, however as I explained:

> 
> With git or a similar versioning tool I'd have to make a commit each
>  time I save the file, right? Even if that could be done automatically
>  (i.e. if I had a macro which made Ctrl-S in Sublime Text save file and
>  execute a git push at the same time), I might make 50 - 100 tiny edits
>  of a CSS file per hour; surely I'd end up with a spammed-out commit
>  log? Also the git solution is inflexible as it relies on whatever file
>  I'm editing being part of a git repo.
> 
> 
> 

The only solution I can think of so far is some kind of hacked-up process using rsync but even then, it's very fiddly:

1. I download the file(s) I need to my computer (via FTP/rsync/whatever).
2. I open a file in (e.g.) Sublime Text and start making edits.
3. A background process is monitoring the folder for file modifications. When I save a file, that process instantly triggers an rsync operation from my computer to the server, transferring the changed parts of the file.

However, I'd need to manually set up or specify the remote file or directory paths or else the local rsync script won't know where to rsync the files so this method is still pretty inflexible. This method wouldn't let me instantly browse to a random file, open it and save it like an FTP client does.

There's also no visible feedback like an upload progress bar with this method.