Emacs 26.1 I use smart mode line: https://github.com/Malabarba/smart-mode-line
Nice. It's work fine.
But I need to show % near rows and columns. Something like this:
712:93 (17%)
Is it possible?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityEmacs 26.1 I use smart mode line: https://github.com/Malabarba/smart-mode-line
Nice. It's work fine.
But I need to show % near rows and columns. Something like this:
712:93 (17%)
Is it possible?
EDIT
I loaded up smart-mode-line
myself, and took a more in depth look.
As a smart-mode-line
user you'll need to edit your theme. Using the default smart-mode-line-powerline-theme.el
as an example, at line 80 you'll find sml/position-percentage
. Move this whole line up to line 63 ie: just below sml/line-number
. This should get the effect you want.
Note that smart-mode-line
uses the Customize
facility. It may be easier (and saner) to make these changes there. Unfortunately you can't change the mode line format there. Only the faces.
To change the mode line format you'll want to study Mode Line Format from the GNU Emacs Lisp Reference Manual. Pay special attention to the variables mode-line-format
and mode-line-position
. You'll need to move mode-line-position
to where you want it with in mode-line-format
. You can customize mode-line-format
if you wish. You can reach its customize group by doing: Meta+x customize-group Return mode-line Return
It may just be easier to request that an easy way to reorder the mode line be added to smart-line-mode
.
mode-line-format
is an ordered list that represents the order of the items in your mode line. If you want to move an item on your mode line, you have to move that item's symbol in mode-line-format
. In other words change mode-line-format
so it's in a different order.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Data.html