保存vim打开的readonly文件

保存vim打开的readonly文件

一,输入密码:
:w ! sudo tee % > /dev/null
[sudo] password for user:

二,这里按 L键重新将该文件载入缓冲区。
Press ENTER or type command to continue
W12: Warning: File “/etc/profile” has changed and the buffer was changed in Vim as well
See “:help W12” for more info.
[O]K, (L)oad File:

你可能感兴趣的:(android开发)