[Level 2] How to get root permission to write file.

If you want to get root permission when you launch vim with normal user. You could try the following command in vim. 1. to write to file. 2. reload the file.
:w !sudo tee [file_name]
:e!

Wish this helps.

regards,
Stanley Huang

Comments

Popular posts from this blog

[Level 1] Rar tool for Solaris.

[Level 2] iif in Python