sudo save in vim code example Example 1: vim sudo write :w !sudo tee % Example 2: take sudo access inside vim w !sudo tee %