用vi修改文件,保存文件時,提示“readonly option is set”的解決方法


來源:http://superuser.com/questions/300500/ubuntu-unable-to-edit-bashrc-file-because-of-readonly

This is a vim issue, not a file permission issue. If you did not have read permission on the file, you'd see a "Permission denied" error.

Do you invoke vi/vim with the -R option? Are you calling view instead of vi or vim? Do you have set readonly in your .vimrc or in a file in ~/.vim/ftplugin?

In vim you can enter :set noreadonly to unset the readonly flag.

步驟:

1.按Esc鍵

2.輸入  :set noreadonly

3.然后就能正常保存了,你可以輸入 :wq 來保存文件了。

轉自:http://blog.csdn.net/longerandlonger/article/details/7266055


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM