How can I automatically upload files to remote server when I make changes I want to automatically upload files to a remote server when I make any changes in them using some editor. Is there some app which I can use for this purpose? 

I know that this kind of thing is available in Panic Coda, but I want to continue using my favorite editor instead of switching to Coda.
It may depend on what type of files and what type of connection to the server you're using, but a good starting point would probably be Cyberduck, an FTP/SFTP client. You can open files directly off the server with any program on your Mac you choose, edit them as you would a local file (I believe they're actually stored in temporary local storage), and uploaded whenever your changes are saved.

Most other FTP programs should have this functionality built in as well.