Last active
July 26, 2025 08:33
-
-
Save ghiden/109e8a3379fbb004731cc88407753c55 to your computer and use it in GitHub Desktop.
notational velocity (nvalt) alternative one-liner using skim, ripgrep, and fzf in vim/nvim
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
#/bin/bash | |
# Given a directory: | |
# - fuzzy matches against filenames (fzf/sk/...) | |
# - exact matches against contents (rg) | |
# Key bindings: | |
# enter: open the selected file | |
# ctrl-n: open new file with QUERY_STRING.txt | |
# config | |
NVALT_DIR=YOUR_NVALT_DIR | |
EDITOR=nvim | |
FUZZY=fzf | |
cd $HOME/$NVALT_DIR && sk \ | |
--ansi \ | |
-i \ | |
-c "(rg --files | $FUZZY --filter \"{}\" & rg -S -l \"{}\") | uniq" \ | |
--bind "enter:execute($EDITOR {}),ctrl-n:execute($EDITOR {cq}.txt)" \ | |
--preview "$HOME/.vim/plugged/fzf.vim/bin/preview.sh {}" \ | |
--preview-window down:wrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment