Minor enhancement for tabline

Show index (not buf number) of each buffer.
Add key mappings to switch to a buffer easily using the index.
Thanks. Changes done and commits squashed..

On Sun, Sep 14, 2014 at 12:52 PM, Bailey Ling <notifications@github.com>
wrote:

> In autoload/airline/extensions/tabline.vim:
>
> > @@ -210,6 +211,10 @@ function! s:get_buffers()
> >      endif
> >    endif
> >
> > +  if s:buffer_idx_mode
> > +    let g:airline#extensions#tabline#buffer_idx_mode_buffers = []
>
> you would first define it as a script-scope variable, like so:
>
> let s:buffer_idx_mode_buffers = []
>
> and to expose it for mappings, you would use <plug>, like so:
>
> noremap <unique> <Plug>AirlineSelectTab0 :call <sid>select_tab(0)<cr>
>
> and then you should be able to do something like this in your vimrc:
>
> nmap <leader>0 <Plug>AirlineSelect0
>
> see here
> <http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_3)>
>
> haven't tried it yet, but should work...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/bling/vim-airline/pull/589/files#r17522021>.
>



-- 
With Regards,

Yu Huang

Software Engineer,
Google Inc.