Commit Graph

422 Commits

Author SHA1 Message Date
39486a6f45 vim:ftdetect:asl: Allow uppercase file ending 2025-07-09 14:01:11 +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
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
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
6b98838f7e vim:keys: Remove unneeded mappings
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`)
2025-06-02 20:59:43 +02:00
f0ec75aa9c vim:keys: Map <leader>d also in visual mode 2025-06-02 20:59:43 +02:00
533e82cb81 vim:keys: Add :keeppatterns to substituting vmaps
All of these should not modify @/.
2025-06-02 20:59:43 +02:00
e0e1e5d971 vim:keys: Fix <Cmd> vmaps
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.
2025-06-02 20:59:37 +02:00
9dc8e71ce6 vim:keys: Map <C-w>! to move window to new tab
I memorized tmux's <prefix>! mapping, but always forget how it is done
in vim.
2025-05-28 14:05:40 +02:00
d7289e1d69 vim:xdg: Fix E474 when &spl has multiple languages
Escape comma to not get

    E474: Invalid argument
2025-05-20 11:47:42 +02:00
2aeb664692 vim👨 Set 'showbreak' to NONE 2025-05-20 11:47:42 +02:00
671d924cca vim:fzf: Span fzf over full window in tmux
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...
2025-04-30 17:44:15 +02:00
25c00c6efd vim:setts: Use ellipsis for lcs extends & precedes 2025-04-30 17:03:04 +02:00
ad025e7d9d vim:setts: Highlight trailing spaces a bit better
Switch from middle dot to bullet point, since it is a bit bigger.
2025-04-30 17:03:04 +02:00
d3cbc9d560 vim:setts: Change 'tabstop' to 8
I got used to code that is indented with (meant) tabs of width 8.
2025-04-30 17:03:04 +02:00
3599a147b8 vim:coc: Abort when coc is not loaded 2025-03-26 00:48:48 +01:00
e04d78a9d8 vim:ftdetect: Glob clang-formats 2025-03-25 18:04:03 +01:00
bf4c5a1291 vim:keys: Alias <leader>g* to <leader>* 2025-03-25 18:03:59 +01:00
393c4e055f vim:coc: Disable diagnostic signs
The line number highlighting is enough and this way I still see the git
signs (without messing with priorities).
2025-03-20 12:51:10 +01:00
63febddf82 vim:coc: Decrease message delay
The value of 25 is orientated at my key repeat rate of 50 (see xinitrc).
This way the message comes fairly quick while not refreshing on every
character when keeping a navigation key pressed.
2025-03-20 12:51:09 +01:00
2b1bdf0fee vim:coc: Disable inlay hints 2025-03-20 12:51:02 +01:00
a73334c8f0 vim: Disable spell checking in .clang-format
Find's a bunch of false positives.

TODO: <COMMENT>
2025-03-11 11:29:11 +01:00
da27170b7e vim:ftplug: Symlink cuda.vim to c.vim 2025-03-05 00:50:16 +01:00
4953434904 c.vim: Use setlocal 2025-03-05 00:50:12 +01:00
459453dc5e fzf.vim: Set w:ignore_non_ascii_chars only once 2025-03-03 16:38:59 +01:00
103355478b fzf.vim: Set filetype to hybrid vim + fzf
This way the Unicode characters are not highlighted. This hopefully
has no weird side-effects.
2025-03-03 16:38:59 +01:00
c348624a00 fzf.vim: Ignore more non-ASCII characters 2025-03-03 16:38:59 +01:00
6531800c4a markdown.vim: Don't set formatoptions
Automatic formatting is annoying and trailing whitespace is nothing I
want ever in my files.
2025-02-05 09:35:20 +01:00
2c55f45783 markdown.vim: Do not fold everything when loading 2025-02-05 09:35:18 +01:00
558bb0582e man.vim: Check if WinResized is supported
WinResized was introduced rather recently with vim patch 9.0.0917 /
neovim v0.9.0 via commit 4571ba4d0a52 ("vim-patch:partial:9.0.0917: the
WinScrolled autocommand event is not enough (#21161)").
2025-01-29 14:27:11 +01:00
b1a21fbdb0 vim:ftplug:man: Try to keep the position in file
How did I only test this while being at the top of the page?
2025-01-25 13:37:11 +01:00
f863f66542 vim:ftplug:man: Add comment to nospell setting 2025-01-25 03:04:35 +01:00
2842bba50c vim:ftplug:man: Move scrolling settings from zprofile 2025-01-25 03:02:07 +01:00
78917a686e vim:ftplug:man: Enable resizing with hard-wrapping
From :h :Man:

> when running `man` from the shell and with that `MANPAGER` [='nvim
> +Man!'] in your environment, `man` will pre-format the manpage using
> `groff`. Thus, Nvim will inevitably display the manual page as it was
> passed to it from stdin. One of the caveats of this is that the width
> will _always_ be hard-wrapped

Since I actually don't like `g:man_hardwrap=0`/`MANPAGER=999` (e.g.
scrolling can be a mess with very long wrapped lines), add an
autocommand that is meant to reload the manpage through `:edit` after
every resize, so that its hard-wrapping adjusts to the new size.

This is slightly hacky, but does its job quite well.

Move the man.vim into after/ftplugin so that it overwrites the `set
wrap` of the global ftplugin, which I want turned off, since it messes
with the buffer shortly when resizing.
2025-01-25 02:57:38 +01:00
467df52c66 vim:ftplug:man: Fix wrapping due to signcolumn
man(1) will assume it can use the full width of the terminal when
hard-wrapping the lines. When signcolumn is enabled the width is one
cell smaller and thus, lines that have a character in the last column
will be wrapped by vim (i.e. almost all of them).
2025-01-25 01:08:51 +01:00
fde6aa06a4 vim:quick-scope: Only highlight on f,F,t,T 2025-01-21 18:32:17 +01:00
59f12488b1 vim: Make trailing space highlighting more subtle
I sometimes work in files where I cannot remove trailing whitespaces (at
least not permanently). In these cases the background highlighting of
them is quite strong and can be a bit annoying. To make this more
pleasing, use the foreground to highlight trailing characters, as long
as tabs and trailing spaces are displayed as non-space characters.

For this I also set `trail` in `&listchars`, and while at it, merged the
two lines setting `&listchars` and cleaned up some comments.
2024-12-04 09:02:09 +01:00
cbacf728e6 vim:keys: Add e flag to [[ and ]] mappings
Let the search place the cursor on the curly brace instead of the start
of the line.
2024-11-20 12:55:19 +01:00
611e83b1c8 vim:keys: Streamline [[ and ]] mappings
Use the `s` flag, so that the position before the last jump is updated
automatically.

Use `<Cmd>` so that both normal and visual mode mappings become
identical and can be merged. This has the added benefit that it now also
maps in operator-pending mode.

Complete the TODOs.
2024-11-20 12:55:18 +01:00
f5ec488b08 vim:keys: Better >> & << for tab-indent-space-align 2024-11-16 02:27:22 +01:00
d831a4140e vim:setts: Set cindent & preserveindent
For slightly better indentation.
2024-11-16 02:22:40 +01:00
5af20402b9 vim:looks: Formatting 2024-11-06 13:53:25 +01:00
066f30a39f vim:au: Pass Funcref to timer_start
Apparently on older neovim versions, passing the name of script-local
functions to `timer_start` is not enough (in v0.10.2 this works, but
v0.7.2 not). Fix this by wrapping it in `function(...)` to pass a
Funcref.

See :h timer_start:

> timer_start({time}, {callback} [, {options}])
> [...]
> {callback} is the function to call.  It can be the name of a function
> or a |Funcref|.  [...]
2024-11-06 13:44:03 +01:00
2437044ed6 vim:looks: Add function to easily see syntax stack 2024-11-06 02:44:28 +01:00
c5463595c0 vim: Rename aesthetics.vim to looks.vim 2024-11-06 02:44:03 +01:00
f404c150b1 vim:setts: Decrease 'scrolloff' (15 -> 5)
It's annoying sometimes.
2024-11-06 02:39:46 +01:00