Ryan Winchester 1092e6fe96
Change logo
2023-11-30 23:47:36 -04:00
2023-11-30 23:47:36 -04:00
2021-03-14 21:45:40 -07:00
2021-09-04 20:51:58 +05:30
2021-05-11 10:50:53 -06:00
2023-11-09 08:46:05 -07:00
2020-11-04 08:48:16 -08:00
2023-11-30 23:47:36 -04:00
2021-11-26 06:27:56 +03:00

Harpoon

Getting you where you want with the fewest keystrokes.

Lua Neovim

Harpoon Man

⇁ TOC

⇁ 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.
  2. 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.
  2. Unlimited terminals and navigation.

⇁ Installation

  • neovim 0.8.0+ required
  • install using your favorite plugin manager (i am using packer in this case)
use "nvim-lua/plenary.nvim" -- don't forget to add this one if you don't have it yet!
use {
    "ThePrimeagen/harpoon",
    branch = "harpoon2",
    requires = { {"nvim-lua/plenary.nvim"} }
}

⇁ Getting Started

Quick Note

You will want to add your style of remaps and such to your neovim dotfiles with the shortcuts you like. My shortcuts are for me. Me alone. Which also means they are designed with dvorak in mind (My layout btw, I use dvorak btw).

harpoon:setup

it is a requirement to call harpoon:setup(). This is required due to autocmds setup.

Basic Setup

Here is my basic setup

local harpoon = require("harpoon")

harpoon:setup()

vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)

vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<C-t>", function() harpoon:list():select(2) end)
vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)

⇁ Social

For questions about Harpoon, there's a #harpoon channel on the Primeagen's Discord server.

⇁ Note to legacy Harpoon 1 users

Original Harpoon will remain in a frozen state and i will merge PRs in with no code review for those that wish to remain on that. Harpoon 2 is significantly better and allows for MUCH greater control. Please migrate to that (will become master within the next few months).

Description
No description provided
Readme MIT 3.5 MiB
Languages
Lua 99.2%
Shell 0.6%
Makefile 0.2%