summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/key-bindings.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-04-29 06:55:21 +0000
committernicm <nicm@openbsd.org>2019-04-29 06:55:21 +0000
commitea2bb4316d76ef9730f91115d4322f67c98d7c36 (patch)
tree86a81fedf5a0d9e05c623d5cb371468b032946f4 /usr.bin/tmux/key-bindings.c
parentCheck that depend on interfaces are in the same rdomain. If they are not (diff)
downloadwireguard-openbsd-ea2bb4316d76ef9730f91115d4322f67c98d7c36.tar.xz
wireguard-openbsd-ea2bb4316d76ef9730f91115d4322f67c98d7c36.zip
Add support for keys to jump between matching brackets - C-M-f and C-M-b
in emacs, % in vi. Suggested by and help from Chris Barber in GitHub issue 1666.
Diffstat (limited to 'usr.bin/tmux/key-bindings.c')
-rw-r--r--usr.bin/tmux/key-bindings.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c
index e06596ed0fe..79db69a2e3f 100644
--- a/usr.bin/tmux/key-bindings.c
+++ b/usr.bin/tmux/key-bindings.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key-bindings.c,v 1.88 2018/10/18 08:38:01 nicm Exp $ */
+/* $OpenBSD: key-bindings.c,v 1.89 2019/04/29 06:55:21 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -335,7 +335,9 @@ key_bindings_init(void)
"bind -Tcopy-mode M-> send -X history-bottom",
"bind -Tcopy-mode M-R send -X top-line",
"bind -Tcopy-mode M-b send -X previous-word",
+ "bind -Tcopy-mode C-M-b send -X previous-matching-bracket",
"bind -Tcopy-mode M-f send -X next-word-end",
+ "bind -Tcopy-mode C-M-f send -X next-matching-bracket",
"bind -Tcopy-mode M-m send -X back-to-indentation",
"bind -Tcopy-mode M-r send -X middle-line",
"bind -Tcopy-mode M-v send -X page-up",
@@ -408,6 +410,7 @@ key_bindings_init(void)
"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 next-matching-bracket",
"bind -Tcopy-mode-vi MouseDown1Pane select-pane",
"bind -Tcopy-mode-vi MouseDrag1Pane select-pane\\; send -X begin-selection",
"bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel",