chore: Update config after a long time
This commit is contained in:
parent
a9336facf0
commit
4e0b35e4c7
37 changed files with 1145 additions and 98 deletions
28
.config/fish/conf.d/fzf.fish
Normal file
28
.config/fish/conf.d/fzf.fish
Normal file
|
@ -0,0 +1,28 @@
|
|||
# fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup
|
||||
if not status is-interactive && test "$CI" != true
|
||||
exit
|
||||
end
|
||||
|
||||
# Because of scoping rules, to capture the shell variables exactly as they are, we must read
|
||||
# them before even executing _fzf_search_variables. We use psub to store the
|
||||
# variables' info in temporary files and pass in the filenames as arguments.
|
||||
# This variable is global so that it can be referenced by fzf_configure_bindings and in tests
|
||||
set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)'
|
||||
|
||||
|
||||
# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings
|
||||
fzf_configure_bindings
|
||||
|
||||
# Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased
|
||||
function _fzf_uninstall --on-event fzf_uninstall
|
||||
_fzf_uninstall_bindings
|
||||
|
||||
set --erase _fzf_search_vars_command
|
||||
functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings
|
||||
complete --erase fzf_configure_bindings
|
||||
|
||||
set_color cyan
|
||||
echo "fzf.fish uninstalled."
|
||||
echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings."
|
||||
set_color normal
|
||||
end
|
20
.config/fish/conf.d/plugin-bang-bang.fish
Normal file
20
.config/fish/conf.d/plugin-bang-bang.fish
Normal file
|
@ -0,0 +1,20 @@
|
|||
function _plugin-bang-bang_key_bindings --on-variable fish_key_bindings
|
||||
bind --erase --all !
|
||||
bind --erase --all '$'
|
||||
switch "$fish_key_bindings"
|
||||
case 'fish_default_key_bindings'
|
||||
bind --mode default ! __history_previous_command
|
||||
bind --mode default '$' __history_previous_command_arguments
|
||||
case 'fish_vi_key_bindings' 'fish_hybrid_key_bindings'
|
||||
bind --mode insert ! __history_previous_command
|
||||
bind --mode insert '$' __history_previous_command_arguments
|
||||
end
|
||||
end
|
||||
|
||||
function _plugin-bang-bang_uninstall --on-event plugin-bang-bang_uninstall
|
||||
bind --erase --all !
|
||||
bind --erase --all '$'
|
||||
functions --erase _plugin-bang-bang_uninstall
|
||||
end
|
||||
|
||||
_plugin-bang-bang_key_bindings
|
Loading…
Add table
Add a link
Reference in a new issue