Scrolling down with the mouse wheel in alternate mode (e.g. less)
stopped working for me. I'm pretty sure that this used to work, but tmux
never had a default binding for WheelDownPane, so I'm unsure from where
this change should have come from ¯\_(ツ)_/¯
Ubuntu 22.04 is shipped with 3.2a... There might be more issues with
that version, but these were the ones I could find for now.
Tmux commits needed:
- c03b57465bdf/866117636e47 ("Add different command historys for
different types of prompts ("command", "search" etc). From Anindya
Mukherjee.") for `prompt-history-limit`
- e06a4e041c68 ("Set mouse_x and mouse_y on the status line, GitHub
issue 2913.") for mouse_x in MouseDragEnd1StatusDefault binding
- 9f6164a05cc0 ("Make send-keys without any arguments send the key it is
bound to (if any). GitHub issue 2904.") for `C-d`, `Enter` bindings
Also change the only other use of PPage (i.e. PageUp) to PgUp. PageUp
and PageDown would probably be nicest, but I like that PgUp and PgDn are
of equal length. I dislike NPage and PPage.
This is more than often annoying. For example when switching from a fzf
pane to a vim pane (i.e. needing these bindings instead of `C-[hjkl]`)
and then trying to move the cursor.
Reverts: 048933e67d ("tmux: Make `<prefix>[hjkl]` bindings repeatable")
Similar to everywhere else, paste the primary X selection (XA_PRIMARY)
instead of the most recent tmux paste buffer.
TODO: Forward event to 'root' key-table to prevent code duplication
The copy command should only be executed when not in a mode (i.e.
alternate?). This gets rid of the error message "Not in a mode" when
double/triple clicking inside of vim etc..
When switching to the 'SecondClick' event in 4b8e877305 ("tmux: Use
SecondClick instead of DoubleClick event"), I forgot to add an `unbind`
of the default binding that was previously overwritten. Since I just
resourced my config I didn't notice.
Apparently I broke them in commit 4e8ab80c66 ("tmux: Fix edge cases
in paragraph text-object") by adding the comments. Through them the
bindings were not set in place since the binding stopped with the
comment (I guess?). Weirdly I do not get an error message and the
default bindings stay, so I am not sure what exactly happens. This could
also be due to a version change from 3.3a to 3.4.
Fix the bindings by starting a code block instead of just escaping the
newline.
Do this also everywhere else to prevent errors in the future.
It happened to me multiple times that I closed a pane without actually
wanting it via a (too) quick <C-d>.
Activate remain-on-exit so that I have to press <C-d> twice before the
pane is actually killed. Dead panes can be recovered with
`respawn-pane`.
Will see how this goes - could be annoying.
Also add comments explaining the history & pane position checks in the
C-y and C-e bindings, since I used those and had to rethink about what
they're doing.
Implementing logic inside tmux's config starts to become tedious with
growing complexity. Introduce a shell script that handles the logic of
the (now also repeatable) vim-like bindings.
According to the manpage all occurrences of `%1` are replaced, but only
the first of `%%`. The binding also worked with `%%`, but better stick
to the docs.
move-window does not support format parsing. Apparently it was a bug
that it did in the past. Fix this by using run-shell - which I hate as a
solution.
I rarely use this binding as by now I have the muscle memory of `<C-a>[`
to enter copy-mode and since my brain thinks that I can press Escape if
I accidentally press the prefix and I get disappointed every time.
With commit dd36a4561b0b ("use XDG_DATA_HOME for resurrect-dir path")
the default location of resurrect-dir changed to
$XDG_DATA_HOME/tmux/resurrect as long as $HOME/.tmux does not exist.
This makes manually hard-coding resurrect-dir obsolete.
Use move-window for window dragging instead of a loop and swap-window.
When using -a or -b (i.e. after or before) the target can be occupied
and the windows are reordered automatically.