Commit Graph

959 Commits

Author SHA1 Message Date
bcebc70082 vim:keys: Add mappings for git log 2022-08-30 19:52:23 +02:00
2027e12283 vim:autocmd: Match current word only if it exists
Check that the current word under the cursor exists (not empty) before
adding it as match.

Fix the disappearing of the welcome screen after a short time when
opening vim without file as argument.
2022-08-30 19:52:23 +02:00
947a939f67 vim: Move CycleSpellLang into keys.vim
See ba3a54fc4 ("vim: Move numbertoggle autocmd into settings.vim").
2022-08-30 19:52:23 +02:00
329a6e6eca meta:commit-msg: Allow subject to start with quote
See previous commit (d44931df8 "meta:envrc: `git fetch` in background").
2022-08-30 19:52:23 +02:00
95a1ecf984 meta:envrc: git fetch in background
Close/pipe std{in,out,err} as well as file descriptor 3 which is
apparently necessary for the subshell not to wait for the fetch to
finish.
2022-08-30 19:52:20 +02:00
6f0b433fdf vim:keys: Add <leader>dd to clear line
I sometimes have the situation that I want to create empty lines but
they contain either whitespace from keeping the indentation and/or the
comment string (`o` on a comment line). My current workflow is to either
delete it and recreate it properly (e.g. from the 'other side' i.e. a
non-comment line) or clear it with `cc`. Both ways are a bit awkward.

Add a mapping that clears a line but stays in normal mode.

Also remove the `<leader>d` mapping that deletes and puts the content
into the system clipboard as I rarely use this one.
2022-08-30 14:57:52 +02:00
c0892a8bdb vim:keys: Map <leader>bt to buffer ctags 2022-08-30 14:33:41 +02:00
7a081c0bd9 vim:keys: Map <leader>* to :Rg search of cword 2022-08-30 14:32:54 +02:00
4af065f1fd vim:plugs: Redefine :Rg to include hidden files 2022-08-30 14:31:37 +02:00
165b0ee7af zsh:alias: Add glog --branches --remotes 2022-08-28 01:12:51 +02:00
ba3a54fc44 vim: Move numbertoggle autocmd into settings.vim
Step by step I want to restructure the vim files. The approach to
cleanly divide the config by topics works in zsh pretty well, but is too
vague in vim for my liking.

Especially (the very small) functions and autocommands that have the
purpose of setting options or mapping keys or the interplay of multiple
categories together, make it difficult to decide in which file the
snippets should lay.
2022-08-28 01:06:55 +02:00
b56eaa0eb2 vim:keys: Map <leader>gb to git blame 2022-08-28 00:11:16 +02:00
ede49ac9f7 vim:keys: Map <leader>gf to git status files 2022-08-28 00:11:15 +02:00
5ab97d6111 vim:keys: Map <leader>gg only with fugitive 2022-08-28 00:10:55 +02:00
4d43566a68 vim:coc: Use pyright 2022-08-26 08:38:07 +02:00
fb90ae3142 vim:keys: Xmap <leader>ga to git add selection
As `GitGutterStageHunk` adds only the selected lines and not the full
hunk, remove the `h` for hunk from the mapping.
2022-08-26 08:37:11 +02:00
9ce1cd236b vim: Remove german umlaut mappings
As I started to type on the international US layout I don't need any
extra bindings for special characters in vim.

Move the update of `spellfile` into xdg.vim, as it was the only
remaining body of `NewSpellLang()` and fits thematically.
2022-08-25 04:27:51 +02:00
794293aa81 vim: Wrap autocmds in augroups
To prevent the piling up of autocommands when reloading the vimrc, wrap
all autocommands in groups.
2022-08-25 04:22:19 +02:00
64353b4ffa vim:funcs: Call timer_start instead of executing
Fix a small but stupid bug that the result of `timer_start` (i.e. the
timer ID) was evaluated as Ex command. This would lead to a jump to the
top of the file, every time the vimrc was reloaded (i.e. when a .vim is
saved).

Use `call` instead of `execute`, to fix this.
2022-08-25 04:20:13 +02:00
80b533d089 vim: Highlight non-ASCII characters 2022-08-25 03:35:27 +02:00
4415ff4653 vim: Fix broken highlight of trailing whitespaces
Apply the following:

1. Switch to `matchadd` as `match` can only be used for **one**
   highlight
2. Use an autocommand group for better behaviour when reloading the
   vimrc.
3. Use just one pattern as it seems to work always. (Apparently `\%#` is
   not matched in normal mode)
2022-08-25 03:33:11 +02:00
73aa0e9752 vim:keys: Use RFC 3339 when converting unix times
Use a format conforming to RFC 3339 instead of following the systems
locale.
2022-08-25 01:14:39 +02:00
a38ac0e738 zsh:funcs:mkcd: Prevent recursion with command
Call the external command `mkdir` to prevent recursion through the alias
added in 7834a6bee2 ("zsh:alias: Alias `mkdir` to `mkcd`").
2022-07-14 17:19:30 +02:00
bc7a539186 vim:keys: Add <leader>utc to convert unix time
Add `<leader>utc` to convert unix timestamps into a human readable
format.
2022-07-14 14:25:00 +02:00
0d1ce75c9b ignore: Add .local/share/direnv/allow 2022-07-14 14:25:00 +02:00
2643445ed0 .local:bin:timetracking: Update tail command 2022-07-14 14:24:59 +02:00
83d991cb53 vim:keys: Map <leader>gg to `:G 2022-07-14 14:24:59 +02:00
17fd0409a4 tmux: Make { and } repeatable 2022-07-14 14:24:59 +02:00
7834a6bee2 zsh:alias: Alias mkdir to mkcd 2022-07-14 14:24:58 +02:00
e931f20a7e zsh:funcs:mkcd: Support - and -- arguments 2022-07-13 17:49:45 +02:00
ee1ec50322 zsh:funcs:mkcd: Improve argument parsing
Do not switch into a directory, if multiple were created. Support flags
given at the end of the commandline (e.g. `mkdir foo/bar -p`)
2022-07-13 17:28:40 +02:00
d4ee271740 zsh:alias:qmv: Use destination-only edit format
Use the `destination-only` edit format when renaming files with `qmv`.

`dual-column` mode got on my nerves as I tend to forget with side is
source and which is destination. On top, the `swap` option breaks as
soon as I change the length of a filename.

`single-column` mode is useless for me, as I tend to make changes in
visual block mode.
2022-07-13 12:14:39 +02:00
9586533e61 meta:install.conf: Set defaults
When executing commands, enable std{out,err} and create parent
directories for links.
2022-07-12 21:26:48 +02:00
11c8345566 meta:install.conf: Ignore missing hidden files
The install script is broken since 4716b1cab3 ("meta:install: Link
hidden files in .config as well"), as dotbot will complain that there is
no hidden file to glob in `.config`.

Add `ignore-missing` so that the installation runs through while still
supporting hidden files in the future.
2022-07-12 21:22:46 +02:00
66a9ccfcc7 meta:install.conf: Link entire .git/hooks folder
Instead of linking the globs of meta/git/hooks, create a link for the
entire folder. This way new hooks work automagically.
2022-07-12 21:22:46 +02:00
b9ac80551c meta:hooks:pre-push: Format printout
Forgot some newlines.
2022-07-12 21:00:13 +02:00
e40ee88520 meta:hooks:pre-push: Refactor if-condition 2022-07-12 21:00:13 +02:00
45cb607385 meta:hooks:pre-push: Adjust to more concise style
Adjust the sample code from git to a more concise coding style, placing
{do,then} on the same line and using `[` instead of `test`.
2022-07-12 21:00:13 +02:00
ee6153734a meta:hooks:pre-push: Extend pattern for autosquash
Extend the grep pattern for commits starting with `{squash,fixup}!`.
2022-07-12 21:00:12 +02:00
f4fe825ce7 meta:git:hooks: Add pre-push template 2022-07-12 21:00:12 +02:00
43bf8801f9 git:interactive.diffFilter: Disable diff-so-fancy
Disable diff-so-fancy as `interactive.diffFilter` for now, as it is
incompatible with git version `v2.37`.[1]

[1] - https://github.com/so-fancy/diff-so-fancy/issues/437
2022-07-12 21:00:12 +02:00
43d87467d2 git:checkout-worktree: Pass all arguments
Pass all given arguments to `git worktree add`. This makes it possible
to directly create a new branch with `-b` for example. As the arguments
are not used anywhere else, this should not introduce any parsing
issues.
2022-07-12 21:00:12 +02:00
e949ffefef git: Set interactive.singleKey
In interactive commands, allow the user to provide one-letter input with
a single key (i.e., without hitting enter). Currently this is used by
the --patch mode of git-add(1), git-checkout(1), git-restore(1),
git-commit(1), git-reset(1), and git-stash(1). Note that this setting is
silently ignored if portable keystroke input is not available; requires
the Perl module Term::ReadKey.[1]

[1] - git-config(1)
2022-07-12 21:00:12 +02:00
0ccca77457 zsh:settings: Set HIST_REDUCE_BLANKS
Remove superfluous blanks from each command line being added to the
history list.
2022-07-12 21:00:11 +02:00
46565c2d6b vim:keys: Nvim does not replace has('clipboard')
Neovim does not make `has('clipboard')` obsolete. It only simplifies
clipboard support but `has('clipboard')` will still return `0` if no
supported clipboard program is installed.

See `:help clipboard`

    Nvim has no direct connection to the system clipboard. Instead it
    depends on a |provider| which transparently uses shell commands to
    communicate with the system clipboard or any other clipboard
    "backend".

and `:help clipboard-tool`

    The presence of a working clipboard tool implicitly enables the '+'
    and '*' registers. Nvim looks for these clipboard tools, in order of
    priority:

      - |g:clipboard|
      - pbcopy, pbpaste (macOS)
      - wl-copy, wl-paste (if $WAYLAND_DISPLAY is set)
      - xclip (if $DISPLAY is set)
      - xsel (if $DISPLAY is set)
      - lemonade (for SSH) https://github.com/pocke/lemonade
      - doitclient (for SSH)
        http://www.chiark.greenend.org.uk/~sgtatham/doit/
      - win32yank (Windows)
      - termux (via termux-clipboard-set, termux-clipboard-set)
      - tmux (if $TMUX is set)
2022-07-12 21:00:11 +02:00
2ac0e01766 python: Handle non-existing history file
Create a dummy entry in the history file if it does not exist yet or is
empty. Otherwise `~/.python_history` would be used by site.py.
2022-07-12 21:00:11 +02:00
ffaef0fd54 *: More XDG environment variables and configs
More configurations of programs that do not follow the XDG Base
directory Standard correctly.
2022-07-12 21:00:11 +02:00
8c6a2f1ba5 git:plugins: Update diff-so-fancy, git-filter-repo 2022-07-12 21:00:11 +02:00
7b40b3ea98 zsh:alias: Exclude .git & tags when grepping
Those are more or less never a place that I want to include when
grepping recursively or through a glob.
2022-07-12 21:00:10 +02:00
a8f6973968 tmux: Use pane-border as indicator for {copy,sync}
In tmux version 3.2 all style options were changed to string
options, making them support formats.[^1]

From that version on, use the pane-borders as indicator for the
{copy,sync}-mode instead of the prefix_highlight plugin.

Keep the pure style fallback, as Ubuntu 20.4 for example still only
ships with version 3.0a.

[^1]: https://github.com/tmux/tmux/commit/f03b61131b34079
2022-07-12 21:00:10 +02:00