This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fzf-insert-path() { | |
| local selected | |
| selected=$(fdfind -H --type f --type d \ | |
| --exclude /etc --exclude /proc --exclude /sys --exclude /run \ | |
| . / 2>/dev/null \ | |
| | fzf --height 40% --reverse \ | |
| --preview 'bat --color=always {} 2>/dev/null || ls -la {}') | |
| if [[ -n $selected ]]; then | |
| READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}${selected}${READLINE_LINE:$READLINE_POINT}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fzf-insert-path() { | |
| local selected=$(fdfind -H --type f --type d --exclude /etc --exclude /proc --exclude /sys --exclude /run . / 2>/dev/null | fzf --height 40% --reverse --preview 'bat --color=always {} 2>/dev/null || ls -la {}') | |
| if [[ -n $selected ]]; then | |
| LBUFFER="${LBUFFER}${selected}" | |
| fi | |
| zle reset-prompt | |
| } | |
| zle -N fzf-insert-path | |
| bindkey '^F' fzf-insert-path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- notes | |
| local M = {} | |
| local notes_dir = "~/notes" | |
| function M.find_notes() | |
| require('telescope.builtin').find_files({ | |
| prompt_title = "📝 My notes", | |
| results_title = "C-a: new note", | |
| cwd = notes_dir, |