From 932547676da4085c7793f4363958d937ff17f780 Mon Sep 17 00:00:00 2001 From: luc Date: Mon, 18 Nov 2019 23:08:22 +0800 Subject: [PATCH] feat(:W):avoid warning such as the buffer was changed --- vimrcs/basic.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 91d3e71a..a363da92 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -50,7 +50,7 @@ nmap w :w! " :W sudo saves the file " (useful for handling the permission-denied error) -command! W w !sudo tee % > /dev/null +command! W execute 'w !sudo tee % > /dev/null' edit! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""