Add rulerfmt
option for improved ruler customization
#1386
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
While the current
ruler
option can be used to configuring the contents of the ruler, it lacks the ability to customize styles and colors, and is also inconsistent with other UI options such aspromptfmt
andstatfmt
. This change builds upon the existing design ofstatfmt
and applies it to the ruler, and encourages the deprecation of the existingruler
option.Specification
%a
is the pressed keys%p
is the progress of file operations%m
is the number of files to be cut (moved)%c
is the number of files to be copied%s
is the number of selected files%f
is the filter%i
is the position of the cursor%t
is the number of files shown in the current directory%h
is the number of files hidden in the current directory%d
is the amount of free disk space remaining.%{lf_<name>}
for the value of options (e.g.%{lf_selmode}
)%{lf_user_<name>}
for the value of user-defined options (e.g.%{lf_user_foo}
)|
to divide the ruler into sectionsExamples
Display information about the cursor position:
Display the number of cut/copied/selected files, only if there are any:
Display the filter in blue with reversed colors:
Display the filter in blue with reversed colors and surrounded by spaces:
Display the value of the
selmode
option:Display the value of a user defined option: