Commit Graph

1686 Commits

Author SHA1 Message Date
126ccb0c7a git: Fix option capitalization
Semantically this changes nothing, but the name with a capital `S` is
used by git-config(1).
2025-09-12 17:04:49 +02:00
dadf344f2b git: Explicitly set core.whitespace.tabwidth=8 2025-09-12 17:03:53 +02:00
f17cde7943 git: Show all refs as decoration in logs 2025-09-12 16:57:00 +02:00
a89ad407ba git: Make all graph colors bold
This looks a bit better in my opinion.
2025-09-12 16:56:05 +02:00
a26a899213 git: Make all bold colors bright
Make all bold colors (also) bright, since kitty does not render bold
colors in their bright version, but I've gotten used to how this looks.

For the graph I've gotten rid of the boldness and only switched to
bright versions since I think it makes no sense to have different line
weights for the branches (Although I apparently never noticed, so I
can't say that this was misleading in practice).
2025-09-12 16:51:36 +02:00
6db1a710c6 git: Rename zsh-autoload.sh -> external-script.sh
With the last commit 9c1e3f4679 (git:zsh-autoload: Use relative
scripts/ folder, 2025-09-12), `zsh-autoload.sh` could execute any type
of external script. Rename it to a more generic name.
2025-09-12 16:25:39 +02:00
9c1e3f4679 git:zsh-autoload: Use relative scripts/ folder
This makes it a bit more agnostic to the type of scripts being used.
2025-09-12 14:49:59 +02:00
bb7ef3769d git: Add branch-rename
Small script to rename a branch locally and on a given remote.
2025-09-12 14:35:44 +02:00
0534ec493e zsh:alias: Make sizes an anonymous function
This way one can easily redirect stderr for both commands (not just
`sort`) and specify a path. The path defaults to the current directory,
but listing each entry by globbing.
2025-09-07 21:09:11 +02:00
708daa10dc kitty: Disable cursor shell integration
It's super slow and I really don't need it. I'd prefer to have kitty
mess with my shell as little as possible.
2025-09-04 11:14:52 +02:00
6bd13a9b56 kitty: Open url with kitty_mod+f
Similar to zathura's `f` to follow links.
2025-09-04 11:14:45 +02:00
a34cdab694 vim:keys: Revert "Add <leader>g[pP] for system clipboard"
This reverts commit 2bceafeb4e.

`<leader>gp` conflicts with GitGutterPreviewHunk.
2025-09-03 15:01:57 +02:00
456f71d939 vim:keys:TODO: Add <leader>[h 2025-09-03 13:33:09 +02:00
2bceafeb4e vim:keys: Add <leader>g[pP] for system clipboard 2025-09-03 13:18:17 +02:00
af0d9e8fd1 vim:keys: Disable gp mapping for now
It conflicts with the default.
2025-09-03 13:18:17 +02:00
d57fbf0e66 vim:keys: Prepend fzf bindings with f
All fzf related bindings should start with `<leader>f`. This resolves
the clash between `GFiles` and the git actions targeting the full file.
2025-09-03 13:18:16 +02:00
a23159e50d vim:keys: Merge fzf mappings 2025-09-03 13:18:16 +02:00
e8a8f9637a vim:coc: Re-enable backup files
CoC disables backup files due to a problem with a typescript
language-server (it becoming slow when the backup file is written,
triggering a `structureChanged`). But:

1. I want backup files
2. I do not use that language server
3. If I would:
	1. I could disable backup files in a filetype plugin
	2. The linked issue is from 2019 - no idea if this is still
	   present today
4. I don't think this issue is even a thing with a `&backupdir` that
   does not include relative directories (which is the case for me)

So remove the lines disabling backups and go back to vim's defaults:
`nobackup` and `writebackup`.

Link: https://github.com/neoclide/coc.nvim/issues/649
2025-09-03 11:54:50 +02:00
0e5baf5e36 vim:coc: Add coc-go server 2025-09-03 11:36:27 +02:00
fced504674 tmux: Kill dead pane with Escape too 2025-09-03 10:07:53 +02:00
a49cbcae21 git:core.pager: Remove --quit-if-one-screen
The inconsistency annoys me.
2025-09-03 10:02:06 +02:00
9271a293cb git: Enable clone.filterSubmodules
> If a partial clone filter is provided (see --filter in
> git-rev-list(1)) and --recurse-submodules is used, also apply the
> filter to submodules.

I have never used --filter before, but it sounds as if I want this
enabled in the case that I do.
2025-09-03 10:00:48 +02:00
2e4086500d git: Disable rerere
I had this change sitting around so long that I forgot why exactly I
disabled it, but know that some problem arose from rerere. I think that
even though it is super cool, it brings a sneaky new layer of possible
errors. Maybe I'll re-enable it in the future.
2025-09-03 09:53:54 +02:00
ca15f2399e bin:no-ansi: Fix final byte range
Don't know why I put `z`, the range goes until `~` (i.e. 0x7E).
2025-09-01 16:50:03 +02:00
198069fac7 zsh:alias: Add -a to cp
Preserve all attributes (i.e. timestamps, permissions, etc.). This also
implies `--recursive` which I probably could have added already sooner.
2025-08-30 11:48:45 +02:00
4c12418b62 git:track: Fix unnecessary subshell launch
While at it, modify the formatting of the line above slightly.
2025-08-28 12:24:06 +02:00
5767210dce git:track: List remote refs only on request
List only the local heads by default and require the remote refs to be
passed as arguments. For example:

	git track origin

To make this easier, add support of an `--all` flag to list all remote
refs.
2025-08-28 12:24:02 +02:00
ddb279da7b kitty:daemon: Write to log file 2025-08-26 16:54:55 +02:00
07428c661d kitty:daemon: Support optional instance group name 2025-08-26 13:43:03 +02:00
a7e4c2c770 kitty:daemon: Use TMPDIR and support multi-user 2025-08-26 13:41:18 +02:00
c09ed22389 i3: Move kitty daemonization into own script 2025-08-26 13:06:08 +02:00
1f6fb2abf7 zsh:glog: Bind Ctrl-s to toggle-sort
When searching for a specific commit in a long history the chronological
sorting can sometimes be annoying. Map ctrl-s to toggle-sort so that the
best result can be at the top.
2025-08-24 20:57:23 +02:00
b47c91bb5f zsh:glog: Use Ctrl-Alt for preview bindings
This makes it more consistent with the preview scroll bindings.
2025-08-24 20:57:17 +02:00
fec954c30c zsh:glog: Move header into variable 2025-08-24 20:57:10 +02:00
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