diff options
author | nicm <nicm> | 2020-05-16 16:10:28 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-16 16:10:28 +0000 |
commit | ff8dd150e0c59b37d9a4942e499a2a025820db8d (patch) | |
tree | 6bb50aa2be5983d21c8609ee58dacff1bca166fc /key-bindings.c | |
parent | dceb6a15d04a2b2e050ab41816d0df3fe224b416 (diff) |
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 'key-bindings.c')
-rw-r--r-- | key-bindings.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/key-bindings.c b/key-bindings.c index ecd2f7dc..05089bab 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -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", }; |