add save sudo nvim

This commit is contained in:
vincent 2021-02-11 20:26:06 +01:00
parent 4f3f51e8ca
commit a66ad42f92

View File

@ -23,7 +23,6 @@ let g:easyescape_chars = { "j": 1, "k": 1 }
let g:easyescape_timeout = 100 let g:easyescape_timeout = 100
inoremap jk <esc> inoremap jk <esc>
inoremap kj <esc> inoremap kj <esc>
map <C-n> :NERDTreeToggle<CR>
set ignorecase set ignorecase
set smartcase set smartcase
set mouse=a set mouse=a
@ -35,3 +34,8 @@ set shiftwidth=4 " number of spaces to use for autoindent
set expandtab " tabs are space set expandtab " tabs are space
set autoindent set autoindent
set copyindent " copy indent from the previous line set copyindent " copy indent from the previous line
map <C-n> :NERDTreeToggle<CR>
" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %