projects
/
~bandali
/
configs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
58b04a4
)
[vim] save file as root with <leader>w
author
Amin Bandali
<me@aminb.org>
Thu, 28 May 2015 02:36:37 +0000
(22:36 -0400)
committer
Amin Bandali
<me@aminb.org>
Thu, 28 May 2015 02:36:37 +0000
(22:36 -0400)
vim/.vimrc
patch
|
blob
|
blame
|
history
diff --git
a/vim/.vimrc
b/vim/.vimrc
index
30a982c
..
7b64c49
100644
(file)
--- a/
vim/.vimrc
+++ b/
vim/.vimrc
@@
-120,8
+120,8
@@
function! StripWhitespace()
call setreg('/', old_query)
endfunction
noremap <leader>ss :call StripWhitespace()<CR>
call setreg('/', old_query)
endfunction
noremap <leader>ss :call StripWhitespace()<CR>
-" Save a file as root (,
W
)
-noremap <leader>
W
:w !sudo tee % > /dev/null<CR>
+" Save a file as root (,
w
)
+noremap <leader>
w
:w !sudo tee % > /dev/null<CR>
" Automatic commands
if has("autocmd")
" Automatic commands
if has("autocmd")