Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some ideas about improving the scratchpad #207

Open
premell opened this issue Mar 16, 2023 · 4 comments
Open

Some ideas about improving the scratchpad #207

premell opened this issue Mar 16, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@premell
Copy link

premell commented Mar 16, 2023

Small list of suggestions, just some food for thought. I put multiple ideas in one issue so you can easily read through it and close it if you dont like any of them.

  1. Right now when having a side tree open the no-neck-pain scratchpad get squashed between them. But the thing is no-neck-pain doesnt really serve a purpose when the file tree is open. The main buffer is already centered because of the file tree and you cant really edit the scratchpad because its to small. It also adds visual noise and makes it annoying to navigate between the main buffer and the file tree, because you have to press h and l twice. Maybe we could change it to be main scratchpad and secondary scratchpad, instead of left and right. And if you open a file-tree, it automatically takes up the same space as the scratchpad (so the buffer keeps its shape) and the main scratchpad gets moved to the left side. It might be hard to implement but I think it would be really cool!

So instead of this:
image
You'd have this:
image
Just while the filetree is open, then when you close the file tree, the main one moves back and the secondary opens again.

  1. Another idea is to only have one scratchpad per project, and then another global one. I often find myself writing down generic notes, like when im in a call or just writing ideas or todos. IMO you dont really need two buffers per project, but one for the project and one general would be awesome.

  2. Lastly it would be very cool if you could customize the scratchpads more. Maybe you want all projects to have a todos scratchpad and a ideas scratchpad? Especially for the global scratchpad it would be very nice to have different ones, like a todo scratchpad, a scratchpad for neovim plugin ideas etc. Now I really love how neotree handled this
    image

Their file tree has different tabs for files, buffers and git changes. So for our case we could have project todo and ideas on the left and a few other global ones on the right. You could set a binding for when youre on a no-neck-pain scratchpad for switching between the tabs, so you dont have to sacrifice any general bindings.

  1. If you were to add multiple tabs of different scratchpads per project, it would be nice to configure the them automatically. Like give the names and how many you want. Would also be really nice if you could give a template it copies from. For instance your todo file for a project might always have the same layout.

As I said just some food for thought. Many of these ideas might be dumb and probably out of scope of the project, but imo im always happy when people throw out ideas about my projects, even if they are dumb. Anyway great plugin :)

@shortcuts
Copy link
Owner

shortcuts commented Mar 16, 2023

Hey! Thanks a lot for opening the issue and for taking the time!

1

Right now when having a side tree open the no-neck-pain scratchpad get squashed between them. But the thing is no-neck-pain doesnt really serve a purpose when the file tree is open.

This really depends on the screen size, on extra wide it might still make sense in some case

Just while the filetree is open, then when you close the file tree, the main one moves back and the secondary opens again.

I think what you might be looking for here is the minSideBufferWidth option, which basically set a "minimal acceptable width for the side buffer to exist", a side tree is window is usually between 30 to 60 width, so increasing minSideBufferWidth might solve this issue!

2

Another idea is to only have one scratchpad per project, and then another global one. I often find myself writing down generic notes, like when im in a call or just writing ideas or todos. IMO you dont really need two buffers per project, but one for the project and one general would be awesome.

Hmmm that could be great indeed! so that for example you would have the global one on the right, and project one on it left.

I can definitely make each side buffer have its own scratchpad definition, on top of the global buffers one, great idea! Will create a separate issue to track it

3

Their file tree has different tabs for files, buffers and git changes

That's huge, and definitely also a great idea! Will also create a separate issue to track it

4

If you were to add multiple tabs of different scratchpads per project, it would be nice to configure the them automatically.

And again, super great idea too :D


Overall, extending the scratchpad feature might indeed be great! IMHO it's not too out of scope of the project to focus on such features, so I'll take some time to create issues and see how we can tackle them!

Thanks a lot for opening the issue and the feature requests :)

@premell
Copy link
Author

premell commented Mar 16, 2023

Hey glad you found some of it useful!

Regarding 1) I didnt know minSideBufferWidth existed, which does indeed fix some of my problems. However I still find it annoying that the buffer doesnt stay in place when toggling neotree, but this might simply be a bug.
Screencast from 2023-03-16 22-54-30.webm

And my biggest problem is that i have to jump two steps to get to my filetree, instead of the normal one step. I know it sounds like a small thing, but it makes quite a big difference in practice. Anecdotally, before i remapped ctrl h,j,k,l to switch windows I never used multiple windows. It was just quite annoying to have to prefix everything with . So it sort of feels like going back to that.

I guess I could just set minSideBufferWidth to like 10000, although that might affect the right one aswell? I dont necessarily think it should be the default, but maybe an option?

@shortcuts
Copy link
Owner

However I still find it annoying that the buffer doesnt stay in place when toggling neotree, but this might simply be a bug.

Indeed here the resize should leave all buffer in place 🤔 will investigate, thanks!

I guess I could just set minSideBufferWidth to like 10000

10000 would never create it :/ I don't know what screen size you have but on my laptop I can set it to 60 and it disappears when I open neotree, reopens when I don't, I'll try to reproduct your behaviour

although that might affect the right one aswell?

It's the same value for both side but computed on each ones so should work!

shortcuts added a commit that referenced this issue Mar 18, 2023
## 📃 Summary

contributes to #207
closes #208

This PR allow the user to provide a scratchpad definition per side
buffer, in order to allow them to open file from different location on
both sides.
@premell
Copy link
Author

premell commented Mar 18, 2023

Another annoying thing is that when you open windows with neotree it will always open in the scratchpad view, since that was the last buffer you were in.

Also neotree has a popular option that opens the current directory whenever you switch files. However since you always pass the scratchpad before going to the tree, it will always close the tree since the scratchpad is in the root folder. Thus youd have to either disable this option or reopen the tree every time

Screencast.from.2023-03-18.23-21-28.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants