diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-10 13:31:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-10 13:31:03 +1200 |
commit | 835a273f0a708b5ef8c59e299b034c78b045d936 (patch) | |
tree | 95ca4e81eeb9571a301fa91c5af07940710f6739 /pdksh/pdkshrc.d/vim.pdksh | |
parent | Merge branch 'master' into openbsd (diff) | |
download | dotfiles-835a273f0a708b5ef8c59e299b034c78b045d936.tar.gz dotfiles-835a273f0a708b5ef8c59e299b034c78b045d936.zip |
Port easy bashrc.d scripts to pdkshrc.d
Have left out anything that requires non-trivial fixes, mostly due to
variable scope or missing features.
Diffstat (limited to 'pdksh/pdkshrc.d/vim.pdksh')
-rw-r--r-- | pdksh/pdkshrc.d/vim.pdksh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pdksh/pdkshrc.d/vim.pdksh b/pdksh/pdkshrc.d/vim.pdksh new file mode 100644 index 00000000..37fc1871 --- /dev/null +++ b/pdksh/pdkshrc.d/vim.pdksh @@ -0,0 +1,15 @@ +# If Vim exists on the system, use it instead of ex, vi, and view +if ! hash vim 2>/dev/null ; then + return +fi + +# Define functions proper +ex() { + vim -e "$@" +} +vi() { + vim "$@" +} +view() { + vim -R "$@" +} |