Commit Graph

1039 Commits

Author SHA1 Message Date
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
1dab31ecda zsh:keys: Reuse the default fallback for FZF_ALT_C
Instead of implementing it twice, simulate a shell without ripgrep to
get the fallback of FZF_DEFAULT_COMMAND and modify it for use with
directories.
2022-09-19 12:52:00 +02:00
85b95dce37 zsh:keys: Set FZF_{CTRL_T,ALT_C}_COMMAND
Do not ignore hidden files.
2022-09-19 12:45:26 +02:00
bc16774f1d zprofile:FZF_DEFAULT_COMMAND: Follow symlinks 2022-09-19 12:36:42 +02:00
0ffd542d0b zprofile: Cleanup comments to FZF_DEFAULT_COMMAND 2022-09-19 12:23:16 +02:00
5cf9aa2905 zprofile: Prune __pycache__ in FZF_DEFAULT_COMMAND 2022-09-19 12:16:31 +02:00
3963df217f git:ignore: Append trailing slash to directories
Append a trailing slash to all entries that should only match
directories.
2022-09-19 12:11:46 +02:00
83ae0c1642 zprofile: Refactor FZF_DEFAULT_COMMAND fallback
Group all names that are pruned in parentheses, but remove the unneeded
parentheses around `-type f -print` by removing the `-a`.
2022-09-19 12:05:52 +02:00
ec292c0dd1 zsh:alias:vimdiff: Do not set listchars
As this is done by my vimrc already.
2022-09-19 11:55:01 +02:00
d9673498cb zsh:alias: Add -p to mkdir 2022-09-18 19:43:41 +02:00
dc72de809b zsh:alias: Remove mkdir=mkcd
I changed my mind. This gets really annoying.
2022-09-18 19:41:46 +02:00
553a2679cf zsh:alias: Turn tmsu into a smarter function
Instead of simply pointing the database to XDG_DATA_HOME, write a
wrapper function that searches for `.tmsu/db` in all parent directories
and fallbacks to XDG_DATA_HOME if not found.

Also create XDG_DATA_HOME/tmsu if necessary.
2022-09-18 19:37:30 +02:00
2177031c68 zsh:history: Increase file size limit 2022-09-10 00:35:03 +02:00
7353a51132 rofi: Unbind Shift+Tab as it is bound by default
With a new version, Tab and Shift+Tab (ISO_Left_Tab) are bound to
kb-element-{next,prev}.
2022-09-09 02:24:55 +02:00
22ad215f62 zsh:alias: Add sizes for du -sch * | sort -h 2022-09-09 01:35:58 +02:00
a1e431d3e1 tmux: Use shell script to complete selfinsert
Use a short shell script to complete the `selfinsert` keytable by
binding all keys that have a mapping in the root table.
2022-09-08 18:36:37 +02:00
515dbf1117 vim:nvim-man: Source vimrc and fix weird input
Remove `NORC` as settings like `smartcase` or my color scheme are things
I do not want to miss and the startup time delta feels negligible.

Fix a weird issue with presumably the line breaks and tabs in the
command string that would make vim send key inputs when starting through
`nvim-man`. This would lead to tmux switching panes and tmux-resurrect
failing to recover panes with vim opened like this.
2022-09-08 17:41:41 +02:00
048933e67d tmux: Make <prefix>[hjkl] bindings repeatable
I sometimes need the `<prefix>[hjkl]` bindings over `C-[hjkl]` (e.g. vim
insert mode). Then it is nice to have them repeatable when navigating to
a pane further away.
2022-09-08 16:41:06 +02:00
eca58c09f8 tmux: Scroll only 5 lines when entering copy-mode
Only scroll 5 lines instead of a full page when entering copy-mode
through the wheel as a full page was too disorienting.

TODO: Pass `WheelUpPane` after entering copy-mode instead of redundantly
executing it's bound command.

Somehow neither of the following worked:

  send -XM WheelUpPane
  send -X WheelUpPane
2022-09-08 16:37:57 +02:00
b807497984 tmux: Mimic copy-mode -e when using the wheel
`copy-mode -e` annoyed me, as it happened sometimes that I would hold
down `C-d` to scroll down, only to close the shell and pane when
reaching the bottom.

But in principal I do like the idea of it and missed the feature when
reaching the bottom by using the scroll wheel.

Change the `WheelDownPane` in copy-mode to exit when the bottom is
reached.
2022-09-08 16:31:42 +02:00
7d58be4365 tmux: Scroll without selecting the pane 2022-09-08 15:41:53 +02:00
919e5c0a0b git:ignore: Add __pycache__ 2022-09-06 11:10:07 +02:00
bef12252ba zsh:funcs: Add finddup to find duplicate files 2022-08-31 15:02:57 +02:00
2f6d8af3f9 vim:settings: Turn on lazyredraw 2022-08-31 02:39:42 +02:00
5606967050 vim:keys: Fix <leader>dd (clear line)
`0` is necessary to move to real beginning of the line.
2022-08-30 20:39:21 +02:00
0ad0ccb0c8 git: Make commit-last-msg available as alias
Move `git-commit-last-msg` into an autoloadable function. This way it
can also be executed as external script and thus in a git alias. This
makes it additionally possible to call it in vim over fugitive's `:Git`.
2022-08-30 19:52:24 +02:00
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