mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-08-15 04:11:02 +08:00
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
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:
@@ -42,6 +42,8 @@ This is the Changelog for the vim-airline project.
|
|||||||
- Support multi-line statusline (Vim only)
|
- Support multi-line statusline (Vim only)
|
||||||
- Support clickable buffers in Vim
|
- Support clickable buffers in Vim
|
||||||
- Support for showing `repo:/path/file` path like style using the `gitrepo` style
|
- 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
|
- Other
|
||||||
- Changed CI from travis-ci.org to GitHub Actions
|
- Changed CI from travis-ci.org to GitHub Actions
|
||||||
- Introduce Vim script static analysis using [reviewdog](https://github.com/reviewdog/action-vint)
|
- Introduce Vim script static analysis using [reviewdog](https://github.com/reviewdog/action-vint)
|
||||||
|
|||||||
@@ -221,6 +221,8 @@ function! s:map_keys()
|
|||||||
endif
|
endif
|
||||||
noremap <silent> <Plug>AirlineSelectPrevTab :<C-u>call <SID>jump_to_tab(-v:count1)<CR>
|
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>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
|
" Enable this for debugging
|
||||||
" com! AirlineBufferList :echo map(copy(s:current_visible_buffers), {i,k -> k.": ".bufname(k)})
|
" com! AirlineBufferList :echo map(copy(s:current_visible_buffers), {i,k -> k.": ".bufname(k)})
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -125,6 +125,8 @@ function! airline#extensions#tabline#tabs#map_keys()
|
|||||||
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>
|
||||||
|
noremap <silent> <Plug>AirlineSelectFirstTab :<C-u>:tabfirst<CR>
|
||||||
|
noremap <silent> <Plug>AirlineSelectLastTab :<C-u>:tablast<CR>
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#tabline#tabs#tabnr_formatter(nr, i) abort
|
function! airline#extensions#tabline#tabs#tabnr_formatter(nr, i) abort
|
||||||
|
|||||||
+7
-2
@@ -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
|
This matches that of the numbering scheme of |:buffers|, letting
|
||||||
`<Plug>AirlineSelectTab67` to reference buffer 67.
|
`<Plug>AirlineSelectTab67` to reference buffer 67.
|
||||||
|
|
||||||
Note: To avoid ambiguity, there won't be <Plug>AirlineSelectTab1
|
Note: To avoid ambiguity, there won't be
|
||||||
- <Plug>AirlineSelectTab9 maps in mode 2 and 3.
|
<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
|
Note: Mappings will be ignored for filetypes that match
|
||||||
`g:airline#extensions#tabline#keymap_ignored_filetypes`.
|
`g:airline#extensions#tabline#keymap_ignored_filetypes`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user