From acb21f084f12f4ee3d064014e9725455346ebf8e Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Wed, 21 Feb 2024 11:38:58 -0600 Subject: [PATCH] added zoxide, allowed proper backspacing in zsh --- README.md | 3 ++- yazi/.config/yazi/keymap.toml | 1 + zsh/.zshrc | 10 ++++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 107bed8..bb1d491 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ you dont need a patched Nerd Font, normal `ttf-fira-code` combined with `ttf-ner ### Yazi Will need https://github.com/jstkdng/ueberzugpp installed if using on alacritty, availible in AUR (only needed for image previews). -also has optional dependencies on jq, unarchiver, ffmpegthumbnailer, fd, ripgrep, fzf, and poppler +also has optional dependencies on jq, unarchiver, ffmpegthumbnailer, fd, ripgrep, fzf, zoxide, and poppler ### Latexmk Uses zathura as a pdf previewer. @@ -88,6 +88,7 @@ For telescope: * nvim ($EDITOR and $VISUAL is set to this) * less * fzf +* optional: zoxide Software used by aliases: * nvim diff --git a/yazi/.config/yazi/keymap.toml b/yazi/.config/yazi/keymap.toml index 57d6267..759f736 100644 --- a/yazi/.config/yazi/keymap.toml +++ b/yazi/.config/yazi/keymap.toml @@ -174,6 +174,7 @@ keymap = [ { on = [ "" ], exec = "close", desc = "Cancel input" }, { on = [ "" ], exec = "close --submit", desc = "Submit the input" }, { on = [ "" ], exec = "escape", desc = "Go back the normal mode, or cancel input" }, + { on = [ "" ], exec = "backspace" }, # Mode { on = [ "i" ], exec = "insert", desc = "Enter insert mode" }, diff --git a/zsh/.zshrc b/zsh/.zshrc index 4da75a9..340149e 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -81,6 +81,9 @@ setopt ZLE #Enable vi mode for the ZLE. it should be set by default due to our EDITOR and VISUAL, but this is just to be safe. bindkey -v + #allow backspacing beyond the point you entered insert mode: + bindkey -v '^?' backward-delete-char + bindkey "^W" backward-kill-word # Sends cd commands without the need for 'cd' setopt AUTO_CD # Kill all child processes when we exit, dont leave them running @@ -185,12 +188,15 @@ #starship eval "$(starship init zsh)" +#zoxide stuff + command -v zoxide && eval "$(zoxide init zsh)" + #check for existence of pyenv before setting it up. - if (($+commands[pyenv])); then + if command -v pyenv &> /dev/null; then export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" fi #fancy way of testing if a command exists -ruby --version &>/dev/null && export PATH="$PATH:$(ruby -e 'puts Gem.user_dir' 2> /dev/null)/bin/" +command -v ruby &>/dev/null && export PATH="$PATH:$(ruby -e 'puts Gem.user_dir' 2> /dev/null)/bin/"