|
|
@ -2,7 +2,6 @@
|
|
|
|
if has("autocmd")
|
|
|
|
if has("autocmd")
|
|
|
|
autocmd! bufwritepost .vimrc source ~/.vimrc
|
|
|
|
autocmd! bufwritepost .vimrc source ~/.vimrc
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if !empty(system("setxkbmap -print|grep bepo"))
|
|
|
|
if !empty(system("setxkbmap -print|grep bepo"))
|
|
|
|
source ~/.vimrc.bepo
|
|
|
|
source ~/.vimrc.bepo
|
|
|
|
endif
|
|
|
|
endif
|
|
|
@ -35,17 +34,25 @@ set modeline
|
|
|
|
" Maintain undo history between sessions
|
|
|
|
" Maintain undo history between sessions
|
|
|
|
set undofile
|
|
|
|
set undofile
|
|
|
|
if ($XDG_DATA_HOME != '')
|
|
|
|
if ($XDG_DATA_HOME != '')
|
|
|
|
silent !mkdir $XDG_DATA_HOME/vim/undodir -p > /dev/null 2>&1
|
|
|
|
silent !mkdir $XDG_DATA_HOME/vim/undodir -p > /dev/null
|
|
|
|
set undodir=$XDG_DATA_HOME/vim/undodir
|
|
|
|
set undodir=$XDG_DATA_HOME/vim/undodir
|
|
|
|
|
|
|
|
if has("autocmd")
|
|
|
|
|
|
|
|
autocmd bufwritepost * silent ! chmod" 600 $XDG_DATA_HOME/vim/undodir/* > /dev/null && rm $XDG_DATA_HOME/vim/undodir/*\%.git\%COMMIT_EDITMSG > /dev/null
|
|
|
|
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if ($HOME != '')
|
|
|
|
if ($HOME != '')
|
|
|
|
silent !mkdir $HOME/.local/share/vim/undodir -p > /dev/null 2>&1
|
|
|
|
silent !mkdir $HOME/.local/share/vim/undodir -p > /dev/null
|
|
|
|
set undodir=$HOME/.local/share/vim/undodir
|
|
|
|
set undodir=$HOME/.local/share/vim/undodir
|
|
|
|
|
|
|
|
if has("autocmd")
|
|
|
|
|
|
|
|
autocmd bufwritepost * silent ! chmod 600 $HOME/.local/share/vim/undodir/* > /dev/null && rm $HOME/.local/share/vim/undodir/*\%.git\%COMMIT_EDITMSG > /dev/null
|
|
|
|
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "Error: environment variable $HOME not set"
|
|
|
|
echo "Error: environment variable $HOME not set"
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
if &term =~ "xterm\\|rxvt"
|
|
|
|
|
|
|
|
|
|
|
|
if has("autocmd")
|
|
|
|
|
|
|
|
if &term =~ "xterm\\|rxvt"
|
|
|
|
" use an orange cursor in insert mode
|
|
|
|
" use an orange cursor in insert mode
|
|
|
|
let &t_SI = "\<Esc>]12;orange\x7"
|
|
|
|
let &t_SI = "\<Esc>]12;orange\x7"
|
|
|
|
" use a red cursor otherwise
|
|
|
|
" use a red cursor otherwise
|
|
|
@ -54,6 +61,7 @@ if &term =~ "xterm\\|rxvt"
|
|
|
|
" reset cursor when vim exits
|
|
|
|
" reset cursor when vim exits
|
|
|
|
autocmd VimLeave * silent !echo -ne "\033]112\007"
|
|
|
|
autocmd VimLeave * silent !echo -ne "\033]112\007"
|
|
|
|
" use \003]12;gray\007 for gnome-terminal and rxvt up to version 9.21
|
|
|
|
" use \003]12;gray\007 for gnome-terminal and rxvt up to version 9.21
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
" Colorise les nbsp
|
|
|
|
" Colorise les nbsp
|
|
|
@ -61,4 +69,3 @@ colorscheme koehler
|
|
|
|
highlight NbSp ctermbg=lightgray guibg=lightred
|
|
|
|
highlight NbSp ctermbg=lightgray guibg=lightred
|
|
|
|
match NbSp /\%xa0/
|
|
|
|
match NbSp /\%xa0/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|