Commit Graph

1702 Commits

Author SHA1 Message Date
372865f9c4 vim:syn:md: Use lookarounds instead of \zs & \ze
Apparently the `\zs` token does not match characters if they are already
part of a syntax match. For example in `[^0][^1]` only the zero footnote
is matched. Fix this by using a positive lookbehind that does not have
this limitation.

Additionally, use a negative lookahead for the colon to make the pattern
slightly more readable, since it does not need the end-of-line check.
2025-08-12 13:00:41 +02:00
3fb5b5f376 vim:syn:md: Conceal numeric footnotes
Conceal numeric footnotes with superscript numbers. The whole thing is a
bit of a gimmick since only single digit numbers are concealed but I had
this idea for quite some time and wanted to execute it.

When not put into the `after/` directory, the matches are overwritten by
the `markdownFootnote` group.
2025-08-12 12:59:33 +02:00
a3e83e4844 zsh:alias:lsblk: Display all mountpoints 2025-08-07 13:10:02 +02:00
0af6c9fb24 zsh:keys: Fix override of fzf-cd-widget
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)
2025-08-06 13:30:56 +02:00
3cf445e739 zsh:keys: Modify fzf's cd widget to be "in-prompt"
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.
2025-08-06 12:30:35 +02:00
688f8e18aa vim:ftplug:shell*: Add - to &iskeyword
Add the dash to the keyword character list since command names can (and
do) contain them.
2025-08-06 12:30:35 +02:00
5baad5d7a2 vim:ftplug: Remove broken cuda.vim symlink
c.vim does not exist anymore since commit 4802abee17 (vim:setts:
Revert "Include `-` in `&iskeyword`", 2025-07-20).
2025-08-06 12:30:35 +02:00
59863b28b3 tmux: Fix scrolling down in alternate mode
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 ¯\_(ツ)_/¯
2025-08-06 11:38:24 +02:00
fc0cf2ff0a vim:keys: Make git hunk mappings shorter
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.
2025-08-05 10:57:00 +02:00
4a12ed8567 hooks:commit-msg: Allow links being overly long
Allow links on single lines and in git trailers.
2025-08-04 17:53:24 +02:00
8380d4cc29 bin: Add no-ansi to remove ANSI escape sequences
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.
2025-08-04 11:00:14 +02:00
bbf9a1da58 bin:no-ansi-sgr: Set LC_ALL=C for [0-?] range
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
2025-08-04 11:00:01 +02:00
75fb2f56a2 bin:no-ansi-sgr: Conform to specification
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.
2025-08-04 11:00:00 +02:00
1ee41e1c5b vim:keys: Reference commits w/ --pretty=reference
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
2025-07-20 03:37:47 +02:00
4802abee17 vim:setts: Revert "Include - in &iskeyword"
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.
2025-07-20 03:05:10 +02:00
068a8fe9d2 zathura: Change database backend to sqlite
The default value of plain is deprecated. I did this change a while ago
but never staged it.
2025-07-18 14:15:09 +02:00
bf61d01b42 zathura: Fix index mappings
Apparently these were always wrong and I never used them until today.
2025-07-18 14:11:30 +02:00
5539a5e437 vim:ftplug:asl: Use 2 spaces for indentation 2025-07-09 14:01:15 +02:00
39486a6f45 vim:ftdetect:asl: Allow uppercase file ending 2025-07-09 14:01:11 +02:00
d9feb1d468 zsh:p10k: Add custom Session.vim prompt segment 2025-07-09 01:27:37 +02:00
bc0de45375 zsh:funcs: Add findup to search parent directories 2025-07-04 13:41:30 +02:00
0e7171bd5f zsh:diffcmds: Make diff_cmd overwritable by caller 2025-06-30 14:11:31 +02:00
db9aad5dcd zsh:diffcmds: Fix wrong variable assignment 2025-06-30 14:11:30 +02:00
fded58696a vim:keys:TODO: omap [ia]$ in shell scripts
I'd like to have `$` as a text object in shell scripts to select
parameter expansions and command substitutions.
2025-06-27 16:38:52 +02:00
cf68e01510 vim:keys: Center line when opening quickfix entry 2025-06-27 16:37:20 +02:00
f5c6baf856 vim:keys: Add note about macro_type augroup 2025-06-27 16:36:21 +02:00
a8d46caa78 vim:keys: Modularize changes to ]]/][ mappings
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")
2025-06-27 16:33:56 +02:00
2d9b00a0d3 vim:keys: Convert decimal numbers with <leader>hex 2025-06-27 13:29:25 +02:00
91fa7fecb0 rofi: Remove unused wifi-menu script
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.
2025-06-27 13:05:35 +02:00
5078b6a63f *.sh: Fix some shellcheck issues 2025-06-27 12:59:13 +02:00
3eb9113546 hooks:pre-commit: Remove bashisms 2025-06-27 11:35:32 +02:00
781e3a2f4b vim:keys: Substitute only inside visual selection
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`).
2025-06-26 16:18:22 +02:00
e9bb145fe1 vim:plugs: Add quickfixdd
> tiny vim plugin to allow dd inside quickfix buffer

Link: https://github.com/TamaMcGlinn/quickfixdd
2025-06-24 14:27:10 +02:00
0e44a7cb12 i3: Fix Telegram executable name
Telegram changed their binary name from 'telegram-desktop' to 'Telegram'
in version 5.15.0.
2025-06-24 12:54:25 +02:00
151ae41b5c git: Add cont alias for continue 2025-06-24 00:17:15 +02:00
4b5dbd161a zsh:autosuggestions: Switch to history strategy
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").
2025-06-24 00:06:33 +02:00
b7af03770e zsh:alias: Add TYPE column to lsblk output 2025-06-23 22:07:02 +02:00
6dcf97e249 zsh:alias: Add bytestr 2025-06-23 22:04:27 +02:00
3f621617ef less: Open file (also stdin) in vim with e/E
The current file can be edited with `v` already, but this doesn't work
when reading from stdin.
2025-06-20 15:41:35 +02:00
f3d8ea3de0 less: Move $LESS from .zprofile to lesskey 2025-06-20 15:15:07 +02:00
075dbf2431 zsh:diffcmds: Clarify lseek(2) comment 2025-06-20 14:14:03 +02:00
c27bf72fee zsh:diffcmds: Slight refactor & format adjustments 2025-06-20 12:29:19 +02:00
f636479b70 zsh:diffcmds: Improve usage description 2025-06-20 12:24:17 +02:00
2bf7443f52 git: Add scripts -> zsh/autoload/git/ symlink 2025-06-20 11:47:38 +02:00
740c0b2fd7 git: Add git-abort & git-continue
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.
2025-06-19 14:03:17 +02:00
9ed2f526da zsh:autoload: Fix loading of symlinked functions
Only plain files were autoloaded because of the glob qualifier. Switch
to no-directories so that symlinks (e.g. git-ssh-and-https) are loaded.
2025-06-19 12:49:01 +02:00
28903758a8 vim:ftdetect: Use C's syntax highlighting for .asl
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.
2025-06-11 12:50:45 +02:00
465e5e1330 kitty: Better font size mappings (current/all)
More fine-grained control and mappings for current terminal only.
2025-06-09 19:17:16 +02:00
616298df72 i3:multi-monitor: Send only one i3-msg command
Moving and then switching in a separate command flickered sometimes.
2025-06-06 12:03:41 +02:00
a67f8c9ec6 i3: Simulate monitor-independent workspaces
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.
2025-06-05 17:43:24 +02:00