diff options
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/.zshrc | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -71,6 +71,18 @@ bindkey '^y' fzf-tmux-project zle -N fzf-kill-tmux-project bindkey '^x' fzf-kill-tmux-project +# Use lf to switch directories and bind it to ctrl-o +function lfcd () { + tmp="$(mktemp)" + lf -last-dir-path="$tmp" "$@" + if [ -f "$tmp" ]; then + dir="$(cat "$tmp")" + rm -f "$tmp" >/dev/null + [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" + fi +} +bindkey -s '^o' 'lfcd\n' + # Syntax highlighting, must be last source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2> /dev/null |