Clean up Vim-related aliases/exports

Use `hash` when Bash is ensured to be running, and `command -v` when
not, when checking for presence of `vim`. Also replace Vim shell
functions with aliases, and do a little more cleanup.
Use `command` instead of `which`, remove `function` keyword
Remove `perl -w` alias for `perl` (breaks some Perl code)

Specifically, it caused Epic's Admin Scripts to spew a lot of errors.