Hacker News new | ask | show | jobs
by terhechte 4810 days ago
In addition to that, I can heartily recommend the ZoomWindowPlugin:

https://github.com/skeept/dotvim/blob/master/plugin/ZoomWinP...

Basically, if you have multiple split windows, it allows you to do a cmd+O to zoom the current split view (i.e. making it the only view visible). That's neat if there's something tricky going on (say a weird bug) and you want to focus just on this piece of code, without seeing anything else. Once you're done, you can hit cmd+O again, and your old split setup comes back. I love this plugin.

1 comments

Any advantage to this plugin over mapping one key to ':tabopen' and another to ':tabclose %'? I have this in my .vimrc and it seems to get the same results:

  nmap <F4> :tabedit %<CR>
  nmap <F5> :tabclose<CR>
I already have a fixed set of tabs open for different use cases, and switch between them frequently. Adding a new tab to that temporarily would probably confuse me. I may try the tabedit / tabclose solution nevertheless though, I hadn't thought about doing it that way. The advantage being that I'd have one plugin less :)
Splits are not tabs.

Edit re below: OK, good point. But I would still prefer the plugin (and plan to install it) because I just don't use tabs, preferring to stick with splits.

True, but AlexSolution is saying that you can get the same effect without a plugin.

Open your split as a new tab. The new tab (i.e. that split) takes up all of vim. When you want to return to your splits, just close that tab.

A single mapping instead of two.