From bcbbdb653ef58a0edd92ceecafff135d08c7505e Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Mon, 27 Oct 2014 10:50:52 -0700 Subject: [PATCH] Add override command for sudo save. --- vimrcs/basic.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 2a1a7ca0..8c17c8c6 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -63,7 +63,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 w !sudo tee % > /dev/null """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -73,7 +73,7 @@ command W w !sudo tee % > /dev/null set so=7 " Avoid garbled characters in Chinese language windows OS -let $LANG='en' +let $LANG='en' set langmenu=en source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim @@ -317,7 +317,7 @@ autocmd BufWrite *.coffee :call DeleteTrailingWS() vnoremap gv :call VisualSelection('gv', '') " Open Ack and put the cursor in the right position -map g :Ack +map g :Ack " When you press r you can search and replace the selected text vnoremap r :call VisualSelection('replace', '')