-
Notifications
You must be signed in to change notification settings - Fork 319
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
About Tmux zoom feature #56
Comments
Can you describe the case you don't like? Is this when you're zoomed in to a vim instance and try to move towards an edge? |
@Keithbsmiley yes. It also applies when not using Vim too. Moving over the edge doesn't mean to go back to the zoomed out layout. |
I know that when not using Vim is not an issue of the plugin though. But I'd like to know how to do it, nevertheless. |
It seems like using the default tmux mappings to go down when a pane is focused zooms out? Meaning that is the intended behavior when moving against an edge? |
@Keithbsmiley yes indeed. Switching to default mappings for crossing over the edges, solely when zoomed in, would do it. |
Hello @oblitum, thanks for opening the discussion. Personally I'm 👎 on changing this behavior or making it configurable. I've always found this to be a nice feature of tmux. Changing this would mean deviating from the default behavior, and adding this behind a configurable option would add complexity that I would rather avoid in this already complicated setup (this would need to be implemented as part of the tmux bindings which are the most precarious aspect of the plugin). That said, I've never run into this as an issue and when you raised you question I had to think why that was. My guess is it has to do with my workflow and how I handle tmux panes. The vast majority of the time I am in a 75/25 split with Vim occupying the 75. I only ever use zoom to review some scrollback in a secondary tmux pane, and never zoom the Vim pane itself. Instead of zooming the Vim pane, I use a handful of other techniques to allow me to manage my screen space, particularly for Vim:
Finally, if you're really interested in implementing this yourself, the following shell command will allow you to check if you are zoomed. You could hook this into the tmux bindings to short circuit when zoomed. tmux display-message -p "#F" | grep -q "Z" Hope this all helps. |
Thanks for all the analysis @christoomey. I appreciate it. For my workflow it would be indeed useful because sometimes I have to have several panes to acomplish a given narrowed task, so I prefer to have panes instead of more windows, which I would be already using at a higher level of management. |
Just wanted to report here that, for some reason, recently on Archlinux with an up to date tmux and vim-tmux-navigator, the plugin is behaving the way I wished. I'm forced to zoom out to tmux-navigate between panes. |
There were issues (e.g. christoomey#56) and pull requests (christoomey#65 and christoomey#104) to improve this behavior, but they were mainly rejected because it breaks other use cases. This PR adds an option that can be enabled to have the current behavior (`let g:tmux_navigator_move_out_of_zoomed_tmux = 1`) by default, but it also recognizes when the user tries to get out of the zoomed pane twice, and then allows for it.
See #133 for a fresh approach at this. |
@blueyed thanks for letting me know... current behaviour for me is back as formerly explained in the issue, it seems I've learned to live with it, but if you got a fix I'll sure switch, I don't like the default. |
Yeah, try #133. It even let's you zoom out on 2nd invocation by default. |
Just trying. |
There were issues (e.g. christoomey#56) and pull requests (christoomey#65 and christoomey#104) to improve this behavior, but they were mainly rejected because it breaks other use cases. This PR adds an option that can be enabled to have the current behavior (`let g:tmux_navigator_move_out_of_zoomed_tmux = 1`) by default, but it also recognizes when the user tries to get out of the zoomed pane twice, and then allows for it.
There were issues (e.g. christoomey#56) and pull requests (christoomey#65 and christoomey#104) to improve this behavior, but they were mainly rejected because it breaks other use cases. This PR adds an option that can be enabled to have the current behavior (`let g:tmux_navigator_move_out_of_zoomed_tmux = 1`) by default, but it also recognizes when the user tries to get out of the zoomed pane twice, and then allows for it.
There were issues (e.g. christoomey#56) and pull requests (christoomey#65 and christoomey#104) to improve this behavior, but they were mainly rejected because it breaks other use cases. This PR adds an option that can be enabled to have the current behavior (`let g:tmux_navigator_move_out_of_zoomed_tmux = 1`) by default, but it also recognizes when the user tries to get out of the zoomed pane twice, and then allows for it.
I'd like to put in discussion what would be the best behavior when you zoom a particular pane. For me it's a bit annoying when I'm in a zoomed pane and get out of zoom by accident when moving around buffers/panes.
Would it be possible/desirable to have vim-tmux-navigation disabled (both for tmux as for vim) when zoom is ON in a given pane? Because I find vim-tmux-navigation useful solely when zoom is off.
The text was updated successfully, but these errors were encountered: