linux保存文件報錯問題(readonly option is set)

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

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 來保存文件了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章