improve buffer index mode and fix usages where there's overflow

This commit is contained in:
Bailey Ling
2014-09-17 09:52:08 -04:00
parent 8421f03178
commit 4dab93470f
2 changed files with 58 additions and 25 deletions

View File

@@ -405,15 +405,23 @@ eclim <https://eclim.org>
let g:airline#extensions#tabline#show_tab_type = 1
* enable/disable displaying index of the buffer.
" When enabled, a map between buffer index and buffer number
" will be maintained. Up to nine mappings will be defined to
" allow switching to a buffer using its index easily.
" The mappings have the form <Plug>AirlineSelectTab{x}
" where x is a number from 1 to 9. One can defining mappings like this
" nmap <leader>1 <Plug>AirlineSelectTab1
" Note that buffering switching won't happen if the current buffer
" is a NERDTree buffer.
When enabled, numbers will be displayed in the tabline and mappings will be
exposed to allow you to select a buffer directly. Up to 9 mappings will be
exposed.
let g:airline#extensions#tabline#buffer_idx_mode = 1
nmap <leader>1 <Plug>AirlineSelectTab1
nmap <leader>2 <Plug>AirlineSelectTab2
nmap <leader>3 <Plug>AirlineSelectTab3
nmap <leader>4 <Plug>AirlineSelectTab4
nmap <leader>5 <Plug>AirlineSelectTab5
nmap <leader>6 <Plug>AirlineSelectTab6
nmap <leader>7 <Plug>AirlineSelectTab7
nmap <leader>8 <Plug>AirlineSelectTab8
nmap <leader>9 <Plug>AirlineSelectTab9
Note: Mappings will be ignored within a NERDTree buffer.
* defines the name of a formatter for how buffer names are displayed. >
let g:airline#extensions#tabline#formatter = 'default'