From daa1f7ef417886ad3ac7585667fa9b2ef338c0f5 Mon Sep 17 00:00:00 2001 From: Cyteen Date: Sun, 5 Nov 2017 09:13:25 +0000 Subject: [PATCH] Small changes to fix scripts found during manual install. --- 020_deprecated-sysv-utils.sh | 2 + 020_zsh-vim_bindings.sh | 93 ------------------------------------ 2 files changed, 2 insertions(+), 93 deletions(-) create mode 100644 020_deprecated-sysv-utils.sh delete mode 100644 020_zsh-vim_bindings.sh diff --git a/020_deprecated-sysv-utils.sh b/020_deprecated-sysv-utils.sh new file mode 100644 index 0000000..cc351f0 --- /dev/null +++ b/020_deprecated-sysv-utils.sh @@ -0,0 +1,2 @@ +apt-get install -y sysv-rc-conf +apt-get install -y chkconfig diff --git a/020_zsh-vim_bindings.sh b/020_zsh-vim_bindings.sh deleted file mode 100644 index 8f4025e..0000000 --- a/020_zsh-vim_bindings.sh +++ /dev/null @@ -1,93 +0,0 @@ -# http://www.zshwiki.org/home/zle/vi-mode -# -echo "This script is very broken, and squashes .vimrc EXITING - FIXME" -exit -cat > ~/.vimrc <<'EOF' -" Set vi command-line mode -bindkey -v - -" Use right prompt to display vi mode. -precmd() { - RPROMPT="" -} -zle-keymap-select() { - RPROMPT="" - [[ $KEYMAP = vicmd ]] && RPROMPT="(CMD)" - () { return $__prompt_status } - zle reset-prompt -} -zle-line-init() { - typeset -g __prompt_status="$?" -} -zle -N zle-keymap-select -zle -N zle-line-init - -" Vim bindings. -bindkey -a 'gg' beginning-of-buffer-or-history -bindkey -a 'g~' vi-oper-swap-case -bindkey -a G end-of-buffer-or-history - -" In Vim backspace doesn't stop at the point where you started insert mode: -bindkey '^?' backward-delete-char -bindkey '^H' backward-delete-char - -" -bindkey '^G' what-cursor-position - -" Text Objects -" Some are provided as shell functions so need to be manually enabled. select-bracketed which selects -" text delimited by brackets and select-quoted which selects text delimited by quote characters. -" The following binds them to key combinations such as i" a( in both the visual and viopp keymaps. -autoload -U select-bracketed select-quoted -zle -N select-bracketed -zle -N select-quoted - for km in viopp visual; do - bindkey -M $km -- '-' vi-up-line-or-history - for c in {a,i}"${(s..):-\'\"\`\|,./:;-=+@}"; do - bindkey -M $km $c select-quoted - done - for c in {a,i}${(s..):-'()[]{}<>bB'}; do - bindkey -M $km $c select-bracketed - done -done - -" Clipboard integration using xclip -[[ -n $DISPLAY ]] && (( $+commands[xclip] )) && { - - function cutbuffer() { - zle .$WIDGET - echo $CUTBUFFER | xclip - } - - zle_cut_widgets=( - vi-backward-delete-char - vi-change - vi-change-eol - vi-change-whole-line - vi-delete - vi-delete-char - vi-kill-eol - vi-substitute - vi-yank - vi-yank-eol - ) - for widget in $zle_cut_widgets - do - zle -N $widget cutbuffer - done - - function putbuffer() { - zle copy-region-as-kill "$(xclip -o)" - zle .$WIDGET - } - - zle_put_widgets=( - vi-put-after - vi-put-before - ) - for widget in $zle_put_widgets - do - zle -N $widget putbuffer - done -} -EOF