Closed cibinmathew closed 2 years ago
Glad you like it! I can set that up. This month has been a bit busy for me, trying to juggle a lot of things but as soon as things settle down I'll look into this as well as #5
Hello again, now I've made a preview feature branch, that is mostly working. An issue is running it from vim, or any other terminal application like that. That's been an issue with fuzzback in general, and is a bit tricky to deal with, but as far as your usual scrollback goes it should work.
Mind giving the branch a whirl, and letting me know how that goes?
@roosta Thanks for adding the feature. I will try to set this up and will update here in couple of days.
I will keep adding the observations below
Thanks for your thoughts
As a side note, I did find that using popup and a 90% size worked really well with the preview. EDIT: Clarification
I gave a try in tweaking fzf settings
It was scrollable because the lines were getting wrapped when line ouccupied 100% due to right justification(screenshot) or whenever it has full line content
It was okay with below settings. Do you mind adding this to tmux-fuzzback/scripts/fuzzback.sh
--preview-window=border-none
Thanks for looking into this, appreciate it. I'll add that option right away.
hmm, I'm not sure that option is ideal. It makes the preview and search look very similar. I don't have a wrapping issue myself, I tried in vim: Seems it just renders the line there without wrapping.
Could it be a pager setting maybe? what pager are you using? EDIT: Probably not...
Could be related to local FZF defaults. But we can proceed with the merge as it is not a stopper.
Think I found a way that works. Give it a try now. While investigating my local options I stumbled upon an option in fzf manual
---preview-window=nowrap
I think that forcing nowrap in fuzzback makes most sense Also I cant merge yet, there is an issue with preview in terminal applications like vim, preview gets all loopy. I wanted to fix that before merge.
Think I found a way that works. Give it a try now. While investigating my local options I stumbled upon an option in fzf manual
---preview-window=nowrap
Observations:
---preview-window=nowrap
: No line wrapping but some are still scrollable (lines in the preview 5)
This one in screenshot is scrolllable
--preview-window=nowrap,border-top
: No line wrapping but some are still scrollable (strangely this feeds in 7 lines into the buffer and not 5)
--preview-window=nowrap,border-none
: Works perfectly but preview window is not distinguishable like you mentioned :-(
@roosta we can proceed on the above options like you mentioned for now and revisit if something better is discovered on more usage
I might be able to fix the scrolling issue else where, I can modify the sed call. It is a bit of a strange bug though, it will only happen sometimes for me, not sure what is the cause yet. Have you been able to consistently reproduce it?
No identifiable pattern yet :-(
Hi guys, I have tried the feat/preview
branch. It works very well for me.
Maybe we could add a toggle keybinding to toggle the preview.
Hi @tru2dagame This feature is 90% complete, just a few tweaks needed but I got sidetracked for a while. I'm using this branch myself, and it works fine most of the time, feel free to do the same. Once I fix a couple of bugs I'll merge.
Ctrl-p
is currently mapped to preview toggle, which I think is the default in fzf, I can setup an option for a custom one of you'd like.
Seem the issue I was holding off on fixed itself with a fzf update, so time to merge.
Thanks @roosta for this wonderful plugin.
Feature Request Just wanted to check if it is possible to add a preview(with context) of the focussed line in the fzf matches. This will help to read the neighbouring lines as well.