You can view a file in the remote machine using vim (or vi) or compare it with a local file using vimdiff by just using scp:
vi scp://kousik@remote.server//home/kousik/remote-file
vimdiff scp://kousik@remote.server//home/kousik/remote-file local-file
You could have copied the remote-file to the local machine first, but this way you don’t have to do it explicitly.
By the way, sftp also works fine.