.vimrc: add `:w!!` for sudo-write

This commit is contained in:
Lexi Stelter 2020-01-29 11:14:52 +01:00
parent e87b59aa6b
commit 9608618a3c
1 changed files with 3 additions and 0 deletions

3
.vimrc
View File

@ -75,6 +75,9 @@ command! -nargs=0 -bar Update if &modified
nnoremap <silent> <C-s> :<C-u>Update<CR>
inoremap <C-s> <C-o>:Update<CR>
" sudo-write with :w!!
cnoremap w!! w !sudo tee >/dev/null %
" Edit (\ev) and reload (\rv) .vimrc (reload .gvimrc if running gvim)
nnoremap <leader>ev :split $MYVIMRC<CR>
if has('gui_running')