With the ftp client gftp2 you can open files in an external editor. Unfortunately all changes on the files are lost with the default properties of gftp2.

Following error message is shown

/tmp/gftp-view.ojAg2S.php erfolgreich mit 23,36 KB/s übertragen
/tmp/gftp-view.ojAg2S.php erfolgreich gelöscht

The editor app is started but the focus goes instantly back to gftp2. So, gftp2 does not recognize file changes in the editor (e.g. gvim). You have to download the file to your local directory, edit and upload it back to your server.

Calling gvim with -f option, gvim stays in focus and files can be edited directly on the remote computer. This can be easily achieved in the gftp2 configuration. In the gftprc (/etc/gftp/gftprc or ~/.gftp/gftprc) config file you have to add this option

# Das Standardprogramm zur Dateibearbeitung.
edit_program=gvim -f