helix
helix copied to clipboard
Temporarily maximize splits (zoom into a split)
Discussed in https://github.com/helix-editor/helix/discussions/2251
Originally posted by fvacek April 24, 2022
Like Ctrl-b z
in tmux?
Maybe this could fit into view mode? zZ ("zoom") for example could toggle it on and off - or zM ("maximise"). The lowercase variants for these are already used by default.
This would be really useful. I keep wanting to do this :)
The best I can do currently is to use space-w-o
for current window only but that loses the split so you then have to e.g., space-w-v
(split vertically), space-b
(open buffer picker) and repick the buffer you had open there (in this case for a vertical split).
This is indeed useful. One way to accomplish this would actually be to implement tabs (#2295). In my .vimrc
I have:
nnoremap ,o :tab split<cr>
That way, hitting ,o
opens the current buffer in a new tab without splits (i.e. "maximized"). When I quit this tab (:q
), I get back to my previous tab with the original splits preserved. Of course, tabs offer more versatility as well, because you can switch back and forth between different split views.
(Note to those who think tabs in vim are useless: I used to be in your camp, but I've changed my mind. They can genuinely be useful, once you take the time to understand them and start using them).
FWIW, the one thing I have missed from kakoune since switching to helix so far is the fact that kak
doesn't implement views at all, but instead uses a client/server model to so any number of terminals can attach to a running instance. From there it is trivial to handle splits with tmux panes; giving more liberal control of the layout and more natural navigation between non-editor panes. This is also very useful when one is working on smaller laptop screens.