1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-07 16:00:41 +01:00

feat(vi-mode): add option to disable clipboard (#12037)

This commit is contained in:
Þórhallur Sverrisson
2023-11-20 11:27:54 +00:00
committed by GitHub
parent 6165c257ae
commit e0213342d1
2 changed files with 13 additions and 9 deletions

View File

@@ -147,17 +147,19 @@ function wrap_clipboard_widgets() {
done
}
wrap_clipboard_widgets copy \
vi-yank vi-yank-eol vi-yank-whole-line \
vi-change vi-change-eol vi-change-whole-line \
vi-kill-line vi-kill-eol vi-backward-kill-word \
vi-delete vi-delete-char vi-backward-delete-char
if [[ -z "${VI_MODE_DISABLE_CLIPBOARD:-}" ]]; then
wrap_clipboard_widgets copy \
vi-yank vi-yank-eol vi-yank-whole-line \
vi-change vi-change-eol vi-change-whole-line \
vi-kill-line vi-kill-eol vi-backward-kill-word \
vi-delete vi-delete-char vi-backward-delete-char
wrap_clipboard_widgets paste \
vi-put-{before,after} \
put-replace-selection
wrap_clipboard_widgets paste \
vi-put-{before,after} \
put-replace-selection
unfunction wrap_clipboard_widgets
unfunction wrap_clipboard_widgets
fi
# if mode indicator wasn't setup by theme, define default, we'll leave INSERT_MODE_INDICATOR empty by default
if [[ -z "$MODE_INDICATOR" ]]; then