You can start vim
with a read-only option. This prevents making accidentally changes in files you don't want to touch.
view /file/to/open
view
is actually vim
.
Use case
You have opened many similar files and accidentally type :wq
in the wrong one. Did you make changes? Which changes you made? When do you notice you edited the wrong file?
Posted by Emanuel to makandra dev (2017-04-11 13:42)