1. Open a new tab page
: Tabe[dit] {file}
2. Close the tab page
: tabc[lose][!] Closes the current tab page.
The following scenario causes the command to fail:
-There is only one tab on the screen. *e784*
-If ' hidden ' is not set, there is no [!], the buffer has been modified, and the buffer has no other window.
The modification of the buffer is not written and is not lost. So this can be said to be a "safe" command.
: tabc[lose][!]{count}
Close the First {count}
tab page. The failure condition is the same as above ': Tabclose '.
*:tabo* *:tabonly*
: tabo[nly][!] Close all other tabs.
If you set the ' hidden ' option, all closed-window buffers become hidden.
If there is no bit ' hidden ' but set the ' autowrite ' option, write back the modified buffer. Otherwise, the window containing the modified buffer is not deleted. But if you give [!], these windows become hidden. Modified buffers are never discarded, so these changes are never lost.
3. Switch to another tab
: Tabn[ext]
{COUNT}GT
Reference documents:
Http://www.cnblogs.com/hnrainll/archive/2011/04/29/2032660.html
"Notes" Vim Tips for multiple tab pages