[FEATURE REQUEST] Shortcut to quick-open top files in the list in nvim plugin
- As you can see here, I have some files that I open frequently but toggle fff with "ff" shortcut then typing the file name or using arrow key up/down is a bit slow to me, I want to add some shortcuts to this so I can open it quickly
- This is a reallyyy small feature that I hope you can add it to fff because I dont want to add an entire plugin like snipe or harpoon just for this
- Maybe we can use it with Alt-key or Ctrl-key (already have with j/k), so we can open it quickly
- If you add this small feature I can replace harpoon with it completely, because when I open the folder, I often open it with neovim, then toggle fff and search for the file, I don't use file explorer
Yeah it could be cool, to have it there and persisted. I actually thought to make a pinnacle labels for them
Do you want them to be pinned with certain text or just number?
I still dont guess it you mean shortcut with text or number? there a small problem with this but order will be change depend on which file is open frequently , the shortcut will be change every time we open it too, do you have any solution for this for better experience? but I think a character is the best, because number is way too far on the keyboard to press it
Just to align an idea:
- you assign some character bookmark to the file in the file picker
- you have a global keybind to jump to that file
- you can open a picker and narrow down to a single char
- we give bonuses to files that are labelled
- Labels persist between reruns
yeah that's great, I think that's enough for me
[triage-bot] DESIGN NEEDED:
Root cause
User wants quick keyboard access to frequently accessed files without searching. Current frecency-only ranking makes top files vary based on recent accesses — no stable positions for keyboard shortcuts. User currently uses Harpoon for this, wants integrated solution.
Why small fix not possible
Feature needs 5 architectural layers:
- Persistence layer: new LMDB database for bookmark storage (crates/fff-core/src/dbs/bookmarks.rs + dbs/mod.rs, ~200 LOC)
- FFI bindings: expose bookmark CRUD to Lua (crates/fff-nvim/src/lib.rs + lua_types.rs, ~150 LOC)
- Config expansion: new keymaps for bookmark set/unset/jump (lua/fff/conf.lua, ~50 LOC)
- UI rendering: display bookmark labels inline with file names (lua/fff/file_renderer.lua + picker_ui.lua, ~100 LOC)
- Score integration: boost bookmarked files in scoring (crates/fff-core/src/score.rs, ~50 LOC)
- Picker filtering: narrow to single bookmark via keymap (lua/fff/picker_ui.lua, ~100 LOC)
Estimated: 650+ LOC minimum, touches 12+ files across Rust/Lua boundary.
Proposed approach (from maintainer conversation #447)
Aligned spec from @dmtrKovalenko + @versenilvis:
- User assigns character label to file while in picker (e.g.,
a,b,;, not numbers since keyboard distance) - Global keybind jumps to bookmarked file directly (outside picker)
- Picker narrow-down: press character in picker → filters to that bookmark instantly
- Frecency boost: bookmarked files rank higher in results
- Persistence: labels survive Neovim restarts (LMDB like frecency DB)
@dmtrKovalenko mentioned visual: "pinnacle labels" — implies inline badge/tag rendering beside filename.
Files/modules needing change
Rust:
crates/fff-core/src/dbs/bookmarks.rs(new) — bookmark storage with LMDBcrates/fff-core/src/dbs/mod.rs— register new DBcrates/fff-core/src/score.rs— add bookmark bonus to scoringcrates/fff-nvim/src/lib.rs— FFI functions: bookmark_set, bookmark_get, bookmark_delete, bookmark_listcrates/fff-nvim/src/lua_types.rs— return types for bookmark metadata
Lua:
lua/fff/conf.lua— new keymaps:bookmark_set,bookmark_unset,bookmark_jump_*(26 possible chars?)lua/fff/picker_ui.lua— keymap handlers for bookmark ops + narrow filter by charlua/fff/file_renderer.lua— render bookmark label inline (after filename or in margin)lua/fff/main.lua— public API for bookmark_jump(char) callable from user configlua/fff/core.lua— init new bookmark DB on startup
Docs:
- README.md — document new keymaps + use case
Open questions
- Keybind namespace: Alt+char, Ctrl+char, or unmodified char in picker? Numbers Alt+1-9 easier to discover but maintainer discussion preferred characters.
- Bookmark scope: per-project (cwd-relative paths) or global (absolute paths)? Frecency DB uses absolute paths hashed.
- Label UI placement: inline suffix
filename.rs [a], margin column, or sign column like git status? - Conflict resolution: if user tries to bookmark
file_b.rswith labelabutfile_a.rsalready hasa→ overwrite or error? - Max bookmarks: cap at 26 (a-z)? Include numbers/symbols?
- Global jump UX: separate command
:FFFBookmarkJump aor reuse picker with instant filter?
Assigning @dmtrKovalenko for scoping decision — feature feasible but needs architecture plan before implementation.