diff options
author | Tharre <tharre3@gmail.com> | 2015-09-10 19:29:07 +0200 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2016-10-07 20:13:35 +0000 |
commit | e8baf3d4a812bf6b1266e33b2822abaf5d8c2477 (patch) | |
tree | 912c3a61286a44848d5adf205925abf55924d210 | |
parent | 9197762f07f34b60a929986b2b6de947086b07fc (diff) | |
download | dotfiles-e8baf3d4a812bf6b1266e33b2822abaf5d8c2477.tar.gz dotfiles-e8baf3d4a812bf6b1266e33b2822abaf5d8c2477.tar.xz dotfiles-e8baf3d4a812bf6b1266e33b2822abaf5d8c2477.zip |
vim: add w!! for saving files as root
-rw-r--r-- | shell/_vimrc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/_vimrc b/shell/_vimrc index f91c575..2123c9b 100644 --- a/shell/_vimrc +++ b/shell/_vimrc @@ -61,6 +61,9 @@ colorscheme distinguished " remove trailing whitespaces on save autocmd BufWritePre * :%s/\s\+$//e +" save file with root permissions +cmap w!! w !sudo tee % >/dev/null + " Markdown autocmd BufRead,BufNew *.md set filetype=markdown @@ -80,3 +83,5 @@ vmap <Enter> <Plug>(EasyAlign) " Start interactive EasyAlign for a motion/text object (e.g. gaip) nmap ga <Plug>(EasyAlign) + + |