To expand on my comment…
Vim doesn't do that kind of fancy thing on the remote machine, no matter what account you use. It's limited to downloading and uploading: reading a remote file means downloading the file in a temporary location on your local machine, writing a remote file means uploading the local copy to the remote machine.
It means that you won't be able to sudo before editing on the remote machine.
If the account used to write/upload the file is not root you can't overwrite the root-owned file. That's basic UNIX/server security.
Instead, ssh into the server and use Vim there or use KL-7's snippet with the right account.
See :help netrw-xfer, and :help netrw-quickmap for additional features such as directory listing. No sudo in sight.
ssh remoteserver, and on remote server executesudo vim /etc/myfile. OR one command:ssh -t remoteserver sudo vi /etc/myfile– taro Nov 26 '11 at 8:12scp remote:/etc/myfile ~/myfile, editvim ~/myfile, but it will be a problem to overwrite remote file with changed one. – taro Nov 26 '11 at 8:21