Harpoon-style file pinning gives you instant access to a small set of frequently-used files. Pin files to numbered slots, jump to them with <leader>1<leader>9, and the plugin remembers where your cursor was.

Pinning files

Pin the current file with <leader>ha or :HarpoonAdd. The file is added to the next available slot. If the file is already pinned, nothing happens.

Toggle a pin with <leader>ht — pins the file if not pinned, unpins if already pinned.

Remove a pin with <leader>hr or :HarpoonRemove. To remove a specific slot: :HarpoonRemove 3.

Jumping to pins

KeyAction
<leader>1<leader>9Jump to pin slot 1–9
<leader>hnJump to next pin
<leader>hNJump to previous pin
:HarpoonSelect NJump to pin slot N

Navigation reuses an existing tab if the file is already open. Otherwise, the file opens in the current pane (replacing the current buffer), matching harpoon’s fast-switching behavior.

Cursor position

The plugin tracks your cursor position in pinned files. When you leave a pinned file and return later, the cursor is restored to where you left off. Positions are updated automatically on every file switch.

Tip

Pin your daily note as <leader>1, your current project file as <leader>2, and your inbox as <leader>3. Three keystrokes to switch between your most important files.

Picker

Open the harpoon picker with <leader>hp or :Harpoon. All pinned files are shown in slot order with file name and path. The picker supports fuzzy search, preview, and split-open (<C-x>/<C-v>/<C-t>).

Persistence

Pins persist across file closes and plugin restarts. If a pinned file is renamed, the pin updates automatically. If a pinned file is deleted, the pin is removed.

Keybindings

KeyAction
<leader>haPin current file
<leader>hrRemove current file from pins
<leader>htToggle pin
<leader>hpOpen harpoon picker
<leader>1<leader>9Jump to slot 1–9
<leader>hnNext pin
<leader>hNPrevious pin

Ex commands

CommandDescription
:HarpoonAddPin current file
:HarpoonRemove [N]Remove pin (current file or slot N)
:HarpoonOpen harpoon picker
:HarpoonSelect NJump to slot N
:HarpoonNextNext pin
:HarpoonPrevPrevious pin

Settings

Toggle via Settings → Vim Motions → Jump navigation → Harpoon file pinning (default: on).