Plugin for NeoVim to display and switch to a buffer. (also my first nvim plugin)
- Every buffer will get a timestamp when opened
- Timestamps will be updated when you switch to the buffer
- Buffers are sorted by their timestamps
- The switched/current buffer will always be the second on the list. This is because you don't want to switch to the current buffer
- The previous buffer will be the first. This is for quick access/switch between two frequently used buffers
Using packer.nvim
-- In packer.lua adduse'ArmanHZ/nvim-select-buffer'Create the selectbuffer.lua file in the /after/plugin directory and add the following lines:
-- In /after/plugin/selectbuffer.lua filelocalselect_buffer=require("select-buffer")
vim.keymap.set("n", "<leader>bb", select_buffer.main) -- You can use any keybinding you want- (Refactoring) Clean the code and add some color to the display
Complete the movement feature and select buffer featureAdd help menu below the Buffer textPrepare the directory structure for 'packer' compatibilityAdd a demo video for the repoAdded line highlighting for the buffer window for better visibilityUpdate old api calls to new ones (exec -> exec2)Re-write the buffer order, s.t. latest buffers will be at the topDisable some movement keys while showing the buffer (add unmappings)Update the demo and readme after all these tasks are done
