Skip to content
Zeioth edited this page Mar 3, 2024 · 5 revisions

You can call the functions from heirline-components.buffer to manipulate your tabline from your keymappings, or just from lua.

Available functions

To learn about all accepted parameters, check buffer.lua.

Function Description
move() Move the current buffer tab n places in the component tabline_buffers.
nav() Navigate left and right by n places in the component tabline_buffers.
nav_to() Navigate to a specific buffer by its position in the component tabline_buffers.
close() Close a given buffer.
wipe() Close the current window.
close_all() Close all buffers.
close_left() Close buffers to the left of the current buffer.
close_right() Close buffers to the right of the current buffer.
sort() Sort a the buffers in the current tab based on the specified criteria. Accepted values are "bufnr", "extension", "full_path", "unique_path", "modified".
close_tab() Close the current tab.

Example keymappings

You can take the mappings of NormalNvim as reference of how to use these functions in a practical way.

Clone this wiki locally