Skip to content

critiqjo/vim-bufferline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-bufferline

Super simple vim plugin to show the list of buffers in the command bar.

Screenshots

In statusline

TODO

Configuration:
autocmd BufEnter *
    \ let &statusline='%{bufferline#refresh_status()}' .
        \ bufferline#get_status_string('StatusLine', 'StatusLineNC')

In command bar

TODO

Configuration:
let g:bufferline_echo = 1

In tabline (using lightline.vim)

screenshot

Configuration:
let g:bufferline_active_buffer_left = ''
let g:bufferline_active_buffer_right = ''
let g:bufferline_show_bufnr = 0
let g:bufferline_fname_mod = ':~:.'
let g:bufferline_pathshorten = 1

let g:lightline = {
    \   'tab': {
    \     'active': ['tabnum'],
    \     'inactive': ['tabnum']
    \   },
    \   'tabline': {
    \     'left': [ ['tabs'], ['bufferline'] ],
    \     'right': [ ['fileencoding'] ]
    \   },
    \   'component': {
    \     'bufferline': '%{MyBufferlineRefresh()}' . bufferline#get_status_string('TabLineSel', 'LightLineLeft_tabline_tabsel_1'),
    \     'fileencoding': '%{&fenc}',
    \   }
    \ }

function! MyBufferlineRefresh()
  call bufferline#refresh_status()
  let rlen = 4*tabpagenr('$') + len(&fenc) + 8
  call bufferline#trim_status_info(&columns - rlen)
  return ''
endfunction

Installation

  • pathogen

    $ git clone https://github.com/critiqjo/vim-bufferline ~/.vim/bundle/vim-bufferline
  • neobundle

    NeoBundle 'critiqjo/vim-bufferline'
  • vundle

    Plugin 'critiqjo/vim-bufferline'
  • vim-plug

    Plug 'critiqjo/vim-bufferline'

Credits

The original author was Bailey Ling, who was inspired by the buftabs script.

License

MIT License. Copyright (c) 2013 Bailey Ling.

About

Simple vim plugin to display the list of buffers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%