[vim/vimrc] add sudo write alias

This commit is contained in:
Felix Buehler 2019-12-24 13:56:45 +01:00
parent cf116aa2a0
commit 9e7984b282

View file

@ -2,11 +2,6 @@
" "
" Environment " Environment
" "
" pathogen (must be placed in the beginning of this file)
"runtime bundle/pathogen/autoload/pathogen.vim
"call pathogen#infect('bundle/{}')
"call pathogen#infect('bundle-external/{}')
"call pathogen#helptags()
if &term == "linux" if &term == "linux"
set t_ve+=[?81;0;112c set t_ve+=[?81;0;112c
@ -52,6 +47,9 @@ filetype plugin on " enable filetype-specific plugins
" auto reload vimrc when editing it " auto reload vimrc when editing it
autocmd! BufWritePost .vimrc source ~/.vimrc autocmd! BufWritePost .vimrc source ~/.vimrc
" ask for password and write file with sudo rights
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
" disable annoying sound on errors " disable annoying sound on errors
set noerrorbells set noerrorbells
set novisualbell set novisualbell