Skip to content

Commit ee4600a

Browse files
Ma Chaoschultzern
authored andcommitted
feat(:W):avoid warning such as the buffer was changed (amix#547)
1 parent 223a918 commit ee4600a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vimrcs/basic.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ nmap <leader>w :w!<cr>
5050
5151
" :W sudo saves the file
5252
" (useful for handling the permission-denied error)
53-
command! W w !sudo tee % > /dev/null
53+
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
5454

5555

5656
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

0 commit comments

Comments
 (0)