aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/vim.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/shrc.d/vim.sh')
-rw-r--r--sh/shrc.d/vim.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/sh/shrc.d/vim.sh b/sh/shrc.d/vim.sh
new file mode 100644
index 00000000..fc04c99f
--- /dev/null
+++ b/sh/shrc.d/vim.sh
@@ -0,0 +1,13 @@
+# If Vim exists on the system, use it instead of ex, vi, and view
+command -v vim >/dev/null || return
+
+# Define functions proper
+ex() {
+ vim -e "$@"
+}
+vi() {
+ vim "$@"
+}
+view() {
+ vim -R "$@"
+}