« get me outta code hell

zsh: vimhelp function - dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-16 17:06:24 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-16 17:06:24 -0300
commita5d088500956744c70e7ca2d086fff04d19e5e4d (patch)
tree61fa005153dfca7c088c0e807080a3ada079d378
parent9098dac1124550cf595e1d8d77ac21a55cfa4840 (diff)
zsh: vimhelp function
-rw-r--r--.zshrc12
1 files changed, 12 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index c86c535..1de48ad 100644
--- a/.zshrc
+++ b/.zshrc
@@ -4,6 +4,7 @@
 #   per-device configuration (pre)     <dev-pre>
 #   zsh configuration                  <zsh-conf>
 #   third party configuration          <3rd-conf>
+#   aliases & non-script functions     <alias-fns>
 #   per-device configuration (post)    <dev-post>
 
 
@@ -106,6 +107,17 @@ fi
 export PATH
 
 
+# //// aliases & non-script functions //////////////////////// <alias-fns> // #
+
+# -- hooks into third-party stuff --
+
+if [[ -v DEVICE_HAS_VIM ]]; then
+  vimhelp() {
+    vim -c ":h $1 | only"
+  }
+fi
+
+
 # //// per-device configuration /////////////////////////////// <dev-post> // #
 
 device_postconfig