In modern IDEs like Visual Studio and JetBrains products, there's always a fast way to jump between recently opened files. In Neovim, this often requires fuzzy finders or full buffer lists, which don’t reflect recency in a consistent way and may include irrelevant or closed buffers.
active-files.nvim provides a clean, dedicated UI to quickly access the last N files you've worked on — sorted by recency of usage. With a popup window, non-intrusive indexing, and direct file switching, this gives you a workflow familiar to JetBrains and VS users — but native to Neovim.
active-files.nvim/
├── LICENSE
├── lua
│ └── active-files
│ ├── commands.lua # Exposed commands
│ ├── init.lua # Plugin entry point
│ ├── ui.lua # UI and switching logic
│ └── util.lua # Utility helpers
└── README.md
- Automatically tracks most recently opened files
- Floating window UI inspired by JetBrains and Visual Studio
- Jump to file by number key (1–9)
- Displays filenames with relative paths
- Configurable number of active files --planned
- Configurable active files sorting criteria -- planned
Requires Neovim v0.9+. No external dependencies required.
Plug 'jkeresman01/active-files.nvim'
use 'jkeresman01/active-files.nvim'
These are the available user commands:
Command | Description |
---|---|
:ShowActiveFiles |
Show floating popup with active files |
:SelectActiveFile |
Select a file from the floating window (internal) |
:SwitchToActiveFile n |
Immediately switch to file at index n |
Set the keybindings to match your workflow here is one example:
require("active-files").setup()
vim.keymap.set("n", "<C-s>", "<CMD>ShowActiveFiles<CR>", { desc = "Show active files" })
-- Optional
for i = 1, 9 do
vim.keymap.set("n", "<leader>" .. i, function()
vim.cmd("SwitchToActiveFile " .. i)
end, { noremap = true, silent = true, desc = "Switch to active file " .. i })
end
vim.api.nvim_create_autocmd("FileType", {
pattern = "active-files",
callback = function(args)
vim.keymap.set("n", "<CR>", "<CMD>SelectActiveFile<CR>", { buffer = args.buf, silent = true })
end,
})
Keybinding | Mode | Description |
---|---|---|
<C-s> |
n |
Show the active files floating popup |
<leader>1 –9 |
n |
Jump directly to the N-th most recent file |
<CR> |
n |
Inside popup: open the selected file |