cloudhead / neovim-fuzzy

Minimalistic fuzzy file finding for neovim
BSD 3-Clause "New" or "Revised" License
111 stars 17 forks source link

Terminal buffers randomly disappear from FuzzyOpen #24

Closed tssm closed 6 years ago

tssm commented 7 years ago

It seems like one of the last commits introduced a little bug: Some times FuzzyOpen doesn't show any terminal buffer and I need to manually look for them using :b (ewww). I say they disappear because usually they show at least once.

cloudhead commented 7 years ago

Ah yes, I made a recent change which fixes some problems due to the inclusion of quickfix buffers in the listing. Now it only shows "normal" files (buftype = ""). Can you describe your workflow with terminal buffers + fuzzy? I guess I could allow an exception for them, since they at least have a name that is searchable.

tssm commented 7 years ago

Thanks for the answer:

I use terminal buffers quite often. The nice thing about them is that all Vim motions and objects and commands are available <3 Usually I open a terminal like this: :term vagrant up && vagrant ssh and with FuzzyOpen I search for them using term or vagrant or ssh as keywords so I can move between code and system easily. I could have three terminal buffers open at the same time, each running a different tool (including plain old Bash which I use for Git).

tssm commented 6 years ago

@cloudhead I have been playing around with this because I really hate to switch to terminal buffers manually and removing the checks that ensure only buffers without type are listed (empty(getbufvar(v:val, "&buftype")) on lines 151 and 157) gives me the desired behavior. Also it doesn't break when there are quick fix windows open because these doesn't have name and there is already a check that discards buffers without name. I can send a pull request, it is a really small change, but I can see help buffers now with the full path to the Neovim runtime on the list. It doesn't bother me, actually I think it is quite useful if you are writing plug-ins, but I can remove them from the list if you want

cloudhead commented 6 years ago

Hmm indeed this doesn't break anything it seems. I'll make the change, though I don't see help buffers in the file list, not sure if I'm doing something different.

cloudhead commented 6 years ago

See bad5e84503f2adb3f225eb9af1aff44a73c7c761

tssm commented 6 years ago

Yeah, that's the change that I made and you are right: I don't see the help buffers anymore. Weird but anyway I think is working perfect know thanks! 🙏