-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
Add option to remember column number in buffer picker #2386
Comments
Can I suggest https://github.com/ThePrimeagen/harpoon? I think for your use case, it's a much better alternative and also alleviates telescope itself from adding this feature. |
@jamestrew I actually use vim views in my workflow (which save my previous position and everything like I like) and have autocmds in my configuration for restoring my previous view when entering a buffer telescope actually breaks this completely because when you enter a buffer from the telescope menu it calls the specific line number. So it will always bring me to the beginning of the line even if I am restoring my view on bufenter. It seems that telescope has just half implemented this feature in a way that is extremely obtrusive. It would make more sense to just switch to the buffer number rather than calling the file at a specific line number as to not be intrusive to anyone's workflow. |
@jamestrew I don't think this is a good replacement, i use grapple (something like harpoon) and buffer picker, they are used very differently, grapple for accessing hot files i end up returning back to frequently in a project and buffer picker for actually navigating open buffers it helps when you have a lot of buffers open. |
Ok valid points. If I were to implement this, I'd want to keep it simple. I don't want to create a separate cache for buffer numbers and cursor positions. |
@jamestrew it might be easier to just not worry about the position and storing them. Just maintain the buffer number and just switch to the buffer. The buffer switching by default doesn't move the cursor |
@jamestrew something like |
Good idea. telescope.nvim/lua/telescope/actions/set.lua Line 113 in a486ac3
|
Is your feature request related to a problem? Please describe.
I love using the built in buffer picker as my normal buffer navigation, but I get frustrated when I always have my cursor moved to the beginning of the line rather than where I left last off.
Describe the solution you'd like
I would like the buffer picker to remember where my cursor was in the column along with the line number similar to if I just switched to the buffer with something like
bnext
andbprev
. To me this seems like a good default to have since that's the default behavior when switching buffers with other methods, but this could also be a configurable option in the buffer picker as well.Describe alternatives you've considered
The only other alternative I can think of is to use something else for buffer picking.
The text was updated successfully, but these errors were encountered: