|
|
@ -34,17 +34,17 @@ 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
|
|
|
|
silent !mkdir $XDG_DATA_HOME/vim/undodir -p > /dev/null 2>&1
|
|
|
|
set undodir=$XDG_DATA_HOME/vim/undodir
|
|
|
|
set undodir=$XDG_DATA_HOME/vim/undodir
|
|
|
|
if has("autocmd")
|
|
|
|
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
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if ($HOME != '')
|
|
|
|
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
|
|
|
|
set undodir=$HOME/.local/share/vim/undodir
|
|
|
|
if has("autocmd")
|
|
|
|
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
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "Error: environment variable $HOME not set"
|
|
|
|
echo "Error: environment variable $HOME not set"
|
|
|
|