The check if the WinResized event is supported was broken from the
beginning on since I used `has()` instead of `exists()`.
Fixes: 558bb0582e (man.vim: Check if WinResized is supported,
2025-01-29)
I learned just now that neovim added mappings for these by default in
v0.8.0. But instead of checking for neovim, check for the existence of
mappings in case vim adds these in the future too.
I believe I had the problem in the past that the completion wouldn't
automatically select the first entry but simply display the menu. Thus
it would simply insert a new line when pressing return to accept it.
Unfortunately I didn't commit it back then and I can't reproduce it now.
But it doesn't not hurt so I commit it to be safe.
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
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.
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.
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.
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")
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`).
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.
These were commented out already for longer. For `(` I have delimitMate
and the `<CR>` mapping conflicts with the one from coc.nvim (which
includes the `<C-G>u`)
When switching to <Cmd> for mappings in fc9874bf97 ("vim:keys: Use
<Cmd> for plain command mappings") I forgot that the previously inserted
selection range marks (i.e. '<,'>) are missing now. This broke vmaps
that used :substitute without having added them manually.
Since <Cmd> has some performance benefits, I want to keep it and add the
missing marks where needed.
Use tmux popup windows for fzf in vim, so that it spans (almost) the
full tmux window. My use-case for this is, that sometimes I open fzf in
a split pane and notice then that the lines are too long for the width
of the pane. Since the fzf window won't resize if I resize the pane
(TODO: issue in fzf.vim), I have to first close it, resize and then
reopen fzf. I hope to fix this by using always the big tmux popup and
eliminating the need to resize at all. The issue remains when vim is in
a split window outside of tmux. I can imagine that this will become
annoying, but we'll see...