VIM Multi-label

Source: Internet
Author: User

multi-label into VIM before vim-P < filename > Open file in Multi-tab format. such as Vim-p *is to edit all the files in the current directory, VIM Editor: Tabnew Add a tag: TABC close the current Tab:tabo close all other tab:tabs view all open TAB:TABP or GT before one : TABN or GT after a new tab: Tabe< file name >opens the specified file in a new tab page. : Tabnew< file name >Edit the new file in the New tab page. : Tab split in the New tab, open the file in the current buffer. : TABF allows you to search for files in the current directory and open them in a new tab. For example: TABF img.*. This command can only open one file. Vim can only open a maximum of 10 tabs by default. You can use set Tabpagemax=15 Change this limit. Listing tabs: Tabs displays a list of open tabs and uses the> "Identify the current page, with" +"Identifies the page that has changed. Close tab: TABC Close the current tab. : Tabo Close all tabs. Toggle tab: TABN or GT moves to the next tab page. : TABP or GT moves to the previous tab page. : Tabfirst or: Tabr moves to the first tab page. : Tablast moves to the Last tab page. Move tab: TABM [order] moves the tab order of the current file. For example: TABM 1 will move the current tab to the 2nd position. such as: TABM does not specify that the parameter will be moved to the last. To configure the tab page:Setshowtabline=[1,2,3] tab to display the tab bar above the window. =0 does not display the tab bar at all, = 1 is only displayed when the user is new, =2 always show tab bar. Multi-tab command: Tabdo< command > Execute commands in multiple tabs at the same time. For example: Tabdo%s/food/drink/The G command replaces the "food" in the current multiple tab file with "Drink". Helpful: Help Tab-page-intro command, you can get more information about the use of the tab page.

There's a lot of him. Command: Help table

Vim opens multiple files with multiple tabs1, open a new tab to start Vim with"vim-p filename ...": Tabe[dit]*:tabe* *:tabedit* *:tabnew*: Tabnew Opens a new tab with an empty window after the current tab. : Tabe[dit] [++OPT] [+cmd] {file}:tabnew [++OPT] [+cmd] {file} Opens a new tab page and edits {file}, remaining and|:edit|similar. : Tabf[ind] [++OPT] [+cmd] {file} *:tabf* *:tabfind*Open a new tab page and edit'Path'{file}, the rest and |:find|similar. {Only when compile-time joins|+file_in_path|attribute is valid}:[count]tab {cmd}*:tab*Execute {cmd} if it opens a new window and replaces it with a new tab page. cannot be used for|:d iffsplit|, |:d iffpatch|, |:execute| and |:normal|. If [count] is omitted, the label page appears after the current tab page. If [count] is specified, the new tab appears after the [Count] tab page. ": 0tab cmd"causes the New tab page to appear in the first position. Example:: Tab split"Open the current buffer on a new tab page: Tab Help GT"Open tab Display"Gt"'s Help2, close tabs*:tabc* *:tabclose*: tabc[lose][!] To close the current tab page. The following scenario causes the command to fail:-There is only one tab on the screen. *e784*-If'Hidden'No place, 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 for"command. : tabc[lose][!] {count} to close the {count} tabs. Failure conditions and the above': Tabclose'same. *:tabo* *:tabonly*: tabo[nly][!] to close all other tabs. If you place a position'Hidden'option, all of the closed window buffers become hidden. If there is no position'Hidden'But position'Autowrite'option to write back the modified buffer. Otherwise, the window containing the modified buffer is not deleted. But if you give the [!], these windows become hidden. Modified buffers are never discarded, so these changes are never lost. 3, switch to another tab: Tabn[ext]*:tabn* *:tabnext* *gt*<c-pagedown> *ctrl-<pagedown>* *<c-pagedown>*GT*i_ctrl-<pagedown>* *i_<c-pagedown>*go to the Next tab page. The last tab wraps around to the first one. : Tabn[ext] {count}{count}<C-PageDown>{count}gt go to page {count}. The first label page is numbered1. : tabp[revious]*:tabp* *:tabprevious* *gt* *:tabn*: Tabn[ext]*:tabnext* *ctrl-<pageup>*<c-pageup> *<c-pageup>* *i_ctrl-<pageup>* *i_<C -pageup>*GT goes to the previous tab page. The first tab wraps around to the last one. : tabp[revious] {Count}:tabn[ext] {count}{count}<C-PageUp>{count}gt Go to the previous {count} tabs. The first tab wraps around to the last one. : Tabr[ewind]*:tabfir* *:tabfirst* *:tabr* *:tabrewind*: Tabfir[st] Go to the First tab page. *:tabl* *:tablast*: Tabl[ast] Go to the Last tab page. 4, other commands:*:tabs*: Tabs lists the tabs and the windows they contain. Current Window display">". Modified buffer Display"+". 5, rearrange tabs:: Tabm[ove] [N]*:tabm* *:tabmove*moves the current tab to the Nth tab page. With0make the current tab The first tab page. If there is no N, the current tab becomes the last. 6, looping through all tabs:*:tabd* *:tabdo*: Tabd[o] {cmd} executes {cmd} on each tab page.                        Roughly equivalent to:: Tabfirst: {cmd}: Tabnext : {cmd} and so on only the current window of each tab.                If an error occurs on one of the tabs, the remaining tabs are no longer accessed.                The last tab (or any tab that goes wrong) becomes the current tab page. {cmd} can contain'|'to connect multiple commands.                {cmd} cannot open a tab, close a tab, or rearrange a tab page. {Vi does not have this function} {Only when compile-time joins|+listcmds|attribute only valid} See also|:windo|, |:argdo| and |:bufdo|.

VIM Multi-label

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.