I can not resist the advice to use ssh (scp / sftp) rather then ftp as I think it is more secure.
At any rate, vim will open files or save files over ftp (and scp).
vim ftp://[email protected]//path/to/file.php
Notice the double //
:)
See this tutorial for details.
At any rate, to save a file you are working on locally over ftp, user Nwrite
Nwrite ftp://user@server/path/to/file.php
You can map that in vim with
cmap <Leader>r :Nread ftp://user@server/path/to/file.php
cmap <Leader>w :Nwrite ftp://user@server/path/to/file.php
Leader is a variable, by default it is /, but you can define it as another key
:let mapleader = "+"
For details See:
http://vim.wikia.com/wiki/Best_Vim_Tips#FTP_from_Vim
https://stackoverflow.com/questions/1764263/what-is-the-leader-in-a-vimrc-file