c8e280f2ab8e7768b100e590c6836502d5cf8fb9

Author
Andrew Janke <andrew@apjanke.net>
Committer
Andrew Janke <andrew@apjanke.net>
Date

Message

dircycle: remove redundant key bindings

In bindkey strings, "^[" and "\e" mean the same thing. They're both notations for Escape.

Diff

 1diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh
 2index 1e31105b17e2b2b4d81bca1d8d95aa44e18c6326..8a406b54d772af4bc955b8f348edcc0a40e7454e 100644
 3--- a/plugins/dircycle/dircycle.plugin.zsh
 4+++ b/plugins/dircycle/dircycle.plugin.zsh
 5@@ -27,11 +27,11 @@ insert-cycledright () {
 6 zle -N insert-cycledright
 7 
 8 
 9-# add key bindings for iTerm2
10-if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
11-	bindkey "^[[1;6D" insert-cycledleft
12-	bindkey "^[[1;6C" insert-cycledright
13-else
14-	bindkey "\e[1;6D" insert-cycledleft
15-	bindkey "\e[1;6C" insert-cycledright
16-fi
17+# These sequences work for xterm, Apple Terminal.app, and probably others.
18+# Not for rxvt-unicode, but it doesn't seem differentiate Ctrl-Shift-Arrow
19+# from plain Shift-Arrow, at least by default.
20+# iTerm2 does not have these key combinations defined by default; you will need
21+# to add them under "Keys" in your profile if you want to use this. You can do
22+# this conveniently by loading the "xterm with Numeric Keypad" preset.
23+bindkey "\e[1;6D" insert-cycledleft
24+bindkey "\e[1;6C" insert-cycledright