dotwryn/vim/utility.vim

12 lines
194 B
VimL
Raw Normal View History

function Sudowrite()
execute 'w !sudo tee "%"'
endfunction
2022-08-09 23:56:06 +00:00
function MakeFileExecutable(sudo = 0)
if a:sudo
execute '! sudo chmod +x "%"'
else
execute '! chmod +x "%"'
endif
2022-01-10 13:36:34 +00:00
endfunction