Faster zshrc

This commit is contained in:
2019-02-11 17:40:33 +01:00
parent 23e40963ba
commit 740857f59b
8 changed files with 88 additions and 176 deletions

16
zsh/bin/vim-recover Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env zsh
# Check recovery directory from vim
if [ -f $1 ]; then
echo >&2 Cannot recover an existing file...
return 1
fi
BACKUP_PATH=~/.vim/backups/`echo $PWD/$1 | tr '/' '%'`
if [ ! -f "$BACKUP_PATH" ]; then
echo >&2 Backup not found...
return 2
fi
cp $BACKUP_PATH $1