vim-buffet icon indicating copy to clipboard operation
vim-buffet copied to clipboard

allow buffer switch to last

Open huzilin opened this issue 4 years ago • 2 comments

When using with ctag, only using bw and bn is not enough

huzilin avatar Oct 15 '20 12:10 huzilin

Hi bro! I feel like we have the same idea, but it's kind of fuzzy can you explain it more clearly?

Btw, I'm porting this plugin to Lua, so if you have some Lua knowledge, maybe can you join me later after I finish rewriting the plugin? I have some ideas but I don't want to implement them using VimL.

hewcaw avatar Oct 22 '20 00:10 hewcaw

Here is my config.

nmap <leader>1 <Plug>BuffetSwitch(1)
nmap <leader>2 <Plug>BuffetSwitch(2)
nmap <leader>3 <Plug>BuffetSwitch(3)
nmap <leader>4 <Plug>BuffetSwitch(4)
nmap <leader>5 <Plug>BuffetSwitch(5)
nmap <leader>6 <Plug>BuffetSwitch(6)
nmap <leader>7 <Plug>BuffetSwitch(7)
nmap <leader>8 <Plug>BuffetSwitch(8)
nmap <leader>9 <Plug>BuffetSwitch(9)
nmap <leader>0 <Plug>BuffetSwitch(0)
nmap <leader>] <Plug>BuffetNext
nmap <leader>[ <Plug>BuffetPrev

When I call BuffetSwitch(0), let the buffer switch to the last one.

The BuffetNext let buffer switch to next index in buffer_ids.

Sometime i use :bp or :bn not goto correct index of the buffer. So I add BuffetNext And BuffetPrev

huzilin avatar Oct 22 '20 02:10 huzilin