Mercurial > vim
comparison runtime/doc/tabpage.txt @ 686:473847b050f8
updated for version 7.0207
author | vimboss |
---|---|
date | Sat, 25 Feb 2006 21:45:02 +0000 |
parents | d7e33248b9c8 |
children | 0e922220d322 |
comparison
equal
deleted
inserted
replaced
685:d7e33248b9c8 | 686:473847b050f8 |
---|---|
1 *tabpage.txt* For Vim version 7.0aa. Last change: 2006 Feb 24 | 1 *tabpage.txt* For Vim version 7.0aa. Last change: 2006 Feb 25 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
12 | 12 |
13 1. Introduction |tab-page-intro| | 13 1. Introduction |tab-page-intro| |
14 2. Commands |tab-page-commands| | 14 2. Commands |tab-page-commands| |
15 3. Other items |tab-page-other| | 15 3. Other items |tab-page-other| |
16 4. Setting 'tabline' |setting-tabline| | 16 4. Setting 'tabline' |setting-tabline| |
17 5. Setting 'guitablabel' |setting-guitablabel| | |
17 | 18 |
18 {Vi does not have any of these commands} | 19 {Vi does not have any of these commands} |
19 {not able to use multiple tab pages when the |+windows| feature was disabled | 20 {not able to use multiple tab pages when the |+windows| feature was disabled |
20 at compile time} | 21 at compile time} |
21 | 22 |
131 :tabN[ext] {count} | 132 :tabN[ext] {count} |
132 {count}gT Go {count} tab pages back. Wraps around from the first one | 133 {count}gT Go {count} tab pages back. Wraps around from the first one |
133 to the last one. | 134 to the last one. |
134 | 135 |
135 :tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind* | 136 :tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind* |
136 :tabl[ast] Go to the first tab page. | 137 :tabfir[st] Go to the first tab page. |
137 | 138 |
138 *:tabl* *:tablast* | 139 *:tabl* *:tablast* |
139 :tabl[ast] Go to the last tab page. | 140 :tabl[ast] Go to the last tab page. |
140 | 141 |
141 | 142 |
203 BufEnter | 204 BufEnter |
204 | 205 |
205 ============================================================================== | 206 ============================================================================== |
206 4. Setting 'tabline' *setting-tabline* | 207 4. Setting 'tabline' *setting-tabline* |
207 | 208 |
209 The 'tabline' option specifies what the line with tab pages labels looks like. | |
210 It is only used when there is no GUI tab line. | |
211 | |
208 You can use the 'showtabline' option to specify when you want the line with | 212 You can use the 'showtabline' option to specify when you want the line with |
209 tab page labels to appear: never, when there is more than one tab page or | 213 tab page labels to appear: never, when there is more than one tab page or |
210 always. | 214 always. |
211 | 215 |
212 The highlighting of the tab pages line is set with the groups TabLine | 216 The highlighting of the tab pages line is set with the groups TabLine |
267 resembles the default, but without adding a + for a modified buffer or | 271 resembles the default, but without adding a + for a modified buffer or |
268 trunctating the names. You will want to reduce the width of labels in a | 272 trunctating the names. You will want to reduce the width of labels in a |
269 clever way when there is not enough room. Check the 'columns' option for the | 273 clever way when there is not enough room. Check the 'columns' option for the |
270 space available. | 274 space available. |
271 | 275 |
276 ============================================================================== | |
277 5. Setting 'guitablabel' *setting-guitablabel* | |
278 | |
279 When the GUI tab pages line is displayed, 'guitablabel' can be used to | |
280 specify the label to display for each tab page. Unlike 'tabline', which | |
281 specifies the whole tab pages line at once, 'guitablabel' is used for each | |
282 label separately. | |
283 | |
284 See the 'statusline' option for the format of the value. | |
285 | |
286 The "%N" item can be used for the current tab page number. The |v:lnum| | |
287 variable is also set to this number. | |
288 | |
289 Note that syntax highlighting is not used for 'guitablabel'. The %T and %X | |
290 are also ignored. | |
291 | |
292 A simple example that puts the tab page number and the buffer name in the label: > | |
293 | |
294 :set guitablabel=%N\ %f | |
295 | |
296 An example that resembles the default: Show the number of windows in the tab | |
297 page and a '+' if there is a modifed buffer: > | |
298 | |
299 function! GuiTabLabel() | |
300 let label = '' | |
301 let bufnrlist = tabpagebuflist(v:lnum) | |
302 | |
303 " Add '+' if one of the buffers in the tab page is modified | |
304 for bufnr in bufnrlist | |
305 if getbufvar(bufnr, "&modified") | |
306 let label = '+' | |
307 break | |
308 endif | |
309 endfor | |
310 | |
311 " Append the number of windows in the tab page if more than one | |
312 let wincount = tabpagewinnr(v:lnum, '$') | |
313 if wincount > 1 | |
314 let label .= wincount | |
315 endif | |
316 if label != '' | |
317 let label .= ' ' | |
318 endif | |
319 | |
320 " Append the buffer name | |
321 return label . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1]) | |
322 endfunction | |
323 set guitablabel=%{GuiTabLabel()} | |
324 < | |
325 | |
272 vim:tw=78:ts=8:ft=help:norl: | 326 vim:tw=78:ts=8:ft=help:norl: |