Commit Graph

209 Commits

Author SHA1 Message Date
db6a7e2984 vim:setts: Reactivate 'cursorline' 2023-02-13 15:15:34 +01:00
be763b9ff2 vim:keys: Center search on <CR> too
In addition to center the cursor-line on `n` do it right after accepting
the search as well.
2023-02-13 15:14:30 +01:00
11fc486768 vim:keys: Fix search result centering mapping
The cursor should be vertically centered **after** we moved to the next
search result.
2023-02-13 14:55:41 +01:00
fc04a6a682 vim:keys: Add leader mappings to switch the case
I find myself quite often to type `gUl` but find that it has quite some
brain overhead. We will see, if these mappings aid in this regard.
2023-02-09 14:32:15 +01:00
1b365be8e7 vim:aucmd: Underline old cursor position
Underline old cursor position for better readability. Reusing
`TermCursor` made me confuse the current window many times.

My favorite solution would be an empty box around the position similar
to how terminals do it when focus is lost. But I fear that this is not
possible with a simple highlighting group.
2023-02-09 12:02:03 +01:00
6930d9b2d9 vim:keys: Fix <leader>grc when on end of hash
When the cursor is on the last character of the hash (e.g. after
pasting), the mapping would break and insert the commit subject behind
the next word.

Fix this by using `viw<Esc>` which places the cursor on the end of the
current word independent of the placement of the cursor.
2023-01-23 19:52:07 +01:00
93e8517ab2 vim:keys: Center next search result on n 2023-01-21 02:01:57 +01:00
feab64f566 vim:highNonASCII: Use shorter syntax to compare 2023-01-19 22:14:50 +01:00
2d497c6363 vim:highNonASCII: Support extension of ignore_char 2023-01-19 22:11:36 +01:00
e51427143f vim:keys: Format paragraph with <C-q> in INSERT
`i_CTRL-Q` is not really useful anyways:

> Same as CTRL-V.
> Note: Some terminal connections may eat CTRL-Q, it doesn't work then.
> It does work in the GUI.
2023-01-11 21:42:39 +01:00
fed62f3b6d vim:keys: Keep the cursor position when formatting
Quickly formatting multiple paragraphs is now not as simple as before,
but the benefits still prevail.
2023-01-08 14:04:13 +01:00
5dc975c155 vim:highNonASCII:french: Add forgotten ÿ 2023-01-05 09:00:27 +01:00
678910f4ec vim:highNonASCII:french: Move œ (oe) behind o 2023-01-05 09:00:06 +01:00
8fda4ce158 vim:setts: Set conceallevel=1
I want concealable text to be replaced if possible but not hidden
completely (i.e. `=2`) as this makes moving over lines nauseous.
2023-01-04 22:44:41 +01:00
06c0d17fe4 vim:keys: Add <leader>v/ to search in visual selec 2022-12-29 19:55:02 +01:00
616988560a vim:keys: Add mapping for commit amending
Map `<leader>gca` to fugitives `G commit --amend`, as I use that quite
often.

