Commit Graph

1368 Commits

Author SHA1 Message Date
b24541fb42 i3: Activate workspace_auto_back_and_forth
Switch back to the previous workspace by pressing the binding that would
focus the current workspace.
2023-04-20 00:15:33 +02:00
69d0290afd i3: Remove bindings for stacked and tabbed layout
I never use these and always forget how to get back if I accidentally
press their bindings.
2023-04-20 00:14:25 +02:00
c349b7f058 polybar: Make i3's mode-label clickable to reset
Reset to the "default" i3 mode when clicking on the mode-label. This
makes it easy to recover from a mode without binding to `mode default`.
2023-04-19 23:44:01 +02:00
5deb69bbd6 git:checkout-worktree: Improve name on recursion
When calling git-checkout-worktree from inside a temporary working tree
(doesn't necessary need to be a recursive call, could be another shell
too) the name would be very long.

Fix this by using the folder name of the main working tree.
2023-04-11 23:24:52 +02:00
072204c10c vim:keys: Discard stderr in FZF_CTRL_T_COMMAND
The prompt gets messed up on error messages from `find` (e.g. permission
errors). Discard them.
2023-04-11 22:49:15 +02:00
a68599d9ae zsh:zprofile: Add $MBSYNCRC
Additionally to the mbsync alias that was already created, add
`$MBSYNCRC` so that mutt-wizards tools use the correct config as well.
2023-03-31 02:30:01 +02:00
7462b5a7af vim:keys: Remove <C-U> uses behind <Cmd>
<C-U> is not needed when using <Cmd> for visual mappings.

Fix: fc9874bf97 ("vim:keys: Use <Cmd> for plain command mappings")
2023-03-22 13:19:41 +01:00
de001db473 tmux: Underline windows in status line when zoomed
I sometimes forget that windows are in zoomed state as I was missing a
visual indicator. Underline the window names in the status line to fix
that.

TODO: Move added code bit into a variable to prevent redundancy. I was
      not able to get it to be expanded, in contrast it would just
      insert the text literally.
2023-03-22 12:31:08 +01:00
4640dec63d zsh:suffix(): Use zshisms to find --'s index 2023-02-27 14:13:54 +01:00
112b195d7b zsh:keys:TODO: Rather insert line on ^R 2023-02-27 14:11:43 +01:00
e8a9f5d828 zsh:alias:TODO: Improve vim/fg wrapper 2023-02-27 14:10:17 +01:00
3066eed1c7 vim:keys:TODO: Fix search results center mappings 2023-02-27 14:09:32 +01:00
4808ba95a5 tmux:TODO: Display when pane is in fullscreen mode
Sometimes I forget that I maximized a pane as there is no visual
indicator.
2023-02-27 14:08:40 +01:00
7dcd00058f tmux:TODO: Do not modify selection when scrolling 2023-02-27 14:07:04 +01:00
44e83ee8d6 git:glog:TODO: Better file arguments handling 2023-02-27 14:01:49 +01:00
3fac79115f vim:keys: Fix &spell toggle mapping
I don't if something changed or if this was broken from the get to, but
now it is fixed.
2023-02-27 11:02:47 +01:00
fc9874bf97 vim:keys: Use <Cmd> for plain command mappings
<Cmd> executes the command directly in the current mode without changing
to command-line mode and triggering Cmdline{Enter,Leave}.
2023-02-27 10:59:41 +01:00
51249568ce git:interactive.diffFilter: Activate diff-so-fancy
This reverts commit 43bf8801f9.

diff-so-fancy was disabled as the interactive diff-filter in
43bf8801f9 ("git:interactive.diffFilter: Disable diff-so-fancy")
because of the rewrite in C of `git add -p`.

This was fixed in v2.38.0[^1].

[^1]: https://github.com/git/git/blob/v2.38.0/Documentation/RelNotes/2.38.0.txt#L353-L356
2023-02-24 10:45:14 +01:00
05f2857d3c git: Add installation note for Term::ReadKey 2023-02-24 10:22:45 +01:00
67b474e7f6 tmux: Revert "Remove unused status-style"
This reverts commit b4cbd08d3b.

I am not sure why I thought this was irrelevant. But when testing I did
not properly unset it or restart the server, so nothing changed when I
reloaded tmux.conf.

Conflicts:
	.config/tmux/tmux.conf
