Skip to content

[.clinkpromt] Can :rightfilter be used to place something on a "multiline" :filter line? #684

Answered by chrisant996
Jerakin asked this question in Q&A
Discussion options

You must be logged in to vote

Look at how Antares, bureau, Headline, and jonathan add right-aligned text on the first line.

Inside :filter() they use os.getwidth() to find the width of the terminal, console.cellcount() to find the displayed width of text (counting the characters in a string is not the same as the displayed width), and string.rep() to make a string of spaces or line characters to fill the middle area and right-justify some text on the first line.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Jerakin
Comment options

Answer selected by Jerakin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Question about something
2 participants