summaryrefslogtreecommitdiff
path: root/.config/zsh/functions.zsh
diff options
context:
space:
mode:
authoraktersnurra <grydholm@kth.se>2021-02-07 14:30:31 +0100
committeraktersnurra <grydholm@kth.se>2021-02-07 14:30:31 +0100
commit71ad675b3280ba89289ecb09a1dc4a620989aef5 (patch)
tree96e47471e36e96d44820be3a7bc1b831c809d7f2 /.config/zsh/functions.zsh
parent90ed26fa905edb41e69fe3b3f8d92096a23aa40f (diff)
Added zsh configs
Diffstat (limited to '.config/zsh/functions.zsh')
-rw-r--r--.config/zsh/functions.zsh13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh
new file mode 100644
index 0000000..cca1d29
--- /dev/null
+++ b/.config/zsh/functions.zsh
@@ -0,0 +1,13 @@
+# Change cursor shape for different vi modes.
+function zle-keymap-select {
+ if [[ ${KEYMAP} == vicmd ]]
+ [[ $1 = 'block' ]]; then
+ echo -ne '\e[1 q'
+
+ elif [[ ${KEYMAP} == main ]]
+ [[ ${KEYMAP} == viins ]]
+ [[ ${KEYMAP} = '' ]]
+ [[ $1 = 'beam' ]]; then
+ echo -ne '\e[5 q'
+ fi
+}