summaryrefslogtreecommitdiffstats
path: root/key-bindings.c
AgeCommit message (Collapse)Author
2020-06-16d and D keys to reset to default in customize mode.nicm
2020-06-03Make paste -p the default for ], GitHub issue 2248.nicm
2020-05-20Fix a couple more places where the key flags need to be masked off.nicm
2020-05-16Separate key flags and modifiers, log key flags, make the "xterm" flagnicm
more explicit and fix M- keys with a leading escape.
2020-05-16Add a mark in copy mode. Set with set-mark command (bound to 'X') bynicm
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.
2020-05-16Add a customize mode where keys and options may be browsed and changed,nicm
includes adding a brief description of each option. Bound to "C" by default.
2020-05-16Add -W and -T flags to command-prompt to only complete a window and anicm
target, also complete aliases.
2020-04-17Add a copy-command option and change copy-pipe and friends to pipe to itnicm
if used without arguments, allows all copy key bindings to be changed to pipe with one option.
2020-04-13When adding a list of commands to the queue, instead of automaticallynicm
creating a new state for each group of commands, require the caller to create one and use it for all the commands in the list. This means the current target works even with list with multiple groups (which can happen if they are defined with newlines).
2020-04-13Move cmdq_state into cmd-queue.c.nicm
2020-04-13Rename cmdq_shared to cmdq_state which will better reflect what it isnicm
(going to be) used for.
2020-04-13Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm
use more clearly defined and preparation for some future work).
2020-04-13Make struct cmd local to cmd.c and move it out of tmux.h.nicm
2020-04-06Change copy mode to make copy of the pane history so it does not need tonicm
freeze updates (which does not play nicely with some applications, a longstanding problem) and will allow some other changes later. From Anindya Mukherjee.
2020-04-02Add a W position to display-menu -y to use the line above (or below) thenicm
status line containing the window list. Leave S meaning above (or below) all status lines. GitHub issue 2145.
2020-03-20Apply same menu items to view mode like copy mode.nicm
2020-03-20Similarly, disable zoom if only one pane.nicm
2020-03-20Put swap down back in the right place.nicm
2020-03-20Disable swap entries if nothing to swap with.nicm
2020-03-20Still want the per-mode menus outside copy mode.nicm
2020-03-20Oops, typo in key binding.nicm
2020-03-20Make the mouse_word and mouse_line formats work in copy mode and enablenicm
the default pane menu in copy mode.
2020-03-12Tidy up the default mouse key bindings and:nicm
- Add double and triple click bindings to copy a word or line outside copy mode. The text is selected for a short period to show what has been copied. This is in line with the existing mouse selection where the text is copied and the selection is cleared when the mouse button is released. - Change the existing double and triple click bindings in copy mode to behave in the same way. - Add a button 2 binding to paste the top buffer.
2020-01-27Add support for adding a note to a key binding (with bind-key -N) andnicm
use this to add descriptions to the default key bindings. A new -N flag to list-keys shows key bindings with notes rather than the default bind-key command used to create them. Change the default ? binding to use this to show a readable summary of keys. Also extend command-prompt to return the name of the key pressed and add a default binding (/) to show the note for the next key pressed Suggested by Alex Tremblay in GitHub issue 2000.
2020-01-05Common function to free key bindings.nicm
2019-12-19When adding a list with multiple commands to the queue, the next item tonicm
insert after needs to be the last one added, not the first. Reported by Jason Kim in GitHub issue 2023.
2019-12-02Remove client menu, I don't think it adds anything.nicm
2019-11-26Add default # and * binding with vi(1) keys.nicm
2019-11-20Do not check the client readonly flag when there is no client, GitHub issue ↵nicm
1980.
2019-09-18Up and Down are already used, use < and > instead.nicm
2019-09-16Change menu key bindings to Up and Down and also close it on any mousenicm
press if opened by key.
2019-09-10Set up format tree for %if, GitHub issue 1896.nicm
2019-05-28Change the default right click pane to open the menu if not in a modenicm
and no application mouse.
2019-05-28Add key bindings to open the window and pane menus (C-m and M-m for now).nicm
2019-05-28Allow menu items to be disabled by putting a - at the start of theirnicm
name, rather than just including #[dim] which still allowed them to be chosen.
2019-05-28Change display-menu from taking a single string to a set of arguments,nicm
which is much easier to work with. Based on a diff from Avi Halachmi.
2019-05-27Add an additional {} syntax for defining strings in the configurationnicm
file, making it much tidier to define commands that contain other tmux or shell commands (like if-shell). Also tweak bind-key to expect a string if it is only given one argument, so {} can be used with it as well. From Avi Halachmi.
2019-05-23Replace the split parser code (cfg.c and cmd-string.c) with a singlenicm
parser using yacc(1). This is a major change but is clearer and simpler and allows some edge cases to be made more consistent, as well as tidying up how aliases are handled. It will also allow some further improvements later. Entirely the same parser is now used for parsing the configuration file and for string commands. This means that constructs previously only available in .tmux.conf, such as %if, can now be used in string commands (for example, those given to if-shell - not commands invoked from the shell, they are still parsed by the shell itself). The only syntax change I am aware of is that #{} outside quotes or a comment is now considered a format and not a comment, so #{ is now a syntax error (notably, if it is at the start of a line). This also adds two new sections to the man page documenting the syntax and outlining how parsing and command execution works. Thanks to everyone who sent me test configs (they still all parse without errors - but this doesn't mean they still work as intended!). Thanks to Avi Halachmi for testing and man page improvements, also to jmc@ for reviewing the man page changes.
2019-05-12Add simple menus to tree, client, buffer modes.nicm
2019-05-10Add support for simple menus usable with mouse or keyboard. New commandnicm
display-menu shows a menu (bound to the mouse on status line by default) and a couple of extra formats for the default menus.
2019-05-09send-keys also needs to insert key commands in the right order.nicm
2019-04-29Add support for keys to jump between matching brackets - C-M-f and C-M-bnicm
in emacs, % in vi. Suggested by and help from Chris Barber in GitHub issue 1666.
2018-10-18Support for windows larger than visible on the attached client. This hasnicm
been a limitation for a long time. There are two new options, window-size and default-size, and a new command, resize-window. The force-width and force-height options and the session_width and session_height formats have been removed. The new window-size option tells tmux how to work out the size of windows: largest means it picks the size of the largest session, smallest the smallest session (similar to the old behaviour) and manual means that it does not automatically resize windows. The default is currently largest but this may change. aggressive-resize modifies the choice of session for largest and smallest as it did before. If a window is in a session attached to a client that is too small, only part of the window is shown. tmux attempts to keep the cursor visible, so the part of the window displayed is changed as the cursor moves (with a small delay, to try and avoid excess redrawing when applications redraw status lines or similar that are not currently visible). The offset of the visible portion of the window is shown in status-right. Drawing windows which are larger than the client is not as efficient as those which fit, particularly when the cursor moves, so it is recommended to avoid using this on slow machines or networks (set window-size to smallest or manual). The resize-window command can be used to resize a window manually. If it is used, the window-size option is automatically set to manual for the window (undo this with "setw -u window-size"). resize-window works in a similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and -A flags. -a sets the window to the size of the smallest client (what it would be if window-size was smallest) and -A the largest. For the same behaviour as force-width or force-height, use resize-window -x or -y, and "setw -u window-size" to revert to automatic sizing.. If the global window-size option is set to manual, the default-size option is used for new windows. If -x or -y is used with new-session, that sets the default-size option for the new session. The maximum size of a window is 10000x10000. But expect applications to complain and much higher memory use if making a window excessively big. The minimum size is the size required for the current layout including borders. The refresh-client command can be used to pan around a window, -U -D -L -R moves up, down, left or right and -c returns to automatic cursor tracking. The position is reset when the current window is changed.
2018-08-20Add -Z to find-window as well.nicm
2018-08-02Make key trees and some other bits static.nicm
2018-02-28Add -Z flag to choose-tree, choose-client, choose-buffer tonicm
automatically zoom the pane when the mode is entered and unzoom when it exits, assuming the pane is not already zoomed. Add -Z to the default key bindings.
2017-11-15Add a common function for spreading out cells and use it for the twonicm
even layouts and to add a -E flag to select-layout to spread out cells evenly without changing parent cells.
2017-10-05Add -- to some key bindings so leading -s work.nicm
2017-09-08When removing a key table clear it out of clients, fixes issue withnicm
unbind -a reported by Thomas Sattler.
2017-06-09Use brackets around prompts which looks better and matches the other modes.nicm