Commit Graph

1104 Commits

Author SHA1 Message Date
a88ce81b92 zsh:compl: Remove unused git-signoff completion
The shell function git-signoff was replaced with gits builtin
functionality in 09ef4d4d93 ("git: Replace git-signoff with `rebase
--signoff`").

Also adjust the example in the new commment.
2023-01-17 16:48:32 +01:00
5a0c6cdefb git: Fix completion for aliases to shell functions
When only linking the completion function, the completion works for the
shell functions, but not when using a git alias to those functions.

Fix that by defining own completion functions for each that call the
existing/copied ones.
2023-01-17 16:42:34 +01:00
805180be5d git:alias: Reorder auto{squash,fixup}
As the flag is called `--autosquash`, the order makes more sense like
this.
2023-01-17 16:34:05 +01:00
0ae5f17dd0 git:last-changed: Fix truncation of colored lines
`cut` counts bytes instead of printable character, making it truncate
colored lines too early.

Fix this by using awk and adding the length difference between a colored
and uncolored version to the allowed length.

COLUMNS is a shell variable and thus needs exporting for `ENVIRON` to
see it in awk.
2023-01-17 16:33:53 +01:00
4c489c0d68 git:last-changed: Handle non-git-repo gracefully 2023-01-17 01:44:01 +01:00
99c99954e9 git:last-changed: Pass -p and smart --color flag
--color=auto breaks as `ls` is always piped. Test stdout of the whole
script to determine a sensible value for the flag.
2023-01-17 01:41:38 +01:00
9f0ffcb6ca git:last-changed: Support ANSI escape sequences
When passing --color to `ls` and the entry were colored, git would not
return a commit due to the escape sequences.
2023-01-17 01:39:43 +01:00
f317ed81c2 git: Add last-changed to mimic github file browser
List all files and directories but include the latest commits date and
subject, similar to the file browser in web-UIs of services like GitHub.
Also sort the entries by the commits date and time to see the most
recent changed files/folders at the bottom.
2023-01-17 01:38:17 +01:00
a7b975ae71 zsh:keys:cmd-on-enter: Check PREBUFFER as well
When typing a multi-line input (e.g. `echo foo\<CR>`) BUFFER can be
empty, even though the entire input is not.

Fix this by checking if PREBUFFER and BUFFER are empty.
2023-01-17 00:33:19 +01:00
993bd5a16e vim:ftdetect:envrc: Require .envrc only as suffix
Otherwise opening a template (i.e.
`.local/share/direnv/templates/*.envrc`) will not set the filetype
properly.
2023-01-11 22:04:32 +01:00
9de97a7f93 vim:ftdetect: Set ft=sh when opening .envrc files 2023-01-11 22:03:19 +01:00
6bfc7bbcbc zsh:funcs: Write a wrapper for pdfunite
Write a wrapper for pdfunite that tries to prevent an overwrite of an
existing file when forgetting to specify the destination-file.
2023-01-11 22:03:19 +01:00
890464b8dd vim:ftplug:tex: Close quickfix window on movement
When continuous compiling on write, the quickfix window can be tedious
when it pops up every time containing errors that will be resolved in
the future or ignored.

Fix this by closing it as soon as the cursor is moved.
2023-01-11 21:42:43 +01:00
fdafdb6154 vim:ftplug:tex: Use tex_build as build directory 2023-01-11 21:42:42 +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
c6e988e663 tmux: Use user options to define colors only once 2023-01-10 12:32:08 +01:00
b4cbd08d3b tmux: Remove unused status-style 2023-01-10 12:32:08 +01:00
9daeba47ea tmux: Number windows with 1-based indices
It is counter intuitive to have to reach to the right for the first
window.
2023-01-10 12:32:03 +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
f6db506f26 tmux: Run resurrect-save on detach in background
Shorten the time it takes to detach.
2023-01-04 11:32:30 +01:00
5f561ca79b git:ignore: Add /venv/ 2023-01-03 14:14:46 +01:00
06c0d17fe4 vim:keys: Add <leader>v/ to search in visual selec 2022-12-29 19:55:02 +01:00
5c1b67ddfc zsh:keys:cmd-on-enter: Don't place cmds in history 2022-12-29 18:09:20 +01:00
8da38e9224 zsh:options: Make globbing sensitive to case
I am not sure why I had this activated.

Case insensitive globbing can still be achieved by using the Globbing
Flag `i`.
2022-12-28 17:05:15 +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
6672387bee zsh:funcs:finddup: Use byte size for first filter
Use the byte size as first filter instead of the size in 1KB blocks.

This way the filter is way more accurate and filters out more files
for which the md5sum does not need to be calculated.
2022-12-28 02:02:04 +01:00
6bb26ac2fd zsh:funcs:finddup: Add TODO to use CRC instead md5 2022-12-28 01:56:55 +01:00
b38e01c72a zsh:funcs:finddup: Support filenames with spaces
Previously when filenames contained spaces, the function would break as
`awk {print $2,$1}` would only print a part of the filename.

The field swap was used as a workaround so that `uniq` only compares the
sizes, and `uniq` unfortunately only has a flag to **skip** fields.

Fix this issue by using a short awk script that mimics `uniq` but only
with the first field (i.e. the size).

My awk foo is unfortunately not very good, and that is why the one-liner
prints out the first duplicated line multiple time. The `sort -u` pipe
afterwards gets rid of those.
2022-12-28 01:52:56 +01:00
df39b04cb2 zsh:ls-show-hidden: Take quotes in double brackets 2022-12-27 16:53:25 +01:00
3ddfadf360 zsh:ls-show-hidden: Fix listing of broken symlinks
The `-e` and `-d` checks fail if the file is a broken symlink, which
would lead to a 'No such file...' message for each of them.
2022-12-27 16:47:17 +01:00
c4125ddc25 zsh:ls-show-hidden: Fix ./ listing on non-existing
Fix a bug that ls-show-hidden always listed `./` when all other non-flag
arguments were non-existing (in addition to their 'No such file...'
message).
2022-12-27 16:45:06 +01:00
9b0e49b319 zsh:ls-show-hidden: Use short param expansion form
Use the short parameter expansion form where it leads to a better
readability in my eyes (e.g. "${dir:A}" -> "$dir:A" does not, I think.)
2022-12-27 16:39:40 +01:00
b93c4ee377 zsh:glog: Only pipe to fzf if stdout is a tty
This makes it easy to use `glog` in a pipe as replacement for `git log
--oneline`, for example to count the commits.
2022-12-27 04:27:21 +01:00
46ec34826e vim:keys: Map display movements only when wrapping 2022-12-27 04:24:21 +01:00
92589d5423 polybar:vpn: Support wireguard connections 2022-12-26 23:54:27 +01:00
aa28483381 zsh:p10k: Support mullvads VPN network interface 2022-12-26 23:53:10 +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