@Waffelson to linuxmemes • 8 months agoWhen you realized you forgot sudoimagemessage-square43arrow-up1374arrow-down118
arrow-up1356arrow-down1imageWhen you realized you forgot sudo@Waffelson to linuxmemes • 8 months agomessage-square43
minus-squareѕєχυαℓ ρσℓутσρєlinkfedilink4•edit-28 months agoUse suda.vim for automatically dealing with such cases. Works with neovim as well. I’ll also recommend adding the following to your init.lua or some config file because suda doesn’t play nicely with nvim -d or vimdiff. -- Disable Suda in diff views if not vim.api.nvim_win_get_option(0, 'diff') then vim.g.suda_smart_edit = 1 end The vimscript version of the same would be: " Disable Suda in diff views if ! &diff let g:suda_smart_edit = 1 endif
Use suda.vim for automatically dealing with such cases. Works with
neovim
as well.I’ll also recommend adding the following to your
init.lua
or some config file becausesuda
doesn’t play nicely withnvim -d
orvimdiff
.-- Disable Suda in diff views if not vim.api.nvim_win_get_option(0, 'diff') then vim.g.suda_smart_edit = 1 end
The
vimscript
version of the same would be: