Commit Graph

432 Commits

Author SHA1 Message Date
6f8fc406d6 vim:keys: Fix [[ mappings
I broke the default behaviour of jumping to open braces that are alone
on their line.
2024-09-25 10:54:57 +02:00
6a55f616cc vim:ftplug:fzf: Add another Unicode UI character
By the way: Apparently I committed the initial commit of fzf.vim and the
one adding the TODO accidentally together in 86af2da785
("vim:ftplug:fzf:TODO: Look up other Unicode chars").
2024-09-25 10:54:56 +02:00
86af2da785 vim:ftplug:fzf:TODO: Look up other Unicode chars 2024-09-21 00:53:23 +02:00
5b84d4ae55 vim:setts: Only one global status line
for more screen real-estate.
2024-09-21 00:37:43 +02:00
b299ea510f vim:ftplug:vimwiki: Copy markdown section folding 2024-09-21 00:33:24 +02:00
43bca5f51e vim:ftplug:md: Add ! to MdSectionFold definition 2024-09-21 00:30:40 +02:00
9d756c2748 zsh:alias: Add duration that formats seconds 2024-09-20 16:29:51 +02:00
fceea7bc32 vim:fzf: Increase window size
Default/previous setting was:

    let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
2024-09-18 15:16:42 +02:00
61f1a7ee9b vim:keys: Cycle spelllangs only between en & de
If :h 'spelllang' is something else, do nothing.

A possible future improvement could be to keep a list of the languages
to cycle between and first adding any other languages to this list so
that one could return to the original setting. I see this especially
useful when the current setting is `en,de`.
2024-09-18 15:16:42 +02:00
e54b1fc71a vim:keys: WIP fix swapping of ]] and ][
Make ][ and ]] work like they used to with the new functionality through
a workaround.

The problem is that recursive mappings are evaluated at runtime not
"compiletime" - which is what I would need in this situation.

I still want both mappings blocks so that they are not entangled and I
can turn each one off without affecting the other.
2024-08-30 18:14:20 +02:00
034db637c7 vim:keys: Relax [[ maps for different style guides
I use the [[ & etc. mappings to jump between function definitions in C.
This works as long as the braces are put on a newline (like in the
kernel coding style guide).

Relax the mappings for opening braces to jump to unindented lines with
an opening brace to cover also different style guides.
2024-08-30 18:14:20 +02:00
c1d91fa934 vim:setts: Re-enable 'wrap'
I don't remember why I turned it off. But currently I enable it a lot.
2024-07-11 19:09:36 +02:00
1075264593 vim:setts: Add / to 'formatoptions'
Do not insert the comment leader on 'o' on trailing inline comments.
2024-07-11 19:09:32 +02:00
9db4b32f02 vim:aucmd: Make highlighting toggleable 2024-04-03 13:34:33 +02:00
06b987afa8 vim:aucmd: Put often used <cword> into variable 2024-04-03 13:34:19 +02:00
e84eaba7a2 vim:aucmd: Don't overwrite constants when sourcing
When resourcing the vimscript (i.e. writing it) currently three errors
are printed that constant values cannot be overwritten.
2024-04-03 13:32:23 +02:00
f1f9f36d43 vim:aucmd: Reorder *Highlight* functions
Also improve their comments.
2024-03-24 16:56:12 +01:00
0006a778f9 vim:aucmd: Improve highlighting on mode changes
When entering visual mode it does not really make sense to keep the
cword highlighting but it should restart automatically (i.e. without
CursorMoved) when leaving back out of visual mode.

About directly starting selection highlighting I am still unsure since I
rarely ever want to highlight only one character and it could decrease
performance.
2024-03-24 16:56:12 +01:00
6260c84f3a vim:aucmd: Clear highlights on exiting visual mode
When exiting visual mode I want to clear the highlights of the visual
selection. As this is done automatically now, <Esc> does not need to do
it (and i had problems with keys.vim executing ClearHighlights because
of the script variables).

This reverts commit b3f1a469db ("vim:keys: Clear highlights on
normal-mode Esc").
2024-03-24 16:56:11 +01:00
bfccb0f089 vim:aucmd: Support multi-line selection highlight 2024-03-24 16:47:49 +01:00
a4405ee614 vim:keys: Change family of <C-w>gf mappings
The mapping to split and open the file under cursor exists by default
(not as I thought), but is not <C-w>gf but rather <C-w>f.

Swap the mappings for tab and split 'destination'.

Fixes: 8096917ad ("vim:keys: Open file in split with `<C-w>g[fF]`")
2024-03-18 14:39:03 +01:00
8096917ad4 vim:keys: Open file in split with <C-w>g[fF]
Open the file under the cursor in a split window similar to the rest of
the `<C-w>` mappings. I'm surprised this mapping does not exist by
default.
2024-03-07 13:09:41 +01:00
b3f1a469db vim:keys: Clear highlights on normal-mode Esc
Clear highlights from visual selection or word highlighting together
with the highlight of the search results.
2024-02-20 01:21:46 +01:00
58243e0510 *: Update and add TODOs 2024-01-05 16:20:42 +01:00
424be02df4 vim:aucmd: Highlight selection in all windows
Highlight the visual selection in all windows containing the current
buffer.
2023-08-22 19:29:00 +02:00
35536bfa7b vim:keys: VMap <leader>\_ to escape underscores 2023-07-16 13:13:44 +02:00
7ce2901078 vim:ftplug:tex: Escape underscores in macro-type 2023-07-16 13:12:18 +02:00
4e79b369c3 vim:keys: Rewrite mapping functions to use dicts
Instead of having a long list of `map` commands, define a dictionary for
the mappings and take shortcuts were possible.
2023-07-16 13:11:14 +02:00
31a267a0e7 vim:wiki: Don't highlight any Unicode rxTableSep
Doesn't matter what character it is.
2023-07-08 02:08:30 +02:00
d27fe12d01 vim:wiki: Don't highlight vert. box drawing char 2023-07-08 02:05:28 +02:00
80e09685e7 vim:keys: Add macro_type for uppercase snakecase 2023-06-27 18:23:02 +02:00
dd3de8d709 vim:plugs: Update vimwiki for Unicode support
My fix was merged to support unicode table separators. This has the
benefit that `|` now can be used in the cell content.
2023-06-25 23:49:10 +02:00
99d5e1ff21 vim:ftplug:tex: Do not open quickfix on warnings 2023-06-25 23:22:20 +02:00
a0825dac6a vim:ftplugin:tex: Remove options set by default
Quite a few things were obsolete because they were deprecated or already
set by default.
2023-06-24 18:20:03 +02:00
ed829f52e4 vim:plugs: Update vimtex v.2.8 -> v2.13
build_dir was deprecated for out_dir and aux_dir.
2023-06-24 18:18:12 +02:00
73529d673d vim:ftplugin:python: Change textwidth to 88 2023-06-23 23:14:56 +02:00
0c4dfbf363 git:ignore: Add /.git
Ignore the .git directory globally instead of ignoring it manually in
tools like fd and ripgrep.

I feel very dumb for putting all this time into the redefinition of :Rg,
especially since I am currently **much** procrastinating writing my
bachelor thesis.
2023-06-23 17:03:29 +02:00
b80f86d085 vim:plugins: Do not hardcode quotes in Rg redef.
They redefinition would fail if fzf.vim would ever change the quotes
used.
2023-06-23 16:23:12 +02:00
cb67a46c0b vim:plugins: Make Rg redefinition more robust 2023-06-23 15:59:24 +02:00
2ef89f4e81 vim:plugins: Redefine :Rg programmatically
Instead of setting a hard coded value, get the current definition of
:Rg, add `-g "!.git"`, and redefine the command.
2023-06-23 15:58:35 +02:00
2411a42e32 ripgrep: Add --hidden by default 2023-06-23 14:19:09 +02:00
e6509c2651 vim: Create dict for special chars in languages
This way it is more easily extendable.

This also gives the possibility to modify it in ftplugins. I thought
about removing 'de' from the dictionary in the tex.vim ftplugin to
encourage using `\"a` and alike.
2023-06-08 17:18:00 +02:00
5d4954f10e vim:aucmd: Do not start in insert mode in new file
This is annoying when moving through the jumplist and jumping over a
deleted file (which now is a 'new' file).
2023-05-24 23:53:10 +02:00
b64e5fef4d vim:keys: Add <leader>g* analog to <leader>*
Do the same thing without the word boundaries.
2023-05-22 15:14:13 +02:00
0ca1baec8c vim:ftplugin:c: Exclude - from 'iskeyword'
They don't work well together (e.g. pointer arrow).
2023-05-21 16:07:51 +02:00
29f9e2bb91 vim:ftdetect: Detect *.h as C files 2023-05-21 16:07:20 +02:00
7065f4b043 keys:vim: Fix display of search count on n & N
When 'lazyredraw' is set the search count is not displayed. This seems
like a bug as it is being displayed if `n` and `N` are not remapped.

Fix this by shortly turning off lazyredraw and resetting it after.

This leads to the new problem that hlsearch is not triggered. It does
stay though after searching with `/<CR>`, so this is a smaller issue I
can fix later.

Found thanks to: https://github.com/kevinhwang91/nvim-hlslens/issues/34
2023-05-21 16:01:37 +02:00
848df05810 vim:keys: Fix <Tab>/<C-I> confused mapping
In a terminal with libtermkey support (e.g. my st build), <Tab> and
<C-I> can be differentiated.

Because of that the keys have to be mapped explicitly.
2023-05-12 12:06:46 +02:00
5f20d6d26f vim:keys: Respect 'foldopen' on remapped movements
Execute 'zv' depending on the existence of the equivalent movement type
in 'foldopen'.
2023-05-12 12:05:20 +02:00
f18cc6f05a vim:keys: Open folds on remapped movement commands
See 'foldopen':

> NOTE: When the command is part of a mapping this option is not used.
> Add the |zv| command to the mapping to get the same effect.
2023-05-12 12:04:43 +02:00