/etc insider

since 1999 (and still editing)

Forgotten sudo vim workaround

| Comments

Preferring to use sudo instead of using root account all the time, sometimes I find myself in the middle of vim-session run w/o super-user privileges. I guess this is something not too uncommon so here’s how not to have a romp with all those saving into temproary file then substituting the original with it – do substition in vim itself:

:%!sudo tee %

Comments