2023-02-24 10:14:05 +01:00
a4c6e4ebfd vim:keys: Center hunk after moving with gitgutter 2023-02-23 14:47:59 +01:00
8e183a37bf zsh:keys: Bind ^U to cd ..
I do not use readline/emacs(?) mapping to clear the line with ^U anyways
as I have my beloved vim bindings.
2023-02-23 14:44:59 +01:00
a85d6c53c4 zsh:keys:go-shcwd: Only exclude exact $PWD
Fix the grep call to only exclude lines that are exactly the PWD instead
of containing it.
2023-02-23 14:44:59 +01:00
cf48efb4cb zsh:keys:go-shcwd: Do not suggest $PWD 2023-02-23 14:44:59 +01:00
979d49612d bin:shcwd: Sort reversely
Sort the other way so that `/` is on the last line instead of the first.
2023-02-23 14:44:59 +01:00
86c3c1992a zsh:keys: Bind ^G to fuzzy shcwd 2023-02-23 14:44:59 +01:00
51a2ab77d7 zsh:keys: Extract redraw-prompt from cd-rotate
This makes it possible to use it in other bindings.
2023-02-23 14:32:54 +01:00
44194bd09c vim:keys: Expand visual selection on <leader>[jk]
Add two vmaps that call ExpandVisualSelection() for the appropriate
direction.

That expands the selection over all directly following lines in the
given direction that contain the current selection at the same position.

Example:

```
 - TODO: ...
 - TODO: ...
 - TODO: ...
```

In visual block one can select `TODO: ` on the first line and then call
`ExpandVisualSelection(1)` which results in a block selection that spans
over all other TODOs as well.
2023-02-15 16:44:17 +01:00
b7dcc1f79c vim:keys: Map real <C-BS> to delete one word
Map <C-BS> (i.e. Ctrl-Backspace) to delete one word in insert mode & co.
as it is properly recognized in some terminals implementing [fixterm][1]
(e.g. kitty and patched st).

Keep the <C-H> mapping for other terminals but reuse the <C-BS> mapping.

[1]: http://www.leonerd.org.uk/hacks/fixterms/
2023-02-15 14:30:52 +01:00
a05d99df95 vim:keys: Add <leader>v/ as vmap too
Just escape visual mode and reuse the existing normal-mode mapping.
2023-02-15 14:28:35 +01:00
1d58eb729d vim:keys: Add <leader>* vmap to ripgrep selection
Similar to <leader>* in normal mode, set the search pattern to the
visual selection and start a ripgrep search.

To not mess up the commandline, potential quotes that are the same as
the ones used around the string need to be escaped. As this is only
possible with double quotes, a second layer of backslash escaping is
needed as well.

Because of that, **before** escaping backslashes and double quotes, all
backslashes need to be escaped a second time. The other way around would
result in two backslashes in front of each double quote, which would
miss the whole point entirely.

In addition GetVisualSelection needed to be expanded to first reselect
the visual selection for it to work in the new mapping.
2023-02-15 14:26:05 +01:00
1933218756 vim:keys: Center search results after N too
Forgot that one.
2023-02-15 11:37:07 +01:00
8e71a3f12e vim:keys:vmap *: Center search results
Center search results by further evaluating mappings in {rhs}.
2023-02-15 11:37:00 +01:00
9f3b9ac79a vim:keys: Save unnamed reg when getting selection
Fix that the mappings modified the unnamed register.
2023-02-15 11:35:50 +01:00
647a022782 vim:keys: Group together * mappings in the code 2023-02-15 10:52:06 +01:00
10824feb74 git:checkout-worktree: Make errc variable local 2023-02-13 17:18:25 +01:00
28f60004de git:checkout-worktree: Fix unset ret variable 2023-02-13 17:17:49 +01:00
0625fdbd94 git:last-changed: Fix handling of weird filenames
Make sure that `git-log` does not misunderstand the file name.
2023-02-13 17:13:41 +01:00
0a749cd6f5 git:last-changed: Equalize ANSI sanitization regex
Don't know why I used two different patterns.
2023-02-13 17:08:16 +01:00
e2a133a29b vim:ftplugin:markdown: Fold by sections 2023-02-13 16:50:50 +01:00
295f33e62c vim:ftplugin: Set options locally
I only want to set the wrap settings for the current buffer/window.
2023-02-13 16:43:30 +01:00
b489fdbe4b polybar:vpn: Parse mullvad status 2023-02-13 16:39:04 +01:00
25243e5ee6 git:last-changed: Fix execution in subdir
git aliases are executed in the repository root.

Fix the output of git-last-changed by first cd-ing into the current
working directory.
2023-02-13 16:37:05 +01:00
f8519555f7 vim:setts: Deactivate 'relativenumber'
I rarely use them and are more an annoyance.

For the case that I want to enable them in a session, move the
numbertoggle augroup into a function and add an autocommand on
`OptionSet relativenumber`.
2023-02-13 15:32:53 +01:00
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
226f09b046 zsh:mvln(): Create relative symlinks
When using ln's `-a` flag, absolute paths are not necessary.
2023-02-09 17:08:49 +01:00
7739d0a9c3 zsh:mvln(): Refactor to fewer lines and zshisms 2023-02-09 17:08:48 +01:00
69f8bd8631 zsh:mvln(): Make variables local 2023-02-09 17:08:42 +01:00