From f9f831365ee9f12ab79c7e9af325600b9413609f Mon Sep 17 00:00:00 2001 From: gryf Date: Tue, 9 Oct 2018 11:29:18 +0200 Subject: [PATCH] Added command W for writing files with sudo --- vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vimrc b/vimrc index 1b8eeec..93eb4c7 100644 --- a/vimrc +++ b/vimrc @@ -692,6 +692,9 @@ function CreateScratch() new|setl bt=nofile bh=wipe nobl return "" endfunction + +"write files as a root using sudo +command W w !sudo tee "%" > /dev/null "}}} " GUI: detect graphics mode, set colorscheme {{{ if has('gui_running')