Skip to content

Instantly share code, notes, and snippets.

@Hylian
Created June 17, 2025 16:06
Show Gist options
  • Select an option

  • Save Hylian/c14340d1e782cba4e6c886f5deb41ad3 to your computer and use it in GitHub Desktop.

Select an option

Save Hylian/c14340d1e782cba4e6c886f5deb41ad3 to your computer and use it in GitHub Desktop.
# zoxide + fzf
zoxide-fzf() {
zle push-input
_ZO_FZF_OPTS="--exact --no-sort --bind=ctrl-z:ignore,btab:up,tab:down --cycle --keep-right --height=45% --info=inline --layout=reverse --tabstop=1 --exit-0 --preview-window=down --preview 'eza -G --color=always --group-directories-first -s modified {2..}'" __zoxide_zi
zle reset-prompt
}
zle -N zoxide-fzf
bindkey -M emacs '^j' zoxide-fzf
bindkey -M vicmd '^j' zoxide-fzf
bindkey -M viins '^j' zoxide-fzf
zoxide-fzf-curdir() {
zle push-input
_ZO_FZF_OPTS="--exact --no-sort --bind=ctrl-z:ignore,btab:up,tab:down --cycle --keep-right --height=45% --info=inline --layout=reverse --tabstop=1 --exit-0 --preview-window=down --preview 'eza -G --color=always --group-directories-first -s modified {2..}'" __zoxide_zi "${PWD}" "/"
zle reset-prompt
}
zle -N zoxide-fzf-curdir
bindkey -M emacs '^k' zoxide-fzf-curdir
bindkey -M vicmd '^k' zoxide-fzf-curdir
bindkey -M viins '^k' zoxide-fzf-curdir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment