Commit Graph

16 Commits

Author SHA1 Message Date
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
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
6458a45461 zsh:keys: Bind ^W to backward-kill-word
For deleting a word while in the shell, I find it easier/faster to use
emacs bindings or Ctrl-Backspace and backward-kill-word instead of the
vi version.

In tmux, Ctrl-H (same esacape sequnce as Ctrl-Backspace) is used for
switching panes since f11b7fa56545 ("vim,tmux:plugs: Add
`vim-tmux-navigator`"), so I need to use Ctrl-W.

As that is bound to vi-backword-kill-word, rebind it to use the emacs
version.
2022-06-23 23:58:58 +02:00
6b2a03222b zsh:keys: Bind ^3 to pound-insert 2022-02-20 23:48:59 +01:00
fe8a656dfe zsh:keys:cmd-on-enter: Refactor for real cmd cycle
Refactor the function to keep an array of commands with requirements
that have to be met. Those commands are then cycled over a wrap around
index instead of the inflexible switch statement.
2021-12-29 18:58:45 +01:00
b6d2299444 zsh:keys:cmd-on-enter: Remove zle message print
It did nothing.
2021-12-29 17:33:33 +01:00
9f99ceafd4 zsh:keys:cmd-on-enter: Use ll instead of ls 2021-12-29 17:28:41 +01:00
2d65f187f4 zsh: Fix forgotten ZSH_CONF use
`$ZSH_CONF` was removed in af49c39ba3.
2021-07-15 02:44:04 +02:00
8890a4b604 zsh:keys: Remove fzf-hist functionality
Go back to a simpler approach, that the `fzf-history-widget` is only
called on <C-Up> and ^K in normal mode and <Up> & <Down> scroll through
the history normally.

The reason behind this change is that there were still some edge cases
in which the widget was wrongfully called when normal scrolling was
intended.
This change also makes it now possible that I can use commands in the
'surrounding' of a past command by first navigating to it with the
fzf-widget and then just using <Up> & <Down>.
2021-07-14 14:35:20 +02:00
48dc9ca561 zsh:keys:cmd-on-enter: Add reset on other command
If a command is normally executed CMD_ON_ENTER is reseted to `ls`.
Otherwise problems can occur when for example switching the directory to
a non-repo when CMD_ON_ENTER contains `gs`.
2021-03-09 15:47:09 +01:00
93225e2d66 zsh:keys:cmd-on-enter: Cycle between ls & gs too 2021-03-08 01:10:09 +01:00
2c30d57573 zsh:keys: Fix fzf abort check
The file should be opened if fzf returned something not the other way
around. This probably happened in the last refactoring session before
committing.
2021-01-05 22:07:07 +01:00
ec2b7d58ed zsh:keys: Simulate <leader>f from vim config 2021-01-03 22:33:23 +01:00
5c91bc23a2 zsh:keys: Increase KEYTIMEOUT a bit 2021-01-02 00:40:01 +01:00
druckdev
bf46c5f687 zsh: Divide zshrc into zshrc.d
Move every file from plugins into zshrc.d as well as all bigger blobs in
the zshrc into their own files there.
Some stuff is still in there that I am not all too sure where it
belongs. TODO: Move.

Because all external plugins are now sourced over a symlink I had to
create a fork of fzf-tab for now that supports that.
See: https://github.com/Aloxaf/fzf-tab/pull/153
2020-11-10 02:58:22 +01:00