Vim edit document error is read-only (add! to override)

1. Force exit first

:q!

2. After exiting, execute

:sudo !!

3. Edit the content you want to edit again

vim ...

4. Save it again

:wq!

Guess you like

Origin blog.csdn.net/xiaohaigary/article/details/108529460