dotwryn/vim/utility.vim
2022-08-09 17:56:06 -06:00

12 lines
194 B
VimL

function Sudowrite()
execute 'w !sudo tee "%"'
endfunction
function MakeFileExecutable(sudo = 0)
if a:sudo
execute '! sudo chmod +x "%"'
else
execute '! chmod +x "%"'
endif
endfunction