Also change the normal commit mapping to use double `c`s for unambiguity
between the mappings and as I already got the habit of pressing `c`
twice to skip waiting `timeoutlen` (As the mapping was already
ambiguous with `<leader>gcd` for `:Gcd`).
2022-12-28 13:55:08 +01:00
dacd6d5de0 vim:keys:<leader>": Convert only pairs of quotes
When converting double to single quotes with `<leader>"`, only pairs of
quotes should be converted. This lowers the false positive rate by
trying to make sure that the double quotes are really used for string
quotation and not for something else (e.g. exactly these mappings).
2022-12-28 13:53:33 +01:00
9ac408ccae vim:aucmd:highVisualSel: Yank lines silently
When yanking multiple lines, a message stating that will appear. Make
this message silent.
2022-12-28 13:44:19 +01:00
aae84fd197 vim:aesth:highNonASCII: Add uppercase Umlaute
Forgot to add the uppercase Umlaute as well.
2022-12-28 13:42:48 +01:00
b559ff646b vim:aesth:highNonASCII: Support multi-spelllang
`&spelllang` can be a list of multiple languages. Support that by
matching the language at the start, the end and/or between commas,
instead of comparing the value, and then appending to `l:ignore_chars`
for every matched language.
2022-12-28 13:40:50 +01:00
c2a657c609 vim:aesth:highNonASCII: Support spelllang=french 2022-12-28 13:39:46 +01:00
1360969ca4 vim:aesth: Refactor HighlightNonASCIIChars()
Make it easier to support other languages.
2022-12-28 13:32:02 +01:00
fe669c0aa7 vim:keys: Add visual equivalent of substitute maps 2022-12-28 13:23:05 +01:00
731a290d7b vim:keys: Map <leader>" to s/"/'/g
I prefer single quotes when a language supports them for normal strings
(e.g. python & vimlang). Add this mapping for a quick conversion.
2022-12-28 12:57:13 +01:00
fd1cb36437 vim:keys: Rephrase wrap-move comment s/real/normal 2022-12-28 12:32:55 +01:00
46ec34826e vim:keys: Map display movements only when wrapping 2022-12-27 04:24:21 +01:00
3a7f06256f vim:keys: Keep selection when changing indentation 2022-12-25 22:42:22 +01:00
4c111c0e3b vim:keys: Make display-line movements the default
I'd rather have the movement mappings behave on display-lines to make it
easier when navigating in very long lines.
2022-12-22 10:55:16 +01:00
a14bc72716 vim:autocmd: Highlight visual selection
Highlight visual selection similar to the cword highlight. Restrict the
cword highlight to only normal mode.
2022-12-22 01:19:01 +01:00
66a231e8a8 vim:autocmd: Remove forgotten debug print 2022-12-22 01:16:38 +01:00
0ef3cd3723 vim:setts: Turn off line wrapping 2022-12-12 11:21:27 +01:00
9abf215871 vim:autocommands: Reset old_cword when deleting
When deleting the match, w:old_cword has to be unset as well. Otherwise
it can happen that it is not properly readded (e.g. when moving from a
word to an empty line and then back to the same word).
2022-12-06 15:34:33 +01:00
5ee98950eb vim:autocmd: Check if same cword when highlighting
When highlighting the current word, check if it is the same as the
currently highlighted one, so that matchdelete and matchadd are not
called unnecessarily.
2022-12-06 15:31:53 +01:00
a290c07acc vim:settings: Improve line wrapping behaviour 2022-11-21 16:38:52 +01:00
33491571e2 vim:autocmd: Add TODO and wip code for old_cursor
The commented code seem to not work but I want to have the behaviour
when entering the command line too.
2022-11-21 16:36:53 +01:00
a0d68f9265 vim:autocmd: Highlight old cursor position
Highlight old cursor position as if the cursor was still there when
switching window focus.

This way I keep an overview of the cursor positions.
2022-11-21 16:31:58 +01:00
93ef5afaba vim:autocmd: Update cword highlight in insert mode 2022-11-21 15:52:26 +01:00
ac99f373d3 vim:autocmd: Highlight cword with lower priority
Use a priority of below 0 so that the cword highlighting does not
overrule the highlighting of `hlsearch`.
2022-11-21 15:50:55 +01:00
762089cbee vim:autocmd: Use matchadd to Highlight cword
Use `matchadd` instead of `match` as it has no limit on the number of
highlights.

Also call the function every time the cursor moved instead of only when
holding. This makes it snappier while also keeping the highlight when
moving inside the cword.
2022-11-21 15:46:50 +01:00
7a4e8e6df2 vim: Set only local value when cycling spelllang
When having multiple windows open, I want it to change only for the
current buffer/window.
2022-11-21 15:18:13 +01:00
a85f5ba81a vim: Do not always highlight Umlaute as non-ascii
When the spelling language is set to German, they should not be flagged
and thus excluded from the regex.
2022-11-21 15:16:59 +01:00
684421d337 vim:autocmd: Start insert mode on new file 2022-11-01 16:55:42 +01:00
594e31d4b7 vim:coc: Customize completion menu mappings
When no item was inserted yet, the first tab should insert the first
item or the first shift-tab should select and insert the last item.
2022-10-21 03:34:10 +02:00
2d27e598b6 vim:coc: Use tabs for indentation 2022-10-21 02:05:21 +02:00
fc9f8f93ef vim:coc: Fix issues with new version v0.0.82
- CheckBackspace needs to be used instead of <SID>CheckBackspace
- Comment out clashing/obtrusive leader/space mappings
- Change classobj mappings to use `o` as they were clashing with the
  comment textobj.
- Simulate the default statusline with the help of 'statusline'.
  Otherwise it would be empty/just containing coc elements.
2022-10-21 02:05:21 +02:00
928b1e8647 vim:coc: Add the remaining parts of suggested conf
"Lieber haben als brauchen".
2022-10-21 01:43:52 +02:00
3d44400c59 vim:plugins: Update coc.nvim to v0.0.82
Update the copied parts from the suggested config in the README.
2022-10-21 01:40:28 +02:00
77393007bf vim: Move coc config into existing structure 2022-10-21 01:33:36 +02:00
83e10f32da vim:plugins: Hotfix broken packloadall w/ nvim 0.8 2022-10-21 01:03:17 +02:00
b698873d2c vim:keys: Fix BCommits and G blame mapping clash 2022-10-21 00:52:45 +02:00