vim /bin/VIM
#!/bin/bash
echo "$1" |grep '\.conf$' >/dev/null && cp -rf $1 $1.bak
vim $1

然后再alias vim=VIM一下就行了