Closed HakonHarnes closed 6 months ago
Description
Arrow.nvim is great for navigating a list of bookmarks, but I often find myself switching back and forth between two recently used files. This requires navigating the full arrow.nvim interface or invoking the
next
andprevious
keymaps multiple times.Proposed solution
Implement a dedicated function to toggle between the currently active file and the previously active file. The function could be called something like
require('arrow.persist').toggle_recent
.Example
Mark four files:
file-1
file-2
file-3
file-4
Open
file-1
, then openfile-3
. Executingtoggle_recent()
should switch fromfile-3
tofile-1
. Executingtoggle_recent()
again should switch fromfile-1
back tofile-3
.Note: I love this plugin. It's better than harpoon in my opinion!
Awesome idea. Just to check:
The native :b #
doesn't works for you for this?
i normally do this:
vim.keymap.set("n", "ge", "<cmd>b#<CR>")
That'll do it! Didn't realize Vim had a built-in command for this. Thanks.
Description
Arrow.nvim is great for navigating a list of bookmarks, but I often find myself switching back and forth between two recently used files. This requires navigating the full arrow.nvim interface or invoking the
next
andprevious
keymaps multiple times.Proposed solution
Implement a dedicated function to toggle between the currently active file and the previously active file. The function could be called something like
require('arrow.persist').toggle_recent
.Example
Mark four files:
file-1
file-2
file-3
file-4
Open
file-1
, then openfile-3
. Executingtoggle_recent()
should switch fromfile-3
tofile-1
. Executingtoggle_recent()
again should switch fromfile-1
back tofile-3
.Note: I love this plugin. It's better than harpoon in my opinion!