Skip to content

Instantly share code, notes, and snippets.

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}"
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
@linux-papers
linux-papers / notes.lua
Last active May 2, 2026 12:06
neovim notes plugin
-- 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,