From c37e4c84b026b56bcbc2bbfd7725662b2dc51dd2 Mon Sep 17 00:00:00 2001 From: Ma Chao <814640709@qq.com> Date: Sat, 30 Nov 2019 19:57:52 +0800 Subject: [PATCH] feat(:W):avoid warning such as the buffer was changed (#547) --- vimrcs/basic.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 42e90fe0..4b3173ca 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! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""