Exemplu: vim /etc/hosts
Modifica ceva, :wq
Eroare: E45: 'readonly' option is set (add ! to override)

Solutie:
In mod normal, iesi, si reintri cu sudo vim /etc/hosts
Altfel, in aceeasi fereastra, :w !sudo tee %

Explicatie

Bingo!