Skip to content

A Neovim plugin that brings JetBrains-style Switcher or Visual Studio’s Active Files navigation to your workflow

License

Notifications You must be signed in to change notification settings

jkeresman01/active-files.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

active-files.nvim

Neovim plugin that allows switching between recently used files — similar to Switcher in JetBrains or Active Files in Visual Studio.

Lua Neovim 0.9+ Work In Progress

Table of Contents


The problem ⚠️

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.


The solution 🏆

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.

asciicast


Repository structure 📂

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

Functionalities ⛏️

  • 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

Installation ⭐

Requires Neovim v0.9+. No external dependencies required.

Vim-Plug

Plug 'jkeresman01/active-files.nvim'

Packer

use 'jkeresman01/active-files.nvim'

Commands 🔧

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

Setup 🛠️

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>19 n Jump directly to the N-th most recent file
<CR> n Inside popup: open the selected file

About

A Neovim plugin that brings JetBrains-style Switcher or Visual Studio’s Active Files navigation to your workflow

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages