:tabnewin normal mode, it will open a new tab with an empty buffer. You can immediately open the tab with the file by passing its name as an argument
-pin front of the list of file names — each has its own tab.
vim -p habra.sh habr.py
tabpagemax, for example:
-p. And if you are going to open more tabs than allowed, the files will open, but the tabs will not be displayed and you can navigate through them using the commands
:tabf. A template is passed as a parameter to it, and if a file is found, it will open in a new tab. For example:
:tabfis that it works with
:tabp, for the next and previous tab, or in the normal mode
gTrespectively, and you can use
:tabfirstcommands can be useful
:tabfiropen the first tab and
:tablastopen the last one.
nmap ,t :tabnew<CR>
:tabm n, where n is the position number to which we want to move it, of course, according to the rules of good tone, the numbering of the tabs starts from 0.
:tabdo command, for example, you can change the name of a variable everywhere:
|: tabnew [filename]||Open new tab|
|: tabf pat * ern||Open tab by template|
|: tabs||List of open tabs|
|gt or: tabn||Next tab|
|gT or: tabp||Previous tab|
|: tabfirst or: tabfir||First tab|
|: tablast||Last tab|
|: tabm n||Move tab to n (from 0)|
|: tabdo command||Run on all tabs|