tabline: expose <Plug>AirlineSelectFirstTab/<Plug>AirlineSelectLastTab
CI / Test (v7.4) (push) Has been cancelled
CI / Test (v8.0.0000) (push) Has been cancelled
CI / Test (v8.1.0000) (push) Has been cancelled
CI / Test (v8.2.0000) (push) Has been cancelled
CI / Test (v8.2.1000) (push) Has been cancelled
CI / Test (v9.0.0000) (push) Has been cancelled
CI / Test (v9.1.0000) (push) Has been cancelled
reviewdog / runner / vint (push) Has been cancelled

closes: #2700

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2026-04-12 15:55:20 +00:00
parent 493a5b4895
commit bd888a05db
4 changed files with 13 additions and 2 deletions
+2
View File
@@ -42,6 +42,8 @@ This is the Changelog for the vim-airline project.
- Support multi-line statusline (Vim only)
- Support clickable buffers in Vim
- Support for showing `repo:/path/file` path like style using the `gitrepo` style
- tabline: Expose `<Plug>AirlineSelectFirstTab` and `<Plug>AirlineSelectLastTab`
- tabline: Add a new `buffer_idx_mode` that adds a lot more mappings.
- Other
- Changed CI from travis-ci.org to GitHub Actions
- Introduce Vim script static analysis using [reviewdog](https://github.com/reviewdog/action-vint)
@@ -221,6 +221,8 @@ function! s:map_keys()
endif
noremap <silent> <Plug>AirlineSelectPrevTab :<C-u>call <SID>jump_to_tab(-v:count1)<CR>
noremap <silent> <Plug>AirlineSelectNextTab :<C-u>call <SID>jump_to_tab(v:count1)<CR>
noremap <silent> <Plug>AirlineSelectFirstTab :<C-u>call <SID>select_tab(0)<CR>
noremap <silent> <Plug>AirlineSelectLastTab :<C-u>call <SID>select_tab(len(airline#extensions#tabline#buflist#list()) - 1)<CR>
" Enable this for debugging
" com! AirlineBufferList :echo map(copy(s:current_visible_buffers), {i,k -> k.": ".bufname(k)})
endif
@@ -125,6 +125,8 @@ function! airline#extensions#tabline#tabs#map_keys()
noremap <silent> <Plug>AirlineSelectPrevTab gT
" 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>AirlineSelectFirstTab :<C-u>:tabfirst<CR>
noremap <silent> <Plug>AirlineSelectLastTab :<C-u>:tablast<CR>
endfunction
function! airline#extensions#tabline#tabs#tabnr_formatter(nr, i) abort
+7 -2
View File
@@ -1279,9 +1279,14 @@ Note: Not displayed if the number of tabs is less than 1
This matches that of the numbering scheme of |:buffers|, letting
`<Plug>AirlineSelectTab67` to reference buffer 67.
Note: To avoid ambiguity, there won't be <Plug>AirlineSelectTab1
- <Plug>AirlineSelectTab9 maps in mode 2 and 3.
Note: To avoid ambiguity, there won't be
<Plug>AirlineSelectTab1 - <Plug>AirlineSelectTab9
maps in mode 2 and 3.
To go to the very first/last buffer, you can use: >
nmap <Leader>FT <Plug>AirlineSelectFirstTab
nmap <Leader>LT <Plug>AirlineSelectLastTab
<
Note: Mappings will be ignored for filetypes that match
`g:airline#extensions#tabline#keymap_ignored_filetypes`.