Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

turn buffers into tab page in vim

Tags:

vim

I have a list of buffer in vim, how can I turn all of them into tab page like ones in, say Notepad++?

I know I can use :tabe or something to open new file in tab view, but what if I have opened several buffers in single vim and I want to turn all of them into tab pages?

like image 622
FloydChen Avatar asked Jun 03 '12 06:06

FloydChen


People also ask

How do I create a new tab in Vim?

Opening a tab Probably the easiest to remember is to run the :tabnew command while in normal mode. This will open a new tab with an empty buffer. If you want to edit a file in the new tab, you can run :tabnew filename and Vim will load the file in the new tab.

How do I close a buffer in Vim?

Close buffer named Name (as shown by :ls ). Assuming the default backslash leader key, you can also press \bd to close (delete) the buffer in the current window (same as :Bclose ).


2 Answers

You can type this command:

:tab ball

It will display all buffers in tabs.

like image 177
kev Avatar answered Oct 17 '22 22:10

kev


If I understood, you have several buffers in splits and wish every one of them in a separate tab. <Ctrl-w>T will open a buffer in a new tab page removing it from the split.

But tab pages are really not what they are in Notepad++ - separate files. In Vim they're more of a placeholders for splits, so my guess is you'll have a hard time working with them if you mean to just copy your Notepad++'s way of work to Vim.

like image 23
Rook Avatar answered Oct 17 '22 21:10

Rook