From e482ff71fde536e4ff795c87fba1dde429e96393 Mon Sep 17 00:00:00 2001 From: EvilMuffinHa Date: Wed, 17 Aug 2022 16:31:08 -0400 Subject: [PATCH] fix tmux cursor --- nvim/lua/options.lua | 2 +- zsh/zshrc | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua index 485c8fa..57901ac 100644 --- a/nvim/lua/options.lua +++ b/nvim/lua/options.lua @@ -49,7 +49,7 @@ o.listchars = { vim.cmd [[ augroup options_guicursor au! - " Reset to underscore cursor for terminal nvim (https://github.com/neovim/neovim/issues/4867#issuecomment-291249173) + " Reset to vertical cursor for terminal nvim (https://github.com/neovim/neovim/issues/4867#issuecomment-291249173) au VimLeave * set guicursor=a:ver90 augroup END ]] diff --git a/zsh/zshrc b/zsh/zshrc index 558d263..994723e 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -18,4 +18,16 @@ alias tcat="/usr/bin/cat" alias xsecurelock='XSECURELOCK_NO_COMPOSITE=1 XSECURELOCK_AUTH_BACKGROUND_COLOR=$color00 XSECURELOCK_AUTH_FOREGROUND_COLOR=$color07 xsecurelock' +function zle-keymap-select zle-line-init zle-line-finish +{ + case $KEYMAP in + vicmd) print -n '\033[1 q';; # block cursor + viins|main) print -n '\033[5 q';; # line cursor + esac +} + +zle -N zle-line-init +zle -N zle-line-finish +zle -N zle-keymap-select + source ~/.zshenv