From 7b9400b9453a63477d17ad212afba5b5644ae6d3 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 18 Oct 2024 19:43:11 +0200 Subject: refactor(modules/legacy/conf/zsh): Parameterize and move to new `by-name` --- .../home.legacy/conf/zsh/config/custom_cursor.zsh | 42 ---------------------- 1 file changed, 42 deletions(-) delete mode 100644 modules/home.legacy/conf/zsh/config/custom_cursor.zsh (limited to 'modules/home.legacy/conf/zsh/config/custom_cursor.zsh') diff --git a/modules/home.legacy/conf/zsh/config/custom_cursor.zsh b/modules/home.legacy/conf/zsh/config/custom_cursor.zsh deleted file mode 100644 index 37390c1c..00000000 --- a/modules/home.legacy/conf/zsh/config/custom_cursor.zsh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env zsh - -# 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 -} -zle -N zle-keymap-select - -# ci", ci', ci`, di", etc -autoload -U select-quoted -zle -N select-quoted -for m in visual viopp; do - for c in {a,i}{\',\",\`}; do - bindkey -M "$m" "$c" select-quoted - done -done - -# ci{, ci(, ci<, di{, etc -autoload -U select-bracketed -zle -N select-bracketed -for m in visual viopp; do - for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do - bindkey -M $m $c select-bracketed - done -done - -zle-line-init() { - zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) - echo -ne "\e[5 q" -} -zle -N zle-line-init - -echo -ne '\e[5 q' # Use beam shape cursor on startup. -precmd() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. -- cgit 1.4.1