scMRU.nvim icon indicating copy to clipboard operation
scMRU.nvim copied to clipboard

scMRU - source control: Most Recently Used files

Telescope integrated per repo MRU/MFU



When working with multiple source repositories, it is often beneficial to have one file cache per repository.

Files are automatically added to the database and associated with the current repository.
Untracked files are stored in the global cache.

:MruRepos MRU for untracked files
MRU for neovim git repo MRU for my neovim dotfiles

Requirements

Installation

Packer.nvim

use 'ilAYAli/scMRU.nvim'
sudo apt install sqlite3 libsqlite3-dev

Usage

:MruRepos       Display cached repositories and bring up the associated cache
:Mru                Display most recently used files for the current repo (cwd)
:Mfu                Display most frequently used files for the current repo (cwd)
:MruAdd           Explicity add a file from the database
:MruDel           Explicity remove a filename from database

It is also possible to invoke the lua functions directly and supply optional parameters. This will e.g display the global MFU:
lua require("mru").display_cache({root="__global__",algorithm="mfu"})

Keymap example

vim.api.nvim_set_keymap('n', '<F1>',    "<Cmd>MruRepos<CR>", opts)
vim.api.nvim_set_keymap('n', '<F2>',    "<Cmd>Mru<CR>", opts)
vim.api.nvim_set_keymap('n', '<F3>',    "<Cmd>Mfu<CR>", opts)

Todo

  • Support other SCM's (svn, mercurial, ...)
  • Improve configurability
  • Windows support