Skip to content
Newer
Older
100644 19 lines (16 sloc) 297 Bytes
5b679e9 First attempt at a cross-platform version of my profiles.
Mat Schaffer authored
1 export EDITOR=vi
b27cf60 @spf13 revising editors to reference vim
authored
2 alias e='vim'
5b679e9 First attempt at a cross-platform version of my profiles.
Mat Schaffer authored
3
ccf1f7f Generalized safevi to safeedit and set to use ${EDITOR}
Mat Schaffer authored
4 safeedit() {
5b679e9 First attempt at a cross-platform version of my profiles.
Mat Schaffer authored
5 if [ -e $1 ]; then
6 if [ ! -d backups ]; then
7 echo 'Creating backups directory'
8 mkdir backups
9 fi
10 backup="backups/$1.`date +%Y%m%d-%H%M%S`"
11 cp "$1" "$backup"
12 fi
1c4375d Removed quotes around editor since they caused issues when EDITOR con…
Mat Schaffer authored
13 ${EDITOR} "$1"
356440f Added pless function inspired by http://gist.github.com/23914. Requir…
Mat Schaffer authored
14 }
15
16 pless() {
17 pygmentize $1 | less -r
b27cf60 @spf13 revising editors to reference vim
authored
18 }
Something went wrong with that request. Please try again.