.nvim for non config files

This commit is contained in:
Thomas Forgione 2019-04-26 14:57:34 +02:00
parent 1eebf73e75
commit 23036deb6f
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
2 changed files with 3 additions and 3 deletions

View File

@ -119,14 +119,14 @@ let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1
" BACKUPS ###########################################################{{{ " BACKUPS ###########################################################{{{
set dir=$HOME/.nvim/swp// set dir=$HOME/.nvim/swp//
autocmd BufWritePost * :silent execute ':w! ' ."$HOME/.config/nvim/backups/" . substitute(escape(substitute(expand('%:p'), "/", "%", "g"), "%"), ' ', '\\ ', 'g') autocmd BufWritePost * :silent execute ':w! ' ."$HOME/.nvim/backups/" . substitute(escape(substitute(expand('%:p'), "/", "%", "g"), "%"), ' ', '\\ ', 'g')
if exists('+undofile') if exists('+undofile')
set undofile set undofile
set undolevels=1000 set undolevels=1000
set undoreload=10000 set undoreload=10000
if exists('+undodir') if exists('+undodir')
set undodir=$HOME/.config/nvim/undo set undodir=$HOME/.nvim/undo
endif endif
endif endif
" }}} " }}}

View File

@ -6,7 +6,7 @@ if [ -f $1 ]; then
return 1 return 1
fi fi
backup_path=~/.config/nvim/backups/`echo $PWD/$1 | tr '/' '%'` backup_path=~/.nvim/backups/`echo $PWD/$1 | tr '/' '%'`
if [ ! -f "$backup_path" ]; then if [ ! -f "$backup_path" ]; then
echo >&2 Backup not found... echo >&2 Backup not found...