whatisgithub

What is harpoon?

theprimeagen/harpoon — explained in plain English

Analysis updated 2026-06-24

9,069LuaAudience · developerComplexity · 2/5Setup · moderate

In one sentence

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.

Mindmap

mindmap
  root((Harpoon))
    What it does
      Mark files
      Instant navigation
      Per-project marks
    Features
      Terminal management
      Tmux integration
      Quick menu
    Setup
      Lua config
      Plugin manager
    Status
      Legacy branch
      Harpoon2 is active
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Mark the 3-5 files you switch between most in a project and jump to any of them with a single keystroke.

USE CASE 2

Manage persistent terminal windows inside Neovim and switch between them by index without retyping commands.

USE CASE 3

Use Harpoon's tmux integration to send stored commands to named terminal panes directly from Neovim.

What is it built with?

LuaNeovim

How does it compare?

theprimeagen/harpoonnvim-mini/mini.nvimhrsh7th/nvim-cmp
Stars9,0699,1359,419
LanguageLuaLuaLua
Setup difficultymoderatemoderatemoderate
Complexity2/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

This is the legacy branch, install the harpoon2 branch instead, as the main branch is no longer receiving updates.

So what is it?

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.

Copy-paste prompts

Prompt 1
Add Harpoon to my Neovim config with lazy.nvim and set up keymaps so I can mark a file with leader-a and jump to marks 1 through 4 with Ctrl-1 through Ctrl-4.
Prompt 2
Show me how to configure Harpoon to save marks per Git branch so each feature branch has its own independent file list.
Prompt 3
Help me set up Harpoon terminal management to open three persistent terminals and send a build command to terminal 1 with a single keymap.
Prompt 4
Write the minimal Lua Harpoon setup I need in init.lua to get mark, quick menu, and numbered file navigation working with no additional plugins beyond plenary.
Prompt 5
How do I configure Harpoon to show my marked files in the Neovim tabline at the top of the editor so I can see them at all times?

Frequently asked questions

What is 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.

What language is harpoon written in?

Mainly Lua. The stack also includes Lua, Neovim.

How hard is harpoon to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is harpoon for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.