Skip to content

Mini.statusline customisation #1491

Closed Answered by echasnovski
Klvxn asked this question in Q&A
Discussion options

You must be logged in to vote

Aside from unreasonably increasing the value of trunc_width , is there a way to get the short output for sections in the status line?

An answer to the exact question is a "No". However, most of the sections are more or less thin wrappers around built-in 'statuslin' syntax. So...

For instance, fileinfo returns filetype, encoding, format and file size. however what I'm only interested in seeing are just filetype and encoding.

Instead of section_fileinfo(), use something like this:

local fileinfo = vim.bo.filetype

if fileinfo ~= '' then
  fileinfo = string.format('%s %s[%s]', fileinfo, vim.bo.fileencoding or vim.bo.encoding, vim.bo.fileformat)
end

See section_fileinfo() code for more de…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Klvxn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants