+1
日增长
9,246
stars
491
forks
39
watchers
329
prs
373
issues
0
releases
README
⇁ HARPOON 2
This is a deprecated and all future changes will be to the branch harpoon2.
Harpoon 2
STATUS: Merging into mainline April 20th or June 9th (nice)
-------------------------------
Legacy Harpoon README
Harpoon
Getting you where you want with the fewest keystrokes.
!Harpoon
-- image provided by Bob Rust
⇁ WIP
This is not fully baked, though used by several people. If you experience any
issues, see some improvement you think would be amazing, or just have some
feedback for harpoon (or me), make an issue!
⇁ The Problems:
1. You're working on a codebase. medium, large, tiny, whatever. You find
yourself frequenting a small set of files and you are tired of using a fuzzy finder,
:bnext & :bprev are getting too repetitive, alternate file doesn't quite cut it, etc etc.
1. You want to execute some project specific commands or have any number of
persistent terminals that can be easily navigated to.
⇁ The Solutions:
1. The ability to specify, or on the fly, mark and create persisting key strokes
to go to the files you want.
1. Unlimited terminals and navigation.
⇁ Installation
neovim 0.5.0+ required
install using your favorite plugin manager (vim-plug in this example)
vim
Plug 'nvim-lua/plenary.nvim' " don't forget to add this one if you don't have it yet!
Plug 'ThePrimeagen/harpoon'
⇁ Harpooning
here we'll explain how to wield the power of the harpoon:
Marks
you mark files you want to revisit later on
lua
:lua require("harpoon.mark").add_file()
File Navigation
view all project marks with:
lua
:lua require("harpoon.ui").toggle_quick_menu()
you can go up and down the list, enter, delete or reorder. q and exit and save the menu
you also can switch to any mark without bringing up the menu, use the below with the desired mark index
lua
:lua require("harpoon.ui").nav_file(3) -- navigates to file 3
you can also cycle the list in both directions
lua
:lua require("harpoon.ui").nav_next() -- navigates to next mark
:lua require("harpoon.ui").nav_prev() -- navigates to previous mark
from the quickmenu, open a file in:
a vertical split with control+v,
a horizontal split with control+x,
a new tab with control+t
Terminal Navigation
this works like file navigation except that if there is no terminal at the specified index
a new terminal is created.
lua
lua require("harpoon.term").gotoTerminal(1) -- navigates to term 1
Commands to Terminals
commands can be sent to any terminal
lua
lua require("harpoon.term").sendCommand(1, "ls -La") -- sends ls -La to tmux window 1
further more commands can be stored for later quick
lua
lua require('harpoon.cmd-ui').toggle_quick_menu() -- shows the commands menu
lua require("harpoon.term").sendCommand(1, 1) -- sends command 1 to term 1
Tmux Support
tmux is supported out of the box and can be used as a drop-in replacement to normal terminals
by simply switching 'term' with 'tmux' like so
lua
lua rTop issues
#441Harpoon doesn't save cursor position after quit23 comments · 2023-12-22#435Error when running Harpoon commands22 comments · 2023-12-19#436[harpoon 2] Ability append item to list with any index19 comments · 2023-12-19#444problem with vue17 comments · 2023-12-24#648Harpoon 2 persistency doesn't work when using the auto-session plugin.15 comments · 2024-12-07#477Cannot delete or re-arrange files (using telescope ui)13 comments · 2024-01-07#352Tabline or other *Line integrations13 comments · 2023-12-01#577Harpoon doesn't remember my marks after close10 comments · 2024-04-16
Discussions
#714(done) (I did it with 0 code btw) This just feels missing from harppon. Extra boxes for harppon so i t feels like a workspace or desktop env0 comments · 2026-05-23#709Snacks Picker for Harpoon20 comments · 2026-02-01#707I made Harpoon for the Mac0 comments · 2026-01-28#703Is there an option to have a different harpoon list for each tab?1 comments · 2025-12-08#681harpoon menu escape automatically0 comments · 2025-06-27#674Is this a bug? Best way to delete an item using an alternative picker?0 comments · 2025-05-16#671Fix Harpoon border on nvim 0.110 comments · 2025-05-04#656> [`harpoon2`] will become `master` within the next few months1 comments · 2025-02-10