|
|
|
@ -34,17 +34,17 @@ set modeline
|
|
|
|
|
" Maintain undo history between sessions
|
|
|
|
|
set undofile
|
|
|
|
|
if ($XDG_DATA_HOME != '')
|
|
|
|
|
silent !mkdir $XDG_DATA_HOME/vim/undodir -p > /dev/null
|
|
|
|
|
silent !mkdir $XDG_DATA_HOME/vim/undodir -p > /dev/null 2>&1
|
|
|
|
|
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
|
|
|
|
|
autocmd bufwritepost * silent ! chmod" 600 $XDG_DATA_HOME/vim/undodir/* > /dev/null 2>&1 && rm $XDG_DATA_HOME/vim/undodir/*\%.git\%COMMIT_EDITMSG > /dev/null 2>&1
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
if ($HOME != '')
|
|
|
|
|
silent !mkdir $HOME/.local/share/vim/undodir -p > /dev/null
|
|
|
|
|
silent !mkdir $HOME/.local/share/vim/undodir -p > /dev/null 2>&1
|
|
|
|
|
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
|
|
|
|
|
autocmd bufwritepost * silent ! chmod 600 $HOME/.local/share/vim/undodir/* > /dev/null 2>&1 && rm $HOME/.local/share/vim/undodir/*\%.git\%COMMIT_EDITMSG > /dev/null 2>&1
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
echo "Error: environment variable $HOME not set"
|
|
|
|
|