Closed asgeo1 closed 9 years ago
I think you can just do :tab split
to open the current buffer in a new tab.
Yeah I've tried that before in the past.
The problem is that it opens the tabpage at the end of the stack (I think). So when you close it, you don't necessarily end back on the tabpage you started with.
So it's not really the same "toggle" behaviour that you get now with Goyo or ZoomWin - that's what I'm really after.
I see, but I'm not interested in extending Goyo to cover the use cases of ZoomWin (actually I have no experience with the plugin)
So when you close it, you don't necessarily end back on the tabpage you started with.
I think you can fix it by putting a few lines of vimscript to your .vimrc. Define a command that stores the current tab page number in a variable and does :tab split
. And define another command that closes the current buffer on the tab, and goes back to the original tab using the variable.
Just leaving this here for future reference (and if @asgeo1 hasn't left ZoomWin yet)...
A better solution to ZoomWin, especially for neovim users like me, is now https://github.com/troydm/zoomwintab.vim. It works as expected, and not with the general sluggishness that ZoomWin brings with it in neovim. It is also maintained on Github.
It occurs to me, that ZoomWin is just a subset of the functionality that Goyo already provides. (I could be wrong here, but it looks that way to me).
I like Goyo as it is - and want to use it for "distraction free writing".
But it would also be nice to setup a 2nd configuration of Goyo, so it could be used to just maximise the current window (whilst keeping things like Airline activated, not centering the text or hiding any text, etc).
I consider that behaviour "distraction free programming" :-)
It would be good if Goyo had both modes!
What do you think of that? Maybe it's even possible to do this now by configuring it in some way?
(I couldn't see a way of turning the Airline stuff off though?)
BTW, part of my motivation for asking this, is that ZoomWin is a pain as it is not maintained via Github (or anything like that).
It's got lots of little bugs in it, which make it hard to work with and get those bugs fixed. (Right now it's broken for me on Neovim). I really just want to get rid of it, and replace it with something like Goyo