From e8baf3d4a812bf6b1266e33b2822abaf5d8c2477 Mon Sep 17 00:00:00 2001 From: Tharre Date: Thu, 10 Sep 2015 19:29:07 +0200 Subject: vim: add w!! for saving files as root --- shell/_vimrc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shell') diff --git a/shell/_vimrc b/shell/_vimrc index f91c575..2123c9b 100644 --- a/shell/_vimrc +++ b/shell/_vimrc @@ -61,6 +61,9 @@ colorscheme distinguished " remove trailing whitespaces on save autocmd BufWritePre * :%s/\s\+$//e +" save file with root permissions +cmap w!! w !sudo tee % >/dev/null + " Markdown autocmd BufRead,BufNew *.md set filetype=markdown @@ -80,3 +83,5 @@ vmap (EasyAlign) " Start interactive EasyAlign for a motion/text object (e.g. gaip) nmap ga (EasyAlign) + + -- cgit v1.2.3-70-g09d2