This commit addresses a couple of issues:
1. fzf's `key-bindings.zsh` was sourced twice: Once in keys.zsh and once
via the symlink in `external-plugins/`. Fix this by removing the
source in `keys.zsh`.
2. The section about the fzf bindings in keys.zsh was a mess. Reorder
and rewrite some comments to make it nicer.
3. My just added custom `fzf-cd-inplace-widget` does not work like this.
Since `key-bindings.zsh` is sourced (was sourced again) after
`keys.zsh`, my override is overridden itself by the default. I
noticed and fixed this when I originally wrote and tested the
function, but unfortunately I forgot the old `bindkey` commands in
`keys.zsh`, which is why I now forgot about it and committed this
erroneously. To fix this, bind the keys after sourcing
`key-binding.zsh` in the newly added `fzf.key-bindings.config.zsh`.
Additionally, move the widget definition as well to have everything
at one place.
Fixes: 3cf445e739 (zsh:keys: Modify fzf's cd widget to be "in-prompt",
2025-08-06)
Currently, fzf's cd widget executes the cd command via accept-line, so
the command is also visible in the scrollback buffer. In contrast to
this, the cd-{forward,backward,up} suite changes the directory in-place,
without touching BUFFER, with an additional prompt redraw (one could say
"in-prompt"). Since I find this more appealing, overwrite the default
fzf widget with a custom one that has the same behaviour.
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 ¯\_(ツ)_/¯
I act very rarely on the whole file but quite often on hunks, so it
makes sense to have the mappings for the latter shorter.
The new mappings I wanted to use for the whole file are conflicting with
`<leader>gf` (i.e. `:GFiles`), so I've disabled them for now.
Similar to `no-ansi-sgr` but removes all ANSI escape sequence, not just
the SGR ones.
See the previous commit bbf9a1da58 (bin:no-ansi-sgr: Set LC_ALL=C for
`[0-?]` range, 2025-07-30) for an explanation of why LC_ALL has to be
set.
Setting LC_ALL=C makes it possible to use the range `[0-?]` instead of
splitting it into `[0-9:-?]` as done previously. Without LC_ALL, sed
complains with:
sed: -e expression #1, char 21: Invalid range end
The GNU manual explains this partially, although I still don't quite
understand why this range specifically does not work in `en_US.utf8`.
See:
> Within a bracket expression, a *range expression* consists of two
> characters separated by a hyphen. It matches any single character that
> sorts between the two characters, inclusive. In the default C locale,
> the sorting sequence is the native character order; for example,
> `[a-d]` is equivalent to `[abcd]`.
Link: https://www.gnu.org/software/sed/manual/sed.html#Character-Classes-and-Bracket-Expressions
Previously - in the existence of other ANSI escape sequences - the
script deleted text due to the too broad regex. For example in:
foo^[[K bar m
everything behind `foo` was deleted. Thus, only remove SGR sequences by
only matching the spec-allowed bytes.
Use git's preferred way of referencing commits (`--pretty=reference`)
instead of the kernel's (`--pretty='%h ("%s")'`). I can see that
specifying the date makes sense and that the quotes are at best
unnecessary in the parentheses and at worst confusing when the subject
contains quotes itself.
Link: https://git-scm.com/docs/SubmittingPatches#describe-changes
Commit 0369218114 ("vim:settings: Include `-` in `&iskeyword`") added
the dash to `&iskeyword` but I didn't give an explanation for the change
and don't remember what led me to it. Today I'm annoyed by it since it
breaks some stuff (e.g. previously the C pointer arrow and syntax
highlighting of negative numbers in Python). The C ftplugin is obsolete
now, so delete it.
This reverts commit 0369218114.
Instead of changing the functionality of `]]` and swapping `][` and
`]]` in one mapping, do it in two separate steps. This way both changes
can be used independently of each other.
Fixes: 459e0b7113 ("vim:keys:TODO: Modularize changes to ]]/][ maps")
I've added this way back when I started customizing my system but never
used it. The project does not list any license, so this should have
never been in here.
When substituting in a visual block selection, the automatically
inserted range `'<,'>` is not enough as the pattern will also match
outside of the selection on the same lines. To only match inside the
selection, insert the `\%V` atom.
Theoretically the pattern will also need the atom before the last
character to make sure that everything is inside the selection, but this
can be inserted manually when needed (see `:h /\%V`).
I don't feel as if I'm actively benefiting from match_prev_cmd and it
definitely makes my prompt slower. (One could probably make it faster by
pre-calculating the history events matching the (previously) executed
command in a preexec zsh-hook and then comparing each successor to the
currently typed command instead of repeating all the work every time
BUFFER changes)
With this change my fork is not needed anymore, so switch back to
zsh-users' repo and update it while at it.
This effectively reverts 77b2d63341 ("zsh:autosuggestions: Use own
fork for now").
I find typing `git {rebase,merge,...} --{continue,abort}` a bit
annoying, since it is a lot of typing. I have added an alias for `rebase
--continue` (grc), but the problem remained for the other commands.
Add a script that continues or aborts the ongoing process by detecting
it automatically.
Make .asl files (ACPI Source Language) belong to the 'c' filetype. Not
perfect, but an easy way to have some colors without a full plugin.
Additionally set the 'asl' filetype too, in case I want to add some
ftplugin in the future.
Often when I want to open a new workspace, I look at my bar to see which
workspaces are still free. This does not work sometimes when having
multiple monitors connected, as workspace numbers are unique between all
outputs.
Add a script that handles workspace switching/moving by prepending the
index with the index of the current monitor.