This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/linkarzu on 2024-11-04 17:51:54+00:00.


There are different ways I navigate files in Neovim, my previous post shared in this subreddit explains how I navigate my buffers using telescope buffers (which does not require an additional plugin, just telescope)

One of the other ways I navigate open buffers is by using the snipe.nvim plugin by u/Snoo_71497 and I’ve recently started to use ThePrimeagen’s harpoon plugin.

Snipe is like a “dynamic” harpoon, it automatically assigns a character to each one of your open buffers from a dictionary you specify. Once single letters are used, it switches to double characters, so when you open snipe, you press the letter a for example, it will jump to that buffer, you don’t have to worry about assigning letters to each buffer, it does it for you, automagically.

Harpoon on the other hand is something more static, I think of it like “bookmarks”, so you add files to harpoon, then you can switch to those files by pressing 1, 2, etc. You can reorganize your files in the harpoon menu, and I normally use it for files I want to always be in the same place. For example, I know that 1 is for my zshrc file, and 2 is for my keymaps.lua file, etc. You can have different harpooned files on each tmux session, and when you quit and re-open neovim, your harpooned files will remain there