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

Non-popup floating/overlay support? #942

Closed
4 tasks done
jesseleite opened this issue Feb 4, 2020 · 9 comments
Closed
4 tasks done

Non-popup floating/overlay support? #942

jesseleite opened this issue Feb 4, 2020 · 9 comments

Comments

@jesseleite
Copy link
Contributor

jesseleite commented Feb 4, 2020

Now that we have floating popup window support (thank you! 🎉), I'm wondering if it's possible to add a floating option to the default non-floating-window mode. What I mean by this is, I still prefer everything about how the default non-floating-window looks (position, border, etc.), but have always disliked how it pushes buffer content up off the top of the screen, ie)

Screen Capture on 2020-02-04 at 09-21-18

Given the recent popup window improvements, would it now be possible to have fzf float/overlay the buffer content at the bottom of a window, without pushing it up?

@junegunn
Copy link
Owner

junegunn commented Feb 6, 2020

Added xoffset (0 ~ 1), yoffset (0 ~ 1), and border (rounded | sharp | horizontal) options.

let g:fzf_layout = { 'window': { 'width': 1, 'height': 0.4, 'yoffset': 1, 'border': 'horizontal' } }

@jesseleite
Copy link
Contributor Author

@junegunn wicked, this is wonderful, thank you 🎉

Now I'm wondering about some sort of top only border option? Would be nice to remove the bottom border line completely, moving the fzf results down one line, if that makes sense...

Screen Shot 2020-02-06 at 09 35 17

What are your thoughts on this?

@junegunn
Copy link
Owner

junegunn commented Feb 6, 2020

Well, I'd not like to end up with too many options. Can you try it as it is now for a while and see if you can get used to it?

@jesseleite
Copy link
Contributor Author

jesseleite commented Feb 6, 2020

@junegunn totally trying it out. I just think on a bottom panel, a bottom border is a wasted line, and doesn't really make sense. Like if you use some sort of side panel like NerdTree, TagBar, or even your Peekaboo plugin, there will be a border on the inside edge, but not on the outside edge. Likewise with borders between Vim windows, but not outside of Vim windows. Nawmean?

@junegunn
Copy link
Owner

I realized more options can be useful when you want to launch fzf as a sidebar. So here it is: junegunn/fzf@4fb410a

@junegunn junegunn reopened this Feb 14, 2020
@jesseleite
Copy link
Contributor Author

Yassssss. This is 🔥, thank you so much @junegunn ❤️

qhadron added a commit to qhadron/vim that referenced this issue Mar 11, 2020
@poetaman
Copy link

poetaman commented Apr 12, 2021

@junegunn Is it possible to open a floating fzf window at lower end of current split?

@junegunn
Copy link
Owner

See junegunn/fzf@8b0e1f9

@poetaman
Copy link

poetaman commented Apr 17, 2021

@junegunn I get some weird error (happens only with neovim), whenever I run FZF from a split. It does not happen with vim.

The steps to reproduce this error: set the fzf_layout to window-relative (in .vimrc, the one you pointed me to), reopen vim, create some splits and run :FZF.

Update: Actually the error happens in neovim even if I don't set fzf_layout. All that is needed is to have a few splits open... before running FZF

Error detected while processing function <SNR>84_dopopd:
line   20:
E716: Key not present in Dictionary: "dir && (!&autochdir || w:fzf_pushd.bufname ==# bufname(''))"
Press ENTER or type command to continue
Error detected while processing function <SNR>84_dopopd:
line   20:
E15: Invalid expression: s:fzf_getcwd() ==# w:fzf_pushd.dir && (!&autochdir || w:fzf_pushd.bufname ==# bufname(''))
Press ENTER or type command to continue
Error detected while processing function 25[29]..<SNR>84_pushd:
line   10:
E121: Undefined variable: w:fzf_pushd
Press ENTER or type command to continue
Error detected while processing function 25[29]..<SNR>84_pushd:
line   11:
E121: Undefined variable: w:fzf_pushd
Press ENTER or type command to continue
Error detected while processing function 25[29]..<SNR>84_pushd:
line   11:
E15: Invalid expression: w:fzf_pushd
Press ENTER or type command to continue

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

3 participants