buftabline.txt (6165B)
1 *buftabline.txt* Use the tabline to render buffer tabs 2 3 BUFTABLINE by Aristotle Pagaltzis 4 5 ============================================================================== 6 0. Contents *buftabline* 7 8 1. Intro ....................................... |buftabline-intro| 9 2. Configuration settings ...................... |buftabline-config| 10 3. Mappings .................................... |buftabline-mappings| 11 4. Tab coloring and colorscheme support ........ |buftabline-colors| 12 5. Source ...................................... |buftabline-source| 13 14 15 ============================================================================== 16 1. Intro *buftabline-intro* 17 18 This plugin takes over the 'tabline' and renders the buffer list in it instead 19 of a tab list. It is designed with the ideal that it should Just Work: drop it 20 into your setup and you're done. There is only minimal configurable behavior. 21 22 23 ============================================================================== 24 2. Configuration settings *buftabline-config* 25 26 Changes to any of the plugin's configuration settings at runtime will not take 27 effect immediately unless you force an update: > 28 :call buftabline#update(0) 29 < 30 31 *g:buftabline_show* number (default 2) 32 33 The value of this option specifies when the line with buffer labels will 34 be displayed: 35 0: never 36 1: only if there are at least two buffers 37 2: always 38 This is analogous to the 'showtabline' setting, only for the |buftabline|. 39 40 41 *g:buftabline_numbers* number (default 0) 42 43 The value of this option specifies how to number the buffer labels: 44 0: no numbering 45 1: buffer number 46 2: ordinal number 47 The buffer number corresponds to Vim's internal buffer number as shown by 48 the |:ls| command, whereas the ordinal number is a simple sequential count 49 from left to right. 50 51 52 *g:buftabline_indicators* boolean (default off) 53 54 When on, the buffer's state is indicated in the buffer label. Currently 55 the only state indicated is whether the buffer is 'modified'. 56 57 58 *g:buftabline_separators* boolean (default off) 59 60 When on, a vertical line is drawn inbetween tabs. (This is not strictly 61 correct. The effect is actually achieved by replacing the space on the 62 left side of each tab with U+23B8 LEFT VERTICAL BOX LINE. Therefore the 63 separator will be highlighted the same way as the tab to its left.) 64 65 66 *g:buftabline_plug_max* number (default 10) 67 68 The number of |buftabline-mappings| that will be created by the plugin. 69 You can request more of them or turn off the functionality entirely by 70 setting this to 0. Note it only has an effect before loading the plugin, 71 not if you change it later. 72 73 74 ============================================================================== 75 3. Mappings *buftabline-mappings* 76 77 To switch buffers by their ordinal number (|g:buftabline_numbers| = 2) you can 78 map keys to the |<Plug>| mappings provided by this plugin: > 79 nmap <leader>1 <Plug>BufTabLine.Go(1) 80 nmap <leader>2 <Plug>BufTabLine.Go(2) 81 nmap <leader>3 <Plug>BufTabLine.Go(3) 82 nmap <leader>4 <Plug>BufTabLine.Go(4) 83 nmap <leader>5 <Plug>BufTabLine.Go(5) 84 nmap <leader>6 <Plug>BufTabLine.Go(6) 85 nmap <leader>7 <Plug>BufTabLine.Go(7) 86 nmap <leader>8 <Plug>BufTabLine.Go(8) 87 nmap <leader>9 <Plug>BufTabLine.Go(9) 88 nmap <leader>0 <Plug>BufTabLine.Go(10) 89 < 90 There is also a |<Plug>| mapping which always switches to the last buffer: > 91 nmap <leader>0 <Plug>BufTabLine.Go(-1) 92 < 93 On Mac OS, you probably want to use a |<D-| mapping instead, which will emulate 94 the standard Cmd+1, Cmd+2, etc. keybindings for this feature: > 95 nmap <D-1> <Plug>BufTabLine.Go(1) 96 nmap <D-2> <Plug>BufTabLine.Go(2) 97 nmap <D-3> <Plug>BufTabLine.Go(3) 98 nmap <D-4> <Plug>BufTabLine.Go(4) 99 nmap <D-5> <Plug>BufTabLine.Go(5) 100 nmap <D-6> <Plug>BufTabLine.Go(6) 101 nmap <D-7> <Plug>BufTabLine.Go(7) 102 nmap <D-8> <Plug>BufTabLine.Go(8) 103 nmap <D-9> <Plug>BufTabLine.Go(9) 104 nmap <D-0> <Plug>BufTabLine.Go(10) 105 " or to go to the last buffer: 106 nmap <D-0> <Plug>BufTabLine.Go(-1) 107 < 108 You can ask for more (or fewer) than the default 10 <Plug> mappings using the 109 |g:buftabline_plug_max| setting. 110 111 ============================================================================== 112 4. Tab coloring and colorscheme support *buftabline-colors* 113 114 This plugin uses several custom highlight groups to render the buffer tabs. 115 The custom groups are linked to several other built-in Vim highlight groups 116 that should provide a sensible default which automatically harmonizes with 117 your |colorscheme|. 118 119 However, if you dislike your colorscheme's chosen tabline colours, you can 120 override the default links in your |vimrc| -- c.f. |:hi-link|. 121 122 Or if you are a colorscheme designer (|44.1|), you can add support to your 123 colorscheme for this plugin specifically. 124 125 The highlight groups and their default links are as follows: 126 127 Custom group Default link Meaning 128 *BufTabLineCurrent* |TabLineSel| Buffer shown in current window 129 *BufTabLineActive* |PmenuSel| Buffer shown in other window 130 *BufTabLineHidden* |TabLine| Buffer not currently visible 131 *BufTabLineFill* |TabLineFill| Empty area 132 *BufTabLineModifiedCurrent* |BufTabLineCurrent| (Same as linked but 'modified') 133 *BufTabLineModifiedActive* |BufTabLineActive| (Same as linked but 'modified') 134 *BufTabLineModifiedHidden* |BufTabLineHidden| (Same as linked but 'modified') 135 136 137 ============================================================================== 138 5. Source *buftabline-source* 139 140 https://github.com/ap/vim-buftabline 141 142 143 vim:tw=78:et:ft=help:norl: