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