harpoon
Harpoon is a Neovim plugin that lets you mark a small set of files per project and jump between them instantly with a single keystroke, eliminating repetitive file-switching during coding sessions.
Harpoon is a plugin for Neovim, a text editor used mainly by programmers, that solves a specific problem: when you are working on a codebase and constantly switching between the same small set of files, the usual methods (fuzzy finders, buffer cycling commands) add up to a lot of keystrokes. Harpoon lets you mark specific files and then jump to any of them instantly with a single keystroke.
The workflow is simple. While editing a file you want to return to frequently, you run a command to mark it. Harpoon keeps a numbered list of your marked files for the current project. You can then jump directly to file 1, file 2, and so on without opening a menu, or pull up a quick menu that shows all your marks and lets you reorder or remove them. The marks are saved per project, so switching to a different codebase gives you a fresh list without losing the previous one.
Beyond file navigation, Harpoon also manages terminal windows inside Neovim. You can open and switch between multiple persistent terminals by index, the same way you switch between marked files. Commands can be stored and sent to specific terminals without retyping them each time. There is also built-in support for tmux, a terminal multiplexer, as an alternative to Neovim's built-in terminal.
Note that the version of Harpoon in this repository is considered legacy. Active development has moved to a rewritten version called Harpoon 2, available on the harpoon2 branch. The README makes clear that the main branch here is no longer being updated.
Installation follows the standard Neovim plugin pattern: add Harpoon and a dependency called plenary.nvim to your plugin manager. Configuration is done by calling a setup function in your Neovim configuration file, written in Lua. Options include per-branch marks, tabline integration showing your marks at the top of the editor, and controls for when marks are saved to disk.
Where it fits
- Mark the 3-5 files you switch between most in a project and jump to any of them with a single keystroke.
- Manage persistent terminal windows inside Neovim and switch between them by index without retyping commands.
- Use Harpoon's tmux integration to send stored commands to named terminal panes directly from Neovim.