comparison runtime/doc/tabpage.txt @ 6398:5a76e36f07b1 v7.4.530

updated for version 7.4.530 Problem: Many commands take a count or range that is not using line numbers. Solution: For each command specify what kind of count it uses. For windows, buffers and arguments have "$" and "." have a relevant meaning. (Marcin Szamotulski)
author Bram Moolenaar <bram@vim.org>
date Thu, 27 Nov 2014 16:22:48 +0100
parents 359743c1f59a
children 5d89d9b40499
comparison
equal deleted inserted replaced
6397:7f8c4ace6f97 6398:5a76e36f07b1
59 |tabline-menu|. 59 |tabline-menu|.
60 60
61 :[count]tabe[dit] *:tabe* *:tabedit* *:tabnew* 61 :[count]tabe[dit] *:tabe* *:tabedit* *:tabnew*
62 :[count]tabnew 62 :[count]tabnew
63 Open a new tab page with an empty window, after the current 63 Open a new tab page with an empty window, after the current
64 tab page. For [count] see |:tab| below. 64 tab page. If [count] is given the new tab page appears after
65 the tab page [count] otherwise the new tab page will appear
66 after the current one. >
67 :tabnew " opens tabpage after the current one
68 :.tabnew " as above
69 :+tabnew " opens tabpage after the next tab page
70 " note: it is one further than :tabnew
71 :-tabnew " opens tabpage before the current one
72 :0tabnew " opens tabpage before the first one
73 :$tabnew " opens tabpage after the last one
65 74
66 :[count]tabe[dit] [++opt] [+cmd] {file} 75 :[count]tabe[dit] [++opt] [+cmd] {file}
67 :[count]tabnew [++opt] [+cmd] {file} 76 :[count]tabnew [++opt] [+cmd] {file}
68 Open a new tab page and edit {file}, like with |:edit|. 77 Open a new tab page and edit {file}, like with |:edit|.
69 For [count] see |:tab| below. 78 For [count] see |:tabnew| above.
70 79
71 :[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind* 80 :[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind*
72 Open a new tab page and edit {file} in 'path', like with 81 Open a new tab page and edit {file} in 'path', like with
73 |:find|. For [count] see |:tab| below. 82 |:find|. For [count] see |:tabnew| above.
74 {not available when the |+file_in_path| feature was disabled 83 {not available when the |+file_in_path| feature was disabled
75 at compile time} 84 at compile time}
76 85
77 :[count]tab {cmd} *:tab* 86 :[count]tab {cmd} *:tab*
78 Execute {cmd} and when it opens a new window open a new tab 87 Execute {cmd} and when it opens a new window open a new tab
108 This command fails when: 117 This command fails when:
109 - There is only one tab page on the screen. *E784* 118 - There is only one tab page on the screen. *E784*
110 - When 'hidden' is not set, [!] is not used, a buffer has 119 - When 'hidden' is not set, [!] is not used, a buffer has
111 changes, and there is no other window on this buffer. 120 changes, and there is no other window on this buffer.
112 Changes to the buffer are not written and won't get lost, so 121 Changes to the buffer are not written and won't get lost, so
113 this is a "safe" command. 122 this is a "safe" command. >
114 123 :tabclose " close the current tab page
124
125 :{count}tabc[lose][!]
115 :tabc[lose][!] {count} 126 :tabc[lose][!] {count}
116 Close tab page {count}. Fails in the same way as `:tabclose` 127 Close tab page {count}. Fails in the same way as `:tabclose`
117 above. 128 above. >
118 129 :-tabclose " close the previous tab page
130 :+tabclose " close the next tab page
131 :1tabclose " close the first tab page
132 :$tabclose " close the last tab page
133 <
119 *:tabo* *:tabonly* 134 *:tabo* *:tabonly*
120 :tabo[nly][!] Close all other tab pages. 135 :tabo[nly][!] Close all other tab pages.
121 When the 'hidden' option is set, all buffers in closed windows 136 When the 'hidden' option is set, all buffers in closed windows
122 become hidden. 137 become hidden.
123 When 'hidden' is not set, and the 'autowrite' option is set, 138 When 'hidden' is not set, and the 'autowrite' option is set,
124 modified buffers are written. Otherwise, windows that have 139 modified buffers are written. Otherwise, windows that have
125 buffers that are modified are not removed, unless the [!] is 140 buffers that are modified are not removed, unless the [!] is
126 given, then they become hidden. But modified buffers are 141 given, then they become hidden. But modified buffers are
127 never abandoned, so changes cannot get lost. 142 never abandoned, so changes cannot get lost. >
143 :tabonly " close all tab pages except the current
144
145 :{count}tabo[nly][!]
146 Close all tab pages except the {count}th one. >
147 :.tabonly " one
148 :-tabonly " close all tab pages except the previous
149 " one
150 :+tabonly " close all tab pages except the next one
151 :1tabonly " close all tab pages except the first one
152 :$tabonly " close all tab pages except the last one
128 153
129 154
130 SWITCHING TO ANOTHER TAB PAGE: 155 SWITCHING TO ANOTHER TAB PAGE:
131 156
132 Using the mouse: If the tab page line is displayed you can click in a tab page 157 Using the mouse: If the tab page line is displayed you can click in a tab page
174 199
175 :tabm[ove] [N] *:tabm* *:tabmove* 200 :tabm[ove] [N] *:tabm* *:tabmove*
176 :[N]tabm[ove] 201 :[N]tabm[ove]
177 Move the current tab page to after tab page N. Use zero to 202 Move the current tab page to after tab page N. Use zero to
178 make the current tab page the first one. Without N the tab 203 make the current tab page the first one. Without N the tab
179 page is made the last one. 204 page is made the last one. >
205 :-tabmove " move the tab page to the left
206 :tabmove " move the tab page to the right
207 :.tabmove " as above
208 :+tabmove " as above
209 :0tabmove " move the tab page to the begining of the tab
210 " list
211 :$tabmove " move the tab page to the end of the tab list
212 <
180 213
181 :tabm[ove] +[N] 214 :tabm[ove] +[N]
182 :tabm[ove] -[N] 215 :tabm[ove] -[N]
183 Move the current tab page N places to the right (with +) or to 216 Move the current tab page N places to the right (with +) or to
184 the left (with -). 217 the left (with -).