vim报错E45: ‘readonly‘ option is set (add ! to override)

In fact, this is caused by permissions. The file is set to read-only. Before the read-only file is modified, sudo needs to be executed, but it has been modified. How to force save? When you only need to save, execute the following command:

:wq! The above command is to force save and exit, and then it's fine!

Guess you like

Origin blog.csdn.net/qq_38220334/article/details/113931061