Hacker News new | ask | show | jobs
by AlexSolution 4807 days ago
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>
3 comments

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.