From a66ad42f9219a307280f1a7e6a9eea67b35c79ea Mon Sep 17 00:00:00 2001 From: vincent Date: Thu, 11 Feb 2021 20:26:06 +0100 Subject: [PATCH] add save sudo nvim --- nvim/.config/nvim/init.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 674c7fc..af26985 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -23,7 +23,6 @@ let g:easyescape_chars = { "j": 1, "k": 1 } let g:easyescape_timeout = 100 inoremap jk inoremap kj -map :NERDTreeToggle set ignorecase set smartcase set mouse=a @@ -35,3 +34,8 @@ set shiftwidth=4 " number of spaces to use for autoindent set expandtab " tabs are space set autoindent set copyindent " copy indent from the previous line + +map :NERDTreeToggle + +" Allow saving of files as sudo when I forgot to start vim using sudo. +cmap w!! w !sudo tee > /dev/null %