mrjones2014 / smart-splits.nvim

🧠 Smart, seamless, directional navigation and resizing of Neovim + terminal multiplexer splits. Supports tmux, Wezterm, and Kitty. Think about splits in terms of "up/down/left/right".
MIT License
831 stars 33 forks source link

[Feature]: Always move in multiplexer if current Vim window is floating #201

Closed toupeira closed 2 months ago

toupeira commented 2 months ago

Similar Issues

Description

The current behaviour with floating windows feels a bit weird to me: The previous Vim window is selected, and then the movement is performed from there (either moving to another Vim window, or multiplexer split).

If I have a big floating window open like FZF or Lazy, the Vim cursor moves to a window behind it, so I can't actually see the buffer and have to get back to the floating window to close it.

What I'd like to do instead is ignore Vim windows completely if the current window is floating, and always move to another multiplexer split.

Happy to submit a PR for this, maybe behind an option called ignore_floating which defaults to false?

mrjones2014 commented 2 months ago

That sounds reasonable. Let's make it an option so that users can preserve the current behavior if they wish. How about something like:

float_win_behavior = 'previous'|'mux'
mrjones2014 commented 2 months ago

And let's keep 'previous' as the default value for the option.

toupeira commented 2 months ago

@mrjones2014 sweet, that sounds great!

I pushed a PR at https://github.com/mrjones2014/smart-splits.nvim/pull/202, thanks for taking a look :bow:

mrjones2014 commented 2 months ago

Whoops, looks like this didn’t get auto closed for some reason. This is implemented in #202