Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (16 sloc) 297 Bytes
export EDITOR=vi
alias e='vim'
safeedit() {
if [ -e $1 ]; then
if [ ! -d backups ]; then
echo 'Creating backups directory'
mkdir backups
fi
backup="backups/$1.`date +%Y%m%d-%H%M%S`"
cp "$1" "$backup"
fi
${EDITOR} "$1"
}
pless() {
pygmentize $1 | less -r
}