scroll_region_{upper,lower} are only modified by the DECSTBM escape
sequence:
> This control function sets the top and bottom margins for the current
> page. You cannot perform scrolling outside the margins.
And are 0 and pane_height - 1 otherwise. Tmux implements these such that
command output can't be displayed outside these margins, but the cursor
in copy-mode can. This means that using them to check if the cursor is
at the very top or bottom can break in certain situation (even those
seem extremely rare since I have never heard of this escape sequence).
Get rid of them and just use 0 and the pane height.
[1]: https://vt100.net/docs/vt510-rm/DECSTBM.html
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.
It's really annoying if it tries to correct me when I create a new
directory that is named similar to an existing one.
Group together aliases that add a precommand modifier.
Since `mkdir` receives the `-p` flag already via `add_flags` the `md`
alias can directly alias to `mkdir` instead.
Supported git commands should print their output in columns (e.g.
git-branch).
I am still unsure if I'd like to keep the option to fill rows first. The
default behaviour is columns first and `ls` does this too for example.
But I think that it makes more sense to fill the rows first, especially
with sorting by committerdate to delay the need to scroll as far as
possible.
When entering visual mode it does not really make sense to keep the
cword highlighting but it should restart automatically (i.e. without
CursorMoved) when leaving back out of visual mode.
About directly starting selection highlighting I am still unsure since I
rarely ever want to highlight only one character and it could decrease
performance.
When exiting visual mode I want to clear the highlights of the visual
selection. As this is done automatically now, <Esc> does not need to do
it (and i had problems with keys.vim executing ClearHighlights because
of the script variables).
This reverts commit b3f1a469db ("vim:keys: Clear highlights on
normal-mode Esc").
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 am still unsure if I want the author or committer name. For the date I
think it makes sense to have the committer date since it reflects better
when the branch last changed.
When setting up the remotes the fetch url can use https since the fork
will be public anyways. This delays a prompt for the ssh key until it is
really necessary.