Lister reference¶
Listers are special segment collections which allow to show some list of segments for each entity in the list of entities (multiply their segments list by a list of entities). E.g. powerline.listers.vim.tablister presented with powerline.segments.vim.tabnr and ….file_name as segments will emit segments with buffer names and tabpage numbers for each tabpage shown by vim.
Listers appear in configuration as irregular segments having segment_list as their type and segments key with a list of segments (a bit more details in Themes section of configuration reference).
More information in Writing listers section.
Currently only Vim listers are available.
Vim listers¶
- powerline.listers.vim.bufferlister(show_unlisted=False)[source]¶
List all buffers in segment_info format
Specifically generates a list of segment info dictionaries with buffer and bufnr keys set to buffer-specific ones, window, winnr and window_id keys set to None.
Adds either buf: or buf_nc: prefix to all segment highlight groups.
Parameters: show_unlisted (bool) – True if unlisted buffers should be shown as well. Current buffer is always shown.
- powerline.listers.vim.tablister()[source]¶
List all tab pages in segment_info format
Specifically generates a list of segment info dictionaries with window, winnr, window_id, buffer and bufnr keys set to tab-local ones and additional tabpage and tabnr keys.
Adds either tab: or tab_nc: prefix to all segment highlight groups.
Works best with vim-7.4 or later: earlier versions miss tabpage object and thus window objects are not available as well.