Add map to save a file with sudo permissions.

This commit is contained in:
Jeremy Gardais 2015-08-18 17:16:37 +02:00
parent 49d8a2b911
commit 0c22618c47
1 changed files with 5 additions and 2 deletions

7
vimrc
View File

@ -116,8 +116,8 @@ map <C-w><Space> :split<Space>
map <C-w><Return> :vsplit<Space> map <C-w><Return> :vsplit<Space>
" Navigation " Navigation
" Détails sur les buffers: http://vim-fr.org/index.php/Buffer " Détails sur les buffers: http://vim-fr.org/index.php/Buffer
map <leader>t :bp<cr> "map <leader>p :bp<cr>
map <leader>s :bn<cr> "map <leader>s :bn<cr>
map <leader>b <Esc>:b<Space> map <leader>b <Esc>:b<Space>
"Navigation splits "Navigation splits
@ -126,6 +126,9 @@ map <leader>h <C-w>h
map <leader>k <C-w>k map <leader>k <C-w>k
map <leader>l <C-w>l map <leader>l <C-w>l
" Save with sudo permissions
nmap <leader>s :w !sudo tee %<cr>
imap <leader>s <esc>:w !sudo tee %<cr>
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
" UN PEU D'EXERCICE " UN PEU D'EXERCICE