How do I get sudo permission when vim is saved

  html5, question

When managing an online server, it is often necessary to edit some files that do not belong to the operating user, i.e. those with only R permission. read only will be prompted for each save. You can only write down what you have changed, then quit, and then sudo vim will save it.
Is there any way to directly use vim command to obtain sudo permission without exiting vim process and then save the file?

Please search before asking questions.http://segmentfault.com/q/10100000001 …