nvim: Add a key binding to save files with sudo

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-04-23 09:37:02 +05:30
parent 8af9c11813
commit 321213894b

View file

@ -186,6 +186,8 @@ set sessionoptions-=blank
set grepprg=rg\ --vimgrep
" --------------------------- Key Bindings -----------------------------------
" Allow saving of files as sudo when I forgot to start vim using sudo
cmap w!! w !sudo tee > /dev/null %
" Remap escape keys to something usable on home row
inoremap jk <Esc>
cnoremap jk <C-C>