tabline: only map keys if not done yet
Should improve performance by not steadily remapping keys
This commit is contained in:
parent
b2f301f73c
commit
62952b3887
@ -97,6 +97,9 @@ function! airline#extensions#tabline#tabs#get()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#tabline#tabs#map_keys()
|
function! airline#extensions#tabline#tabs#map_keys()
|
||||||
|
if exists("s:airline_tabline_map_key")
|
||||||
|
return
|
||||||
|
endif
|
||||||
noremap <silent> <Plug>AirlineSelectTab1 :1tabn<CR>
|
noremap <silent> <Plug>AirlineSelectTab1 :1tabn<CR>
|
||||||
noremap <silent> <Plug>AirlineSelectTab2 :2tabn<CR>
|
noremap <silent> <Plug>AirlineSelectTab2 :2tabn<CR>
|
||||||
noremap <silent> <Plug>AirlineSelectTab3 :3tabn<CR>
|
noremap <silent> <Plug>AirlineSelectTab3 :3tabn<CR>
|
||||||
@ -109,4 +112,5 @@ 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>
|
||||||
|
let s:airline_tabline_map_key = 1
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user