Add map to save a file with sudo permissions.
This commit is contained in:
parent
49d8a2b911
commit
0c22618c47
7
vimrc
7
vimrc
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue