Commit Graph

815 Commits

Author SHA1 Message Date
658797bda2 zsh:keys: Use vi- variants of navigation binds
They seem to be more consistent in doing the same/reversed thing when
triggering them backwards.
2022-10-21 01:22:51 +02:00
8de8151cbe tmux: Activate extended_keys
With it libtermkey/libtickit[^1] mappings are supported.

[^1] - https://www.leonerd.org.uk/code/libtermkey/
[^2] - https://www.leonerd.org.uk/hacks/fixterms/
2022-10-21 01:21:48 +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
a94f72c4d9 vim:keys:<leader>*: Start vim's search too
Additionally to start the search with ripgrep, start a vim search as
well. That way navigation between search results in the opened file is
easier.

The register is modified directly and hlsearch is turned on manually
instead of using the builtin `*`, so that the cursor does not move to
the next result in the current file.
2022-10-21 00:45:47 +02:00
1aa6266200 vim:keys: Fix <leader>* for words starting w/ b
`<C-R><C-W>` inserts the cword, but skips over any character that were
already typed. This broke the search for words beginning with a `b`.
2022-10-21 00:39:21 +02:00
298b205aa9 vim:coc: Add vimlang and json language server 2022-10-20 21:55:53 +02:00
d99118646c git:alias: Add more short-hands 2022-10-20 16:40:16 +02:00
861b159c78 git:alias: Add multiple short-hand versions 2022-10-20 16:39:23 +02:00
e15fc71054 zsh,git: Add git-make-fork 2022-10-17 17:28:31 +02:00
bc0affc832 vim:autocmd: Do not mark stdin as modified
Set `nomodified` after reading from standard input. This way the buffer
can be closed without error message.

This will **not** disable modified warnings completely. If the input is
modified after read, vim will reset `modified` (As it should).
2022-10-16 02:01:25 +02:00
39e8b266d0 vim:keys: Add mapping to strip trailing whitespace 2022-10-16 01:57:16 +02:00
e2566444d4 polybar:audio: Display volume level when muted too 2022-10-16 01:57:16 +02:00
d327ddf79b polybar: Ignore/abort on missing commands/files
Catch if the files needed in the battery module are missing and exit
early.

Do not mess up the bar by printing error messages. Instead abort.
2022-10-16 01:09:59 +02:00
e564bf0fe6 i3: Add binding to switch between visible monitors
I have not tested this with more than 2 monitors. I am unsure if the
binding will cycle through them or just between two.
2022-10-15 19:02:29 +02:00
61e8ccc176 zsh:glog: Add bindings for faster navigation 2022-10-15 19:01:18 +02:00
af2c96cd5c zsh:glog: Cycle preview positions with ctrl-space 2022-10-15 18:57:11 +02:00
87e3232780 zsh:glog: Require 152 columns for preview on right
This seem to make more sense especially for smaller terminals where the
previous formula would have resulted in both sides being unreadable.
2022-10-15 18:56:26 +02:00
896970de81 vim:keys: Remove unused mappings to move lines 2022-10-13 18:48:35 +02:00
7be49e9318 vim:keys: Use RFC 3339 for vmap version of utc
Forgot to change the format for both mappings in 73aa0e9752
("vim:keys: Use RFC 3339 when converting unix times").
2022-10-13 18:29:30 +02:00
3b86618541 vim:keys: Map :{,B}Commits in other modes too
They support a range to show only commits that track the range.
2022-10-13 18:29:29 +02:00
a02fbd4403 vim:keys: Swap behaviour of ]] and ][
Swap the behaviour of `[[` `[]`. This way the first bracket indicates
the direction of the motion and the second the target (i.e. open or
closed brace).

I assume that the reason behind these mappings is to be able to easily
change the direction of the move by 'inverting' the keys (e.g. `]]` ->
`[[`). I understand that, but find the new way more intuitive.
2022-10-13 18:29:29 +02:00
1d2cdf7aea vim:keys: Use word boundaries with <leader>*
Ripgrep supports word boundaries, may as well use them to act closer to
`*` (:h star).
2022-10-12 12:37:17 +02:00
f7c43d5044 zsh:keys: Use ^s for vi-pound-insert
Change the binding from `^3` to `^s` and use vi-pound-insert as that one
does not accept the line.
2022-10-11 00:43:27 +02:00
faddf9dbb1 zsh:funcs: Add pyhelp to display python help pages 2022-10-10 20:30:40 +02:00
eb160de09b zsh: Remove nvim-man and use neovim as MANPAGER
`:Man` wraps to the window width if `$MANWIDTH` is not set, making
`nvim-man` as man wrapper obsolete.
2022-10-09 19:51:03 +02:00
50640bc294 vim:ftplugin: Remove zsh.vim
zshOption has improved a lot and isn't even called like that anymore.
2022-10-09 19:51:03 +02:00
dc25c88fe7 zsh:alias: Add --full --list-full to pgrep 2022-10-09 19:51:03 +02:00
c0a741889b zsh:funcs:psgrep: Pass regex directly
If a pattern is passed that starts with a special character, the
`[]`-"quoting" would possible lead to errors or change it's meaning.

To prevent that, pass the argument directly to grep if it looks like a
regex (i.e. contains a special character).
2022-10-09 19:51:03 +02:00
b398375020 zsh:funcs:psgrep: Print column info 2022-10-09 19:51:03 +02:00
6a1537eda8 zsh:funcs: Rename pgrep to psgrep
Instead of replacing pgrep, have this function under a slightly
different name.

Also add support for multiple arguments as the function does not aim to
be called under the same name now.
2022-10-09 19:51:03 +02:00
32109b5bab i3: Restart polybar after executing monitor-setup 2022-10-09 19:51:03 +02:00
e25a0d29a7 vim:keys: Add binding for Signed-off-by trailer 2022-10-06 18:50:50 +02:00
1d99d5dbf5 zsh:glog: Do not pass --graph by default
`--graph` can get very slow for large repos with many branches. Make
`glog` independent of it and rather add an alias that uses `glog
--graph`.
2022-10-05 17:13:52 +02:00
bf7d9dbeeb zsh:keys: Use consistent notation for ASCII escape 2022-09-28 01:19:32 +02:00
3f259d9cd8 vim: Do not include the line break in selections 2022-09-28 00:58:48 +02:00
69edbd6f10 zsh:ls-show-hidden: Add -- support
All arguments following `--` should be taken as either files or
directories not flags, even if they start with a dash.
2022-09-27 01:28:10 +02:00
e5010d76b5 zsh:ls-show-hidden: Correct print format
When an argument is passed that does not exist, `ls` always prints the
directory name for the existing ones, even if there is only one
remaining directory that is listed.
2022-09-27 01:16:19 +02:00
82fc29f9c0 zsh:ls-show-hidden: Fix non_existing arg parsing
`ls` prints a warning if a non-flag argument is specified that does not
exist.

Previously ls-show-hidden assumed that all arguments that are neither a
directory nor an otherwise existing file are flags. As all flags are
passed to the ls call the warning still got printed, but this also lead
to the current working directory (i.e. `.`) being added to the
directories to process.

If `ls` expects an argument to a flag, it is always passed in the format
`--flag=arg` where the equal sign is mandatory. This makes it possible
to simply filter out all flags (and their arguments) from the other
arguments without needing to know which flags take an argument and which
don't.

Fix this behaviour by printing the same warning as `ls` does when an
argument is neither a flag, nor a directory nor an existing file. Also
only add `.` to the directories if *really* only flags were passed.
2022-09-27 01:05:42 +02:00
14f615f5e1 zsh:keys:ratio_dots: Fix preview of first word
Previously the path preview misbehaved when typing dots on the first
shell word (e.g. executing a script in a parent directory). This
happened as the `(z)` parameter expansion flag does not expand to an
array rather a scalar. Because of that, `[-1]` returns the last
character.

Work around this issue by prepending LBUFFER with a dummy word, so that
it always contains at least 2 words.
2022-09-22 15:15:07 +02:00
9a5536c5c5 zsh:keys:rationalize_dots: Add comments 2022-09-22 15:14:38 +02:00
8792518bcb zsh:keys:rationalize_dots: Add .. scenario
Handle an LBUFFER value of `..` before pressing `.` by adding `/../`.
This scenario can only occur by deleting previously added segments or
using the new `default_dot` (See previous commit 72a8cfbcb ("zsh:keys:
Add normal `.` behaviour on `Ctrl-.`")).
2022-09-22 15:09:39 +02:00
72a8cfbcb0 zsh:keys: Add normal . behaviour on Ctrl-.
Having bound `.` to `rationalize_dots` makes typing paths with multiple
`../` segments super easy. This gets cumbersome in some situations
though.

Typing a path like `../.local` is only possible by either typing
`../.<BS><BS>local` (as it is expanded to `../../` on the third dot) or
`..//.local` which is not as annoying but somehow breaks completion on
further path segments.

Bind `Ctrl-.` (i.e. `^N`) to insert a normal dot.
2022-09-22 14:39:20 +02:00
d7c9bda8a7 zsh:options: Enable CSH_NULL_GLOB
Error only if all patterns of a command have no matches.
2022-09-22 03:02:24 +02:00
ccea907173 zprofile: Source private variant 2022-09-19 13:39:18 +02:00
764bc6d9b7 tmux: Send 5xup when scrolling in alternate mode 2022-09-19 13:07:35 +02:00
832d1cfd0d tmux: Write prompt history to XDG_DATA 2022-09-19 13:04:29 +02:00
181971c1db zsh: Add $fzf_default_no_rg
Move the fallback for $FZF_DEFAULT_COMMAND into the variable
fzf_default_no_rg that is always set.

This way FZF_ALT_C_COMMAND can reuse it instead of spawning a new shell
and messing with PATH.
2022-09-19 13:01:30 +02:00
ed1bfc6ebf zprofile:FZF_DEFAULT_COMMAND: Cut off ./ 2022-09-19 12:57:45 +02:00
bed1ba1840 zprofile: Add -mindepth 1 to FZF_DEFAULT_COMMAND
Do not print `.`.
2022-09-19 12:56:42 +02:00