diff options
author | nicm <nicm> | 2019-05-27 12:16:27 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-05-27 12:16:27 +0000 |
commit | 6b332127cae97914d34c39575881fbc87205f4e0 (patch) | |
tree | e451d78a0ec378c4b58b3a401a88532c27a25ae0 /key-bindings.c | |
parent | 65e5e1456179d68f36602a5976184b38cc4b636c (diff) | |
download | rtmux-6b332127cae97914d34c39575881fbc87205f4e0.tar.gz rtmux-6b332127cae97914d34c39575881fbc87205f4e0.tar.bz2 rtmux-6b332127cae97914d34c39575881fbc87205f4e0.zip |
Add an additional {} syntax for defining strings in the configuration
file, making it much tidier to define commands that contain other tmux
or shell commands (like if-shell). Also tweak bind-key to expect a
string if it is only given one argument, so {} can be used with it as
well. From Avi Halachmi.
Diffstat (limited to 'key-bindings.c')
-rw-r--r-- | key-bindings.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/key-bindings.c b/key-bindings.c index 2bc659aa..b2055cf7 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -242,8 +242,8 @@ key_bindings_init(void) "bind w choose-tree -Zw", "bind x confirm-before -p\"kill-pane #P? (y/n)\" kill-pane", "bind z resize-pane -Z", - "bind { swap-pane -U", - "bind } swap-pane -D", + "bind '{' swap-pane -U", + "bind '}' swap-pane -D", "bind '~' show-messages", "bind PPage copy-mode -u", "bind -r Up select-pane -U", @@ -347,8 +347,8 @@ key_bindings_init(void) "bind -Tcopy-mode M-r send -X middle-line", "bind -Tcopy-mode M-v send -X page-up", "bind -Tcopy-mode M-w send -X copy-selection-and-cancel", - "bind -Tcopy-mode M-{ send -X previous-paragraph", - "bind -Tcopy-mode M-} send -X next-paragraph", + "bind -Tcopy-mode 'M-{' send -X previous-paragraph", + "bind -Tcopy-mode 'M-}' send -X next-paragraph", "bind -Tcopy-mode M-Up send -X halfpage-up", "bind -Tcopy-mode M-Down send -X halfpage-down", "bind -Tcopy-mode C-Up send -X scroll-up", @@ -413,8 +413,8 @@ key_bindings_init(void) "bind -Tcopy-mode-vi t command-prompt -1p'(jump to forward)' 'send -X jump-to-forward \"%%%\"'", "bind -Tcopy-mode-vi v send -X rectangle-toggle", "bind -Tcopy-mode-vi w send -X next-word", - "bind -Tcopy-mode-vi { send -X previous-paragraph", - "bind -Tcopy-mode-vi } send -X next-paragraph", + "bind -Tcopy-mode-vi '{' send -X previous-paragraph", + "bind -Tcopy-mode-vi '}' send -X next-paragraph", "bind -Tcopy-mode-vi % send -X next-matching-bracket", "bind -Tcopy-mode-vi MouseDown1Pane select-pane", "bind -Tcopy-mode-vi MouseDrag1Pane select-pane\\; send -X begin-selection", |