New Sudosave dedicated command
This commit is contained in:
parent
f8f50b4745
commit
11ecf1c17c
8
vimrc
8
vimrc
|
@ -136,8 +136,9 @@ map <leader>k <C-w>k
|
|||
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>
|
||||
command! Sudosave :execute ':silent w !sudo tee % > /dev/null' | :edit!
|
||||
nmap <leader>s :Sudosave<cr>
|
||||
imap <leader>s <esc>:Sudosave<cr>
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" UN PEU D'EXERCICE
|
||||
|
@ -945,7 +946,8 @@ au BufWritePost * call ModeChange()
|
|||
" Display '␠' to mark extra white space at the end of a line
|
||||
" Display '⎵' to mark nbsp (fixed spaces,…)
|
||||
set list
|
||||
set listchars=eol:⏎,nbsp:⎵,tab:▸·,extends:>,precedes:<,trail:␠
|
||||
"set listchars=eol:⏎,nbsp:⎵,tab:▸·,extends:>,precedes:<,trail:␠
|
||||
set listchars=nbsp:⎵,tab:▸·,extends:>,precedes:<,trail:␠
|
||||
" Afficher les espaces superflus en gris clair
|
||||
highlight ExtraWhitespace ctermbg=darkgray guibg=lightred
|
||||
match ExtraWhitespace /\s\+$/
|
||||
|
|
Loading…
Reference in New Issue