[mini.files] custom side-scrolling layout #2173
Replies: 3 comments 13 replies
-
|
It looks funny, but in a good way :0 |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for sharing. As I said earlier, this looks awesome. And if I'd thought about this during 'mini.files' creation, this might have been the default look. I'll copy my relevant Reddit comment:
|
Beta Was this translation helpful? Give feedback.
-
|
Finally got around to try this, and loving it. I am hitting one error though: This seems to happen specifically when I'm on a smaller window such as here. if I'm full screen it doesn't happen |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Following up on my reddit post https://www.reddit.com/r/neovim/comments/1pm2m6i/cool_minifiles_sidescrolling_layout/
I wanted to edit the mini.files window in the center of the screen, but I also wanted to retain the extra Miller-column windows. With the help of @echasnovski I improved my original version and landed on this:
minifiles_demo.mp4
If you want the same thing, use the code below :) (or share something you come up with cause I'd love to see that as well...)
For anyone that wants to play around with it and create their own layout, the above is pretty simple, imagine we have a window arrangement like this -
The number in the middle is the
depth_offsetfor each window (each window triggers its own'MiniFilesWindowUpdate'event). TheOin the topleft of the central window is the origin that every window begins at (see the line withwin_config.col = math.floor(0.5 * (vim.o.columns - widths[1]))). The*'s in the upper left are the default 'NW' anchor of each window, so imagining that all anchors are initially stacked on pointO, the goal is to offset each window'swin_config.colbased on theirdepth_offset. For windows to the right, you can see their anchors need to be shifted right by the previous window's width (plus all other windows to the origin), and for windows to the left, they need to be shifted left by their own width (plus all other windows to the origin).Hope that helps someone
Beta Was this translation helpful? Give feedback.
All reactions