From 9e7984b282a5514e065ce09394f3228a106bfe64 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 24 Dec 2019 13:56:45 +0100 Subject: [PATCH] [vim/vimrc] add sudo write alias --- vim/vimrc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 5e3a6f0..18f483d 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -2,11 +2,6 @@ " " 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" set t_ve+=[?81;0;112c @@ -52,6 +47,9 @@ filetype plugin on " enable filetype-specific plugins " auto reload vimrc when editing it 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 set noerrorbells set novisualbell