Hit <C-Tab> to open the switcher; hit it some more to select the buffer you're interested into. If you don't do
anything for 500ms (configurable, see below), the popup will close, and the selected buffer will be displayed.
<C-Tab> traverses buffers from the most recently opened, to the oldest; if you want to "go back" to a previous buffer
in the list, simply hit <C-S-Tab> as many times as you need.
Also, <C-S-Tab> does open the switcher, but it will start from the bottom of the list (aka the oldest buffer you've
opened).
Requirements:
Important
The plugin must NOT be lazy loaded!
{
"neovim-idea/switcher-nvim",
lazy = false,
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons"
},
}use {
"neovim-idea/switcher-nvim",
requires = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons"
}
}Plug "nvim-lua/plenary.nvim"
Plug "nvim-tree/nvim-web-devicons"
Plug "neovim-idea/switcher-nvim"switcher-nvim comes already with sensible configuration options; just remember to call
require("switcher-nvim").setup() and that's it, and you're good to go!
However, in case you'd like to change shortcuts or indicator appearances, you can tweak the options here below:
return {
"neovim-idea/switcher-nvim",
config = function()
require("switcher-nvim").setup({
--[[General]]
traverse_forwards = {
mode = { "n", "i" },
lhs = "<C-Tab>",
opts = { noremap = true, desc = "Traverse Open Buffers from most recently accessed first" },
},
traverse_backwards = {
mode = { "n", "i" },
lhs = "<C-S-Tab>",
opts = { noremap = true, desc = "Traverse Open Buffers from least recently accessed first" },
},
--[[Selection]]
selection = {
timeout_ms = 500,
icon_margin_left = "", -- or "[", "<<<" ... any string, really :)
icon_margin_right = "", -- or "]", ">>>" ...
chevron = "", -- or "๓ฐ
" , "๓ฑฉ", "-->" ...
},
--[[Borders]]
borders = { "โ", "โ", "โ", "โ", "โญ", "โฎ", "โฏ", "โฐ" }, -- or { "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ" }
})
end,
}Should you desire to change the colors of the popup and buffer lines, you can do so by applying customized highlights to the following highlight groups
NeovimIdeaSwitcherCursor
NeovimIdeaSwitcherCursorLine
NeovimIdeaSwitcherCursorLineNC
NeovimIdeaSwitcherNormal
NeovimIdeaSwitcherNormalNC
NeovimIdeaSwitcherFloatBorder- add tests!
- protect main branch!
- check if there are more than 2 buffers open, before opening the popup
- start from the 2nd
- walk the list in reverse order via
C-S-Tab- and start from the last element
- add a right side panel for the actions
BTC 12CQ1L7qQvF3pPXhAgomnSfWaVkL19nV5F


