From 68bebe1fb7dfe5d152a2734c5bd572b1db641a4c Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 12 Oct 2016 13:03:27 +0000 Subject: The repeat prompt in both emacs and vi (and the old one in tmux) doesn't support line editing and instead executes a command as soon as a non-number key is pressed. Add a -N flag to command-prompt for the same in copy mode. Reported by Theo Buehler. --- tmux.1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index f375a215..4cf403e7 100644 --- a/tmux.1 +++ b/tmux.1 @@ -3748,7 +3748,7 @@ session option. Commands related to the status line are as follows: .Bl -tag -width Ds .It Xo Ic command-prompt -.Op Fl 1 +.Op Fl 1N .Op Fl I Ar inputs .Op Fl p Ar prompts .Op Fl t Ar target-client @@ -3802,6 +3802,8 @@ to .Fl 1 makes the prompt only accept one key press, in this case the resulting input is a single character. +.Fl N +accepts only numbers and exit the prompt on any other key press. .It Xo Ic confirm-before .Op Fl p Ar prompt .Op Fl t Ar target-client -- cgit From c484c5a2a1b6c8261564b2959866e2cfa061ca99 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 12 Oct 2016 14:50:14 +0000 Subject: Drop the edit mode key tables and just use fixed key bindings for the command prompt. --- tmux.1 | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 4cf403e7..03a4ba2f 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1104,11 +1104,7 @@ Commands in copy mode may be prefaced by an optional repeat count. With vi key bindings, a prefix is entered using the number keys; with emacs, the Alt (meta) key and a number begins prefix entry. .Pp -Mode key bindings are defined in a set of named tables: -.Em vi-edit -and -.Em emacs-edit -for keys used when line editing at the command prompt; and +Mode key bindings are defined in two tables: .Em vi-choice and .Em emacs-choice @@ -3000,10 +2996,8 @@ layouts. .It Xo Ic mode-keys .Op Ic vi | emacs .Xc -Use vi or emacs-style key bindings in copy and choice modes. -As with the -.Ic status-keys -option, the default is emacs, unless +Use vi or emacs-style key bindings in copy mode. +The default is emacs, unless .Ev VISUAL or .Ev EDITOR @@ -3748,7 +3742,7 @@ session option. Commands related to the status line are as follows: .Bl -tag -width Ds .It Xo Ic command-prompt -.Op Fl 1N +.Op Fl 1 .Op Fl I Ar inputs .Op Fl p Ar prompts .Op Fl t Ar target-client @@ -3776,13 +3770,6 @@ if it is present, or .Ql \&: if not. .Pp -Both -.Ar inputs -and -.Ar prompts -may contain the special character sequences supported by the -.Ic status-left -option. .Pp Before the command is executed, the first occurrence of the string .Ql %% @@ -3802,8 +3789,30 @@ to .Fl 1 makes the prompt only accept one key press, in this case the resulting input is a single character. -.Fl N -accepts only numbers and exit the prompt on any other key press. +.Pp +The following keys have a special meaning in the command prompt, depending +on the value of the +.Ic status-keys +option: +.Bl -column "FunctionXXXXXXXXXXXXXXXXXXXXXXXXX" "viXXXX" "emacsX" -offset indent +.It Sy "Function" Ta Sy "vi" Ta Sy "emacs" +.It Li "Cancel command prompt" Ta "Escape" Ta "Escape" +.It Li "Delete current word" Ta "" Ta "C-w" +.It Li "Delete entire command" Ta "d" Ta "C-u" +.It Li "Delete from cursor to end" Ta "D" Ta "C-k" +.It Li "Execute command" Ta "Enter" Ta "Enter" +.It Li "Get next command from history" Ta "" Ta "Down" +.It Li "Get previous command from history" Ta "" Ta "Up" +.It Li "Insert top paste buffer" Ta "p" Ta "C-y" +.It Li "Look for completions" Ta "Tab" Ta "Tab" +.It Li "Move cursor left" Ta "h" Ta "Left" +.It Li "Move cursor right" Ta "l" Ta "Right" +.It Li "Move cursor to end" Ta "$" Ta "C-e" +.It Li "Move cursor to next word" Ta "w" Ta "M-f" +.It Li "Move cursor to previous word" Ta "b" Ta "M-b" +.It Li "Move cursor to start" Ta "0" Ta "C-a" +.It Li "Transpose characters" Ta "" Ta "C-t" +.El .It Xo Ic confirm-before .Op Fl p Ar prompt .Op Fl t Ar target-client -- cgit From 40253048ca6d6ecf45be24a76220d6012aca9818 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 12 Oct 2016 15:26:37 +0000 Subject: bind-key -c has gone, remove from man page, and unused table declarations. --- tmux.1 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 03a4ba2f..73daac3f 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2100,7 +2100,7 @@ bind-key "'" new-window Commands related to key bindings are as follows: .Bl -tag -width Ds .It Xo Ic bind-key -.Op Fl cnr +.Op Fl nr .Op Fl t Ar mode-table .Op Fl T Ar key-table .Ar key Ar command Op Ar arguments @@ -2155,10 +2155,7 @@ If is present, .Ar key is bound in -.Ar mode-table : -the binding for command mode with -.Fl c -or for normal mode without. +.Ar mode-table . .Pp To view the default bindings and possible commands, see the .Ic list-keys @@ -2232,7 +2229,7 @@ Send the prefix key, or with .Fl 2 the secondary prefix key, to a window as if it was pressed. .It Xo Ic unbind-key -.Op Fl acn +.Op Fl an .Op Fl t Ar mode-table .Op Fl T Ar key-table .Ar key @@ -2240,7 +2237,6 @@ the secondary prefix key, to a window as if it was pressed. .D1 (alias: Ic unbind ) Unbind the command bound to .Ar key . -.Fl c , .Fl n , .Fl T and -- cgit