From ec81bd2399d2b038d03f85177bf0c33c3e530737 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 29 Apr 2019 06:55:21 +0000 Subject: 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. --- key-bindings.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'key-bindings.c') diff --git a/key-bindings.c b/key-bindings.c index fbc54fb8..5af8f3ed 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -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", -- cgit