Skip to content

Commit

Permalink
✨ refactor fzf ctrl-f keybind to look into both files and directories
Browse files Browse the repository at this point in the history
  • Loading branch information
rayanramoul committed Dec 26, 2023
1 parent f88168d commit bd738d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dotfiles/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ alias tmux-sessionizer="bash ~/scripts/tmux-sessionizer.sh"

#if [ "$TMUX" = "" ]; then exec tmux; fi
#bindkey -s '^f' '$(fzf)\n'
bindkey -s '^f' 'selected_dir=$(find . -maxdepth 8 -type d | fzf); [ -n "$selected_dir" ] && cd "$selected_dir"\n'
#bindkey -s '^f' 'selected_dir=$(find . -maxdepth 8 -type d | fzf); [ -n "$selected_dir" ] && cd "$selected_dir"\n'
bindkey -s '^f' 'selected_entry=$(find $HOME -maxdepth 8 -type f -o -type d | fzf); [ -n "$selected_entry" ] && { [ -d "$selected_entry" ] && cd "$selected_entry" || vim "$selected_entry"; }\n'




Expand Down

0 comments on commit bd738d6

Please sign in to comment.