diff --git a/.vimrc b/.vimrc index a636a13..1f3da5b 100644 --- a/.vimrc +++ b/.vimrc @@ -82,4 +82,4 @@ nnoremap :tabnew nnoremap :tabprevious nnoremap :tabnext -command W :execute ':silent w !sudo tee % > /dev/null' | :edit! +cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! diff --git a/.vimrc-gentoo b/.vimrc-gentoo index ebf4a0a..5fa6717 100644 --- a/.vimrc-gentoo +++ b/.vimrc-gentoo @@ -97,7 +97,7 @@ nnoremap :tabprevious nnoremap :tabnext nnoremap :GoRun -command W :execute ':silent w !sudo tee % > /dev/null' | :edit! +cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! " latex autocmd BufWritePost *.tex silent! execute "!pdflatex --shell-escape -synctex=1 -interaction=nonstopmode % > /dev/null " | redraw!