Add w!! command to force sudo writing

This commit is contained in:
lhark 2017-10-26 11:54:15 -04:00
parent 59250b2cfe
commit de3e9adf71

4
vimrc
View file

@ -146,8 +146,8 @@ inoremap jj <Esc>
"[To move over parenthesis, brackets, quotes in insert-mode]"
inoremap kk <Right>
inoremap hh <Left>
"[Easy omni-completion with Ctrl-Space]"
"inoremap <C-Space> <C-X><C-O>
" http://stackoverflow.com/questions/1005/getting-root-permissions-on-a-file-inside-of-vi
cmap w!! w !sudo tee >/dev/null %
"[To disable the arrow keys]"
for prefix in ['i', 'n', 'v']
for key in ['<Up>', '<Down>', '<Left>', '<Right>']