dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit e279ab85b36454ddda78eec632ef4e9704cd796d (patch)
parent 9f9109f521200e7a431963c002d280e41ff01965
Author: Alex Karle <alex@alexkarle.com>
Date:   Mon, 19 Jul 2021 23:56:55 -0400

zsh: Remove vi_prompt_append, my last zsh script

I was proud of this one, so I kept it around for a _long_ time.
Truth is, I haven't touched zsh in years and probably won't any time
soon. In the spirit of spring cleaning and working towards a FOSS
license for this repo, I'm removing it.

Diffstat:
Detc/vi_prompt_append.zsh | 37-------------------------------------
1 file changed, 0 insertions(+), 37 deletions(-)

diff --git a/etc/vi_prompt_append.zsh b/etc/vi_prompt_append.zsh @@ -1,37 +0,0 @@ -# Vi Prompt Append! -# -# I like Vi(m) related things! I like Vi in my zsh, BUT, not knowing -# which mode (Normal/Insert) you are in can be damaging. SO, I created -# this little script to append an indicator (and change it) for any -# zsh theme! -# -# Assumes bindkey -v is on! -# -# USAGE: -# Source AFTER your theme! (so prompt isn't reset!) - -# First, the globals -VI_NORMAL_PROMPT="%{$fg_bold[yellow]%}[% N]% %{$reset_color%}" -VI_INSERT_PROMPT="%{$fg_bold[blue]%}[% I]% %{$reset_color%}" -VI_PROMPT_CHAR="$VI_INSERT_PROMPT" - -# Simple function to output the Vi prompt -vi_mode() { - local vi_mode_chars="${VI_PROMPT_CHAR}" - echo -n "$vi_mode_chars" -} - -# The magic is here -- append to PROMPT -# Note to self -- need '' around the vi_mode function -PROMPT='$(vi_mode)'"$PROMPT" - -# This function changes the prompt / resets it on Normal/Insert toggle -# Heavily inspired by Doug Black (https://dougblack.io/words/zsh-vi-mode.html) -function zle-line-init zle-keymap-select { - # for use in my custom vi prompt append - VI_PROMPT_CHAR="${${KEYMAP/vicmd/$VI_NORMAL_PROMPT}/(main|viins)/$VI_INSERT_PROMPT}" - zle reset-prompt -} - -zle -N zle-line-init -zle -N zle-keymap-select