nvim/after/plugin/sudowrite.vim

3 lines
153 B
VimL
Raw Permalink Normal View History

command! -nargs=? -complete=file SudoEdit exec ':e suda://' . fnamemodify(empty(<q-args>) ? expand('%') : <q-args>, ':p')
command! SudoWrite :w suda://%