Comments (6)
I think this would not be trivial to implement, as vim does not seem to be able to distinguish between press and release events:
(There is also a workaround for this kind of problem mentioned in the answer section of the Stackoverflow question)
Incidentally, I'm working on a feature, which maybe is and an adequate solution to this. It will make it possible to switch the buffer immediately in the last_used
mode also. This way you would be always directly in the buffer you have selected in Cybu (like in the default mode).
But for this to work and not to pollute the last used history, there is a little more work involved. So it will probably take a while.
In the meantime I can only recommend reducing the display_time
parameter, so you don't have to wait so long :)
from cybu.nvim.
Oh, a shame neovim doesn't distinguish between key press and release. Thanks for explaining that. I also found this neovim core issue, though it doesn't seem to be very active. Hopefully at some point the feature will see the light of day! :)
I'm really looking forward to the new feature you're planning. Does that have anything to do with the changes you just implemented (I'm not quite sure I understand the immediate
/on_close
and rolling
/paging
functionalities)?
What might also be useful in combination with switching buffers immediately would be to dim the buffers when the cybu floating window is present. This would make that window stand out much more. I'm imagining something like what hop does or what shade.nvim wants to do for floating windows generally. Incidentally shade.nvim doesn't work with cybu (nothing gets dimmed when the cybu window is open), do have any idea why that might be the case?
Given that this feature requires a change in upstream -- and a change that might very well never be implemented -- feel free to close this issue if you want.
from cybu.nvim.
You are right, a few more details in the docs regarding this new options wouldn't hurt. They are in fact the precursor to the mentioned feature.
The immediate
option enables instant buffer switching (as soon as the focus in the cybu window moves to the new list entry), in contrast to the on_close
option, which lets cybu switch the buffer only when the cybu window closes.
Right now, using the immediate
option for the last_used
mode will pollute your buffer history, which makes it a bit less useful. To make this right, there needs to be an additional history of last used buffers curated by the plugin, and there is the complexity (at least I think so).
The rolling
view type displays the focus and buffers list like a slot machine
(see previews in the readme for the default mode) and the paging
view type partitions the list (wandering focus over a static segment of the last used list). Before this options, one was stuck with immediate
& rolling
behavior for the default
mode and with on_close
& paging
for the last_used
mode. Now you can have all combinations for both modes.
I really like your idea with dimming the background when cybu is open, and will look into how it might be resolved that cybu and shade.nvim don't work well together.
from cybu.nvim.
Thanks a lot for all the explanations! It was mostly my mistake for tripping over British vs. American bahavior/behaviour when editing my config 🤦.
I hope the dimming thing will work! :)
Btw (and sorry for the change of topic): Would u consider also making the highlight of cybu's float's border configurable? Currently, it uses whatever FloatBorder is set to, but it would be nice to be able to adjust that.
Thanks again for the great work!
EDIT: Note that shade.nvim seems unmaintained. However, I've managed to get it to work mostly fine with just a few changes, and a PR with those is pending in the shade.nvim repo. I might consider forking eventually if the creator doesn't pick it up again.
from cybu.nvim.
Cool that you managed to fix this! I will see how it develops and maybe mention that it is possible to do this with shade.nvim in the readme.
On the window border issue:
I have pushed a commit to main that allows you to customize the highlight group of the window border via:
config = {
style = {
highlights = {
border = "YourHLGroup",
},
},
from cybu.nvim.
Great, thanks a lot!
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
- Disable popup while switching HOT 5
- 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
- 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.