nvim: keymappings: Fix the sudo write command

We actually haven't tested this.
https://dev.to/jovica/the-vim-trick-which-will-save-your-time-and-nerves-45pg

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-06-16 10:47:00 +05:30
parent 286558f5af
commit 7b35dd4e78

View file

@ -1,5 +1,5 @@
" Allow saving of files as sudo when I forgot to start vim using sudo
cmap w!! w !sudo tee > /dev/null %
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
" Remap escape keys to something usable on home row
inoremap jk <Esc>
cnoremap jk <C-C>