diff options
author | 2020-05-16 16:10:28 +0000 | |
---|---|---|
committer | 2020-05-16 16:10:28 +0000 | |
commit | ac95e3acfe3c78fb67921d88d60aa0496f48b6c1 (patch) | |
tree | 8c69fe6a7a3e47f1d577d7f20b5a14f8f9ddc7ad /usr.bin/tmux/key-bindings.c | |
parent | Add a -D flag to ask tmux not to daemonize, useful both for running a (diff) | |
download | wireguard-openbsd-ac95e3acfe3c78fb67921d88d60aa0496f48b6c1.tar.xz wireguard-openbsd-ac95e3acfe3c78fb67921d88d60aa0496f48b6c1.zip |
Add a mark in copy mode. Set with set-mark command (bound to 'X') by
default and the mark and cursor position are swapped with 'jump-to-mark'
(bound to M-x). The line containing the mark is shown in
copy-mode-mark-style with the horizontal position in reverse.
From Anindya Mukherjee in GitHub issue 2209.
Diffstat (limited to 'usr.bin/tmux/key-bindings.c')
-rw-r--r-- | usr.bin/tmux/key-bindings.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c index 19bc55a578a..ea8e6de8f44 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.125 2020/05/16 16:02:24 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.126 2020/05/16 16:10:28 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -426,6 +426,7 @@ key_bindings_init(void) "bind -Tcopy-mode N send -X search-reverse", "bind -Tcopy-mode R send -X rectangle-toggle", "bind -Tcopy-mode T command-prompt -1p'(jump to backward)' 'send -X jump-to-backward \"%%%\"'", + "bind -Tcopy-mode X send -X set-mark", "bind -Tcopy-mode f command-prompt -1p'(jump forward)' 'send -X jump-forward \"%%%\"'", "bind -Tcopy-mode g command-prompt -p'(goto line)' 'send -X goto-line \"%%%\"'", "bind -Tcopy-mode n send -X search-again", @@ -467,6 +468,7 @@ 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-pipe-and-cancel", + "bind -Tcopy-mode M-x send -X jump-to-mark", "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", @@ -521,6 +523,7 @@ key_bindings_init(void) "bind -Tcopy-mode-vi T command-prompt -1p'(jump to backward)' 'send -X jump-to-backward \"%%%\"'", "bind -Tcopy-mode-vi V send -X select-line", "bind -Tcopy-mode-vi W send -X next-space", + "bind -Tcopy-mode-vi X send -X set-mark", "bind -Tcopy-mode-vi ^ send -X back-to-indentation", "bind -Tcopy-mode-vi b send -X previous-word", "bind -Tcopy-mode-vi e send -X next-word-end", @@ -554,6 +557,7 @@ key_bindings_init(void) "bind -Tcopy-mode-vi Down send -X cursor-down", "bind -Tcopy-mode-vi Left send -X cursor-left", "bind -Tcopy-mode-vi Right send -X cursor-right", + "bind -Tcopy-mode-vi M-x send -X jump-to-mark", "bind -Tcopy-mode-vi C-Up send -X scroll-up", "bind -Tcopy-mode-vi C-Down send -X scroll-down", }; |