mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 02:54:40 +02:00
[vim/vimrc] add sudo write alias
This commit is contained in:
parent
cf116aa2a0
commit
9e7984b282
1 changed files with 3 additions and 5 deletions
|
@ -2,11 +2,6 @@
|
|||
"
|
||||
" Environment
|
||||
"
|
||||
" pathogen (must be placed in the beginning of this file)
|
||||
"runtime bundle/pathogen/autoload/pathogen.vim
|
||||
"call pathogen#infect('bundle/{}')
|
||||
"call pathogen#infect('bundle-external/{}')
|
||||
"call pathogen#helptags()
|
||||
|
||||
if &term == "linux"
|
||||
set t_ve+=[?81;0;112c
|
||||
|
@ -52,6 +47,9 @@ filetype plugin on " enable filetype-specific plugins
|
|||
" auto reload vimrc when editing it
|
||||
autocmd! BufWritePost .vimrc source ~/.vimrc
|
||||
|
||||
" ask for password and write file with sudo rights
|
||||
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
|
||||
|
||||
" disable annoying sound on errors
|
||||
set noerrorbells
|
||||
set novisualbell
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue