tabline: add forgotten changes from commit cd1d8c2a96
I accidentally missed including some more changes for buffer_idx_mode=2. So add those files now.
This commit is contained in:
parent
cd1d8c2a96
commit
05572482b8
@ -9,6 +9,8 @@ This is the Changelog for the vim-airline project.
|
|||||||
- Improvements
|
- Improvements
|
||||||
- The statusline can be configured to be shown on top (in the tabline)
|
- The statusline can be configured to be shown on top (in the tabline)
|
||||||
Set the `g:airline_statusline_ontop` to enable this experimental feature.
|
Set the `g:airline_statusline_ontop` to enable this experimental feature.
|
||||||
|
- If `buffer_idx_mode=2`, up to 89 mappings will be exposed to access more
|
||||||
|
buffers directly (issue #1823)
|
||||||
|
|
||||||
## [0.10] - 2018-12-15
|
## [0.10] - 2018-12-15
|
||||||
- New features
|
- New features
|
||||||
|
@ -104,9 +104,16 @@ function! airline#extensions#tabline#tabs#map_keys()
|
|||||||
if maparg('<Plug>AirlineSelectTab1', 'n') is# ':1tabn<CR>'
|
if maparg('<Plug>AirlineSelectTab1', 'n') is# ':1tabn<CR>'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
let bidx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 1)
|
||||||
|
if bidx_mode == 1
|
||||||
for i in range(1, 9)
|
for i in range(1, 9)
|
||||||
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :%dtabn<CR>', i, i)
|
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :%dtabn<CR>', i, i)
|
||||||
endfor
|
endfor
|
||||||
|
else
|
||||||
|
for i in range(10, 99)
|
||||||
|
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :%dtabn<CR>', i, i-9)
|
||||||
|
endfor
|
||||||
|
endif
|
||||||
noremap <silent> <Plug>AirlineSelectPrevTab gT
|
noremap <silent> <Plug>AirlineSelectPrevTab gT
|
||||||
" tabn {count} goes to count tab does not go {count} tab pages forward!
|
" tabn {count} goes to count tab does not go {count} tab pages forward!
|
||||||
noremap <silent> <Plug>AirlineSelectNextTab :<C-U>exe repeat(':tabn\|', v:count1)<cr>
|
noremap <silent> <Plug>AirlineSelectNextTab :<C-U>exe repeat(':tabn\|', v:count1)<cr>
|
||||||
|
@ -859,9 +859,10 @@ with the middle mouse button to delete that buffer.
|
|||||||
|
|
||||||
* enable/disable displaying index of the buffer.
|
* enable/disable displaying index of the buffer.
|
||||||
|
|
||||||
When enabled, numbers will be displayed in the tabline and mappings will be
|
`buffer_idx_mode` allows 2 different modes to access buffers from the
|
||||||
exposed to allow you to select a buffer directly. Up to 11 mappings will be
|
tabline. When enabled, numbers will be displayed in the tabline and mappings
|
||||||
exposed. >
|
will be exposed to allow you to select a buffer directly.
|
||||||
|
In default mode, when the variable is 1 Up to 11 mappings will be exposed: >
|
||||||
|
|
||||||
let g:airline#extensions#tabline#buffer_idx_mode = 1
|
let g:airline#extensions#tabline#buffer_idx_mode = 1
|
||||||
nmap <leader>1 <Plug>AirlineSelectTab1
|
nmap <leader>1 <Plug>AirlineSelectTab1
|
||||||
@ -875,6 +876,18 @@ with the middle mouse button to delete that buffer.
|
|||||||
nmap <leader>9 <Plug>AirlineSelectTab9
|
nmap <leader>9 <Plug>AirlineSelectTab9
|
||||||
nmap <leader>- <Plug>AirlineSelectPrevTab
|
nmap <leader>- <Plug>AirlineSelectPrevTab
|
||||||
nmap <leader>+ <Plug>AirlineSelectNextTab
|
nmap <leader>+ <Plug>AirlineSelectNextTab
|
||||||
|
<
|
||||||
|
In mode 2, (when the variable is 2) 89 mappings will be exposed
|
||||||
|
(Note: To avoid ambiguity, there won't be <Plug>AirlineSelectTab1
|
||||||
|
- <Plug>AirlineSelectTab9 maps): >
|
||||||
|
|
||||||
|
let g:airline#extensions#tabline#buffer_idx_mode = 2
|
||||||
|
nmap <Leader>10 <Plug>AirlineSelectTab10
|
||||||
|
nmap <Leader>11 <Plug>AirlineSelectTab11
|
||||||
|
nmap <Leader>12 <Plug>AirlineSelectTab12
|
||||||
|
nmap <Leader>13 <Plug>AirlineSelectTab13
|
||||||
|
...
|
||||||
|
nmap <Leader>99 <Plug>AirlineSelectTab99
|
||||||
<
|
<
|
||||||
The <Plug>AirlineSelect<Prev/Next>Tab mapping handles counts as well,
|
The <Plug>AirlineSelect<Prev/Next>Tab mapping handles counts as well,
|
||||||
so one can handle arbirtrarily number of buffers/tabs.
|
so one can handle arbirtrarily number of buffers/tabs.
|
||||||
|
Loading…
Reference in New Issue
Block a user