Quickly accessable buffer from anywhere. Simple and minimal.
Tip
The above images have markdown rendered with markview.nvim
You can press a keybind or type :Qb and a buffer will open which will be of a markdown file that you created and linked to in your config. If you aren't in a specified project directory, it will show a default file (target_file). You can register project_folders that will show specific files if your current working directory is inside of it.
you can open a picker with a keybind of your choosing which shows you all of the buffers that you have in different project folders and you can quickly switch and edit them
{
"BobdaProgrammer/quickbuffer.nvim",
config = function()
require("quickbuffer").setup({
target_file = "~/notes/note.md",
border = "single", -- single, rounded, etc
width = 0.8, -- width of window in % of screen size
height = 0.8, -- height of window in % of screen size
bufferposition = "center", -- top-left, top-right, bottom-left, bottom-right
pickerposition = "center-right"
project_folders = { -- specific notes for if you are in specific folders
{
path = "~/projects/project1", -- if your cwd is in ~/projects/project1, then it will display the note: ~/projects/project1/notes.md
target_file = "~/projects/project1/notes.md"
},
{
path = "~/project2/",
target_file = "~/notes/project2notes.md"
},
},
keybinds = { -- default keybindings
gotobuffer = "b",
gotopicker = "p",
closepicker = "<Esc>",
closebuffer = "<Esc>"
}
})
end
},- center
- top-center
- top-left
- top-right
- center-left
- center-right
- bottom-left
- bottom-center
- bottom-right
I recommend that you set a keymap to quickly access quickbuffer.nvim
-- quickbuffer
vim.api.nvim_set_keymap('n', '<Leader>b',":Qb<CR>" ,opts)
