focus.nvim icon indicating copy to clipboard operation
focus.nvim copied to clipboard

Ignore for new window

Open gegoune opened this issue 4 years ago • 3 comments

Hey, hope you don't mind usage question. I have a command that does something like this:

:20split | te

With focus enabled my sized split is ignored. I do not want to disable all terminal windows but this one only (it's very short lived). Do you think there is a way of achieving right now and if you could think of some solution if not? Perhaps something like

:FocusIgnore | 20split | te

?

Thanks!

gegoune avatar Sep 27 '21 18:09 gegoune

That would be a great feature to have and something I wanted to add into the new resizer logic I made. It has one issue however I need to address with nvimtree.

I think perhaps a naive way would be to use a buftype. We can't use filetype obviously. Or perhaps capture the bufnr and store it and ignore it. I'll have to use the global table for that to store excluded bufnrs which might get messy.

Let me have a think..!

beauwilliams avatar Sep 27 '21 22:09 beauwilliams

A great idea!

hexh250786313 avatar Jan 07 '22 05:01 hexh250786313

I've just added the feature to disable on per window basis. However as it uses winnr, it must be set after split creation. Perhaps there is a trick that could set it without it being resized initially https://github.com/beauwilliams/focus.nvim/commit/6ff7636a6ab7603ec39abe921ad62d406fd7dfa2

beauwilliams avatar Jul 24 '22 14:07 beauwilliams