Comments (5)
I found what I need: https://github.com/ton/vim-bufsurf. Thank you for your time. I think we can close this issue.
from cybu.nvim.
Hi! You can bind :bnext
& :bprevious
to switch between buffers. To go straight to the last used buffer, you can press/remap <c-6>
or :b#
, you don't need cybu for that.
vim.keymap.set("n", "L", ":bnext<cr>")
vim.keymap.set("n", "H", ":bprevious<cr>")
vim.keymap.set("n", "K", ":b#<cr>")
The show_on_autocmd
config key lets you define an event (e.g. BufEnter
)that triggers the cybu popup. The view for this mode can be changed by adapting the behavior.mode.auto.view
key
behavior = {
mode = {
auto = {
view = "rolling", -- paging, rolling
},
},
show_on_autocmd = "BufEnter",
}
from cybu.nvim.
The show_on_autocmd config key lets you define an event (e.g. BufEnter)that triggers the cybu popup. The view for this mode can be changed by adapting the behavior.mode.auto.view key
Oh okay, I get it, TY
Hi! You can bind :bnext & :bprevious to switch between buffers. To go straight to the last used buffer, you can press/remap or :b#, you don't need cybu for that.
AFAIK :bnext
and :bprevious
switch buffers by their id not in the order that I opened them. I thought CybuLastusedPrev/Next do that but I noticed it also reorders buffers when I open the Next
one.
E.g. with CybuLastusedPrev/Next
I opened 1.txt -> 2.txt -> 3.txt -> 4.txt. Number 4 is currently open then I hit Prev and it opens 1 (not 3?), then Prev and it opens 2, Prev and 3. When I hit Next then 2.txt is opened, and when I hit Next again, 3 is opened. Hitting Next at this point switches between 2 and 3. I don't know if it is desirable or bugged but for me, it doesn't make sense. Maybe I'm missing something.
I'm looking for something more like switching the tabs in a web browser that doesn't reorder them but stack buffers and goes forward and backward that stack (ideally per window). Bufferline.nvim does that but I don't like to have a tab line visible at all and AFAIK Bufferline needs to have it visible to work.
from cybu.nvim.
I'm looking for something more like switching the tabs in a web browser that doesn't reorder them but stack buffers and goes forward and backward that stack.
Currently, this only works, if you set behavior.last_used.switch = "on_close"
. Then the last used list is only changed once when the switch to the selected buffer happens on close of the window.
There are two things that could be improved here for the plugin
- Make it function with
behavior.last_used.switch = "immediate"
without changing the last used list- A new mechanism to keep track of the buffer history is needed (let's call it cybu stack) / this cybu stack only updates when the popup closes / or the timer (see 2.) expires
- Make it possible to use
CybuLastusedPrev/Next
without popup, so that the last used buffer switching through the cybu stack is possible without the context window. For this to properly work, there needs to be a timer, that starts after the last buffer switch withCybuLastusedPrev/Next
and after its expiration the cybu stack updates
The non-trivial part is to make the cybu stack mechanism work correctly. I will take a look at it as soon as I have time.
(PRs are always welcome)
from cybu.nvim.
Is it possible to make something different than 1 and 2? Switching between the previous and next in history (recently opened) without any updates or reorders and also without showing the popup? Just the same behavior as in Chrome for example (ctrl+tab - next, ctrl+shift+tab - previous). No popups, no reorders, no updates of last used, just jumping +1/-1.
- 1 | 2 |
3
| 4 - where3
is currently opened Next
-> goes to 4Prev
-> goes to 3Prev
-> goes to 2- I am closing 2
- New order: 1 |
2
| 3 - so the 3rd is the new 2 and 4th is the new 3 Next
-> goes to 3- I am opening a file (added after 3rd)
- 1 | 2 | 3 |
4
New files could always be added to the end
I'm new in Neovim and Lua so I don't know if it is possible and how much effort it will take but something like this would be great.
from cybu.nvim.
Related Issues (20)
- nvim-web-devicons enabled, but not installed HOT 4
- How can I use vim-unimpaired but map [b and ]b to cybu.nvim in init.lua with packer.nvim? HOT 2
- Relative path doesn't work properly HOT 1
- Update dependency from `kyazdani42/nvim-web-devicons` to `nvim-tree/nvim-web-devicons` HOT 2
- Exclude settings not being respected HOT 1
- Feature request/question: show Cybu window on any buffer switch, not just on `CybuPrev`/`CybuNext` HOT 2
- Cycling through last x number of buffers HOT 1
- Handle unlisted buffers while Cybu window is open HOT 4
- The buffer becomes invalid when switching session HOT 1
- Error executing lua vim/shared.lua:0: t: expected table, got nil HOT 1
- docs: use `function() require('cybu').cycle('prev') end` instead of `<Plug>` for lazy-loading
- support for harpoon.nvim
- Cycle buffers in an MRU fashion HOT 1
- Cybu mixes buffers from different nvim instances
- Feature request: Add "touched" flag to last_used
- Support for grapple.nvim
- Question/feature request: change buffer on key release HOT 6
- bug: Current buffer highlight dissapears when you set the terminal transparent HOT 2
- Feature request: option to control icon size HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cybu.nvim.