Make sure you’ve installed Harpoon before following this guide.
Set up keybindings
Add basic keybindings to your config
Open your Neovim configuration file (usually
~/.config/nvim/init.lua or ~/.config/nvim/lua/config/keymaps.lua) and add these keybindings:Your first marks
Open a file you work with frequently
Navigate to any file in your project that you want to mark. For example:
Mark the file
With the file open, press
<leader>a (or whatever keybinding you configured for mark.add_file).You should see a message: Mark addedThis adds the current file to your Harpoon marks at the first available slot.Navigate between marks
Open the quick menu
Press The currently open file will be highlighted.
<C-e> to toggle the Harpoon quick menu.You’ll see a popup window showing all your marked files:Navigate from the menu
From the quick menu, you can:
- Navigate to a file: Move your cursor to any line and press
Enter - Open in vertical split: Press
<C-v> - Open in horizontal split: Press
<C-x> - Open in new tab: Press
<C-t> - Delete a mark: Delete the line with
dd - Reorder marks: Cut with
ddand paste withp - Close the menu: Press
qor<ESC>
Navigate with direct keybindings
Close the quick menu and try navigating directly to marks using the keybindings you set up:
- Press
<C-h>to jump to mark 1 (src/index.js) - Press
<C-t>to jump to mark 2 (src/components/Header.jsx) - Press
<C-n>to jump to mark 3 (src/utils/helpers.js) - Press
<C-s>to jump to mark 4 (tests/integration.test.js)
Cycle through marks
You can also cycle through all your marks sequentially:- Press
<C-S-N>to go to the next mark - Press
<C-S-P>to go to the previous mark
Common workflows
Working on a feature
-
Mark the main files you’ll be editing:
- The feature implementation file
- The test file
- Related configuration or types
-
Use direct keybindings (
<C-h>,<C-t>, etc.) to jump between them as you work -
When you’re done, open the quick menu (
<C-e>) and clear marks withddif needed
Bug fixing
- Mark the file where the bug is reported
- As you trace through the code, mark related files
- Use
<C-S-N>and<C-S-P>to cycle through the call stack - Jump back to the main file with the direct keybinding
Code review
- Mark files from the pull request that need attention
- Navigate through them systematically with direct keybindings
- Use the quick menu to see which files you haven’t checked yet
What’s next?
You now know the core Harpoon workflow! Explore more advanced features:File navigation
Learn advanced mark management and navigation patterns
Terminal navigation
Use Harpoon to manage persistent terminals
Configuration
Customize Harpoon’s behavior and appearance
Telescope integration
Browse marks with Telescope