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 fzf commands hide alternate buffer #265

Closed
4 of 9 tasks
yevhen-m opened this issue Dec 8, 2016 · 8 comments
Closed
4 of 9 tasks

Some fzf commands hide alternate buffer #265

yevhen-m opened this issue Dec 8, 2016 · 8 comments

Comments

@yevhen-m
Copy link

yevhen-m commented Dec 8, 2016

#

  • Category
    • Question
    • Bug
    • Suggestion
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Vim
    • Vim
    • Neovim

Some fzf commands hide alternate buffer if I use {'window': 'enew'} layout setting. For instance, BLines, BTags, Tags commands. Is it possible to fix this issue?
By the way, Files command works properly, alternate buffer is there as expected.

@junegunn
Copy link
Owner

I'm not sure what you're describing. Can you elaborate and provide the steps to reproduce?

@yevhen-m
Copy link
Author

@junegunn sure.
ubuntu/osx, neovim 0.2.0-dev

let g:fzf_layout = { 'window': 'enew' } -- this has to be in init.vim (I want fzf buffers be opened in the current active window).

Start nvim, open a file, then another one, ensure you can switch between alternate buffers (C-^). Then for instance do :BLines (I don't have any prefix set for fzf commands) and jump to any line, or just close fzf buffer with C-c. Now, when I try to switch to alternate buffer, I get vim error E23: No alternate file. Instead, I want to go to the buffer, that was alternate before I executed :BLines.

@junegunn
Copy link
Owner

Hmm, I see. When fzf is open, it becomes the primary buffer and the previous buffer becomes the alternate file, and the other buffer that was previously marked as alternate file is pushed away.

I don't know if there a way to fix it. Is there a way to manually set the alternate file?

@yevhen-m
Copy link
Author

yevhen-m commented Dec 11, 2016 via email

@junegunn
Copy link
Owner

let g:fzf_layout = {'window': 'keepalt enew'} combined with some fixes on fzf plugin should help.

@junegunn
Copy link
Owner

Hmm, looks like fzf can force keepalt so that specifying it in g:fzf_layout is not necessary.

@junegunn
Copy link
Owner

Should be fixed now (keepalt in fzf_layout is not necessary). Thanks for the report.

@yevhen-m
Copy link
Author

@junegunn thanks a lot. I love this layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants