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

Expose some buffer related functions #1044

Merged
merged 1 commit into from
Jun 7, 2020

Conversation

doronbehar
Copy link
Contributor

Hi!

I really enjoy this plugin. I just wrote a customization to the :Buffers command I shared at https://github.com/junegunn/fzf/wiki/Examples-(vim)#delete-buffers-from-buffers and this requires these small changes. I hope it'll be OK with you.

Regards.

@junegunn
Copy link
Owner

junegunn commented Jun 4, 2020

See my previous comment: #1024 (comment)

Making things public means that I'll have to pay extra care not to break backward compatibility from then on, and I don't want to do it and I want to make it clear by naming these functions with _ prefix.

@doronbehar
Copy link
Contributor Author

Done 🎸.

autoload/fzf/vim.vim Show resolved Hide resolved
This enables to customize the :Buffers commands extensively.
@junegunn junegunn merged commit 8f1e73b into junegunn:master Jun 7, 2020
@rockyzhang24
Copy link

Hi @doronbehar

I encounter an error when I run the customized version of :Buffers command and try to delete a buffer using D. I attached the screenshot below. Thank you.

image

@doronbehar
Copy link
Contributor Author

Yea I know, another person has contacted me personally to note this fault. However, from my experience these errors are not consistent - they don't appear always and they are not always reproducible, at least for me.

The problem is, that when D is pressed, we want to change something both in "the parent" Nvim session and in the list of open buffers in fzf "the child". This makes it hard to decide whether D should be mapped to something by an autocmd (By Vim) - which will make it easy to delete buffers with it, or to use fzf's --bind. In the current implementation, the latter choice was made.

I'm currently unavailable to solve this little quirk, though it's in my TODO now. I will find the time probably at the end of July, when my semester will over.

P.S, sorry @junegunn for abusing your repo to discuss this.

@rockyzhang24
Copy link

Okay. I think it is better to give a tag/mark like "bug" to this customized command in the wiki page so that other users could recognize it and wait for it being solved. Thanks.

@doronbehar
Copy link
Contributor Author

I've removed the wiki section as I've reached the conclusion it'll be impossible to implement this idea without the feature described in junegunn/fzf#2019 .

junegunn added a commit to junegunn/fzf that referenced this pull request Dec 17, 2022
junegunn added a commit to junegunn/fzf that referenced this pull request Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants