4 ms·
I've made a simple tagging solution based on fzf and don't know how to live without it anymore. You just name your folders and subfolders by tags. And then sea
by dandanua 4y ago
I've made a simple tagging solution based on fzf and don't know how to live without it anymore.
You just name your folders and subfolders by tags. And then search it via fzf (I prefer the exact search) launched by a hotkey.
To exclude a subfolder from the global search I use a trick. You add the stop symbol " #" at the end of the subfolder name. A custom fzf configuration (see below) then excludes what's the inside. Though, you still can cd into the excluded folder and make fzf search in it. So, in fact it gives you an hierarchy of tagged folders with stop symbols. This helps to avoid search pollution and unnecessary disk reads:
export FZF_DEFAULT_COMMAND="fd -E=**/*#/**"
I also use hotkeys to open items in default programs and to preview files in fzf UI:
export FZF_DEFAULT_OPTS="--exact \
--bind 'ctrl-/:execute-silent(xdg-open {} &)' \
--bind 'ctrl-p:toggle-preview'"
Of course, it still requires a strong discipline to tag everything appropriately. But the profit is immense - you can find everything you remember and open it in the default program in a matter of seconds.