Also show percentage of file in the modeline
This commit is contained in:
parent
6198dfb726
commit
17b01d3eb5
3
init.el
3
init.el
|
@ -1081,7 +1081,8 @@ specific to most general, they are these:
|
||||||
word-wrap t
|
word-wrap t
|
||||||
wrap-prefix (repeat-string acdw-irc/left-margin " ")
|
wrap-prefix (repeat-string acdw-irc/left-margin " ")
|
||||||
line-number-mode nil
|
line-number-mode nil
|
||||||
column-number-mode nil)
|
column-number-mode nil
|
||||||
|
file-percentage-mode nil)
|
||||||
|
|
||||||
(:hook #'enable-lui-track)))
|
(:hook #'enable-lui-track)))
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,10 @@ indicator in the mode-line."
|
||||||
'mouse-2 #'mode-line-widen))
|
'mouse-2 #'mode-line-widen))
|
||||||
'mouse-face 'mode-line-highlight))))
|
'mouse-face 'mode-line-highlight))))
|
||||||
|
|
||||||
|
(define-minor-mode file-percentage-mode
|
||||||
|
"Toggle the percentage display in the mode line (File Percentage Mode)."
|
||||||
|
:init-value t :global t :group 'mode-line)
|
||||||
|
|
||||||
(defun acdw-modeline/position ()
|
(defun acdw-modeline/position ()
|
||||||
"Displays the current cursor position in the mode-line.
|
"Displays the current cursor position in the mode-line.
|
||||||
|
|
||||||
|
@ -140,7 +144,10 @@ is, if point < mark."
|
||||||
((column-number-mode
|
((column-number-mode
|
||||||
(column-number-indicator-zero-based
|
(column-number-indicator-zero-based
|
||||||
(5 " C%c")
|
(5 " C%c")
|
||||||
(5 " C%C")))))
|
(5 " C%C")))
|
||||||
|
" "))
|
||||||
|
(file-percentage-mode
|
||||||
|
(7 "%p%% "))
|
||||||
,(if (region-active-p)
|
,(if (region-active-p)
|
||||||
(propertize (format "%s%-5d"
|
(propertize (format "%s%-5d"
|
||||||
(if (and (mark)
|
(if (and (mark)
|
||||||
|
|
Loading…
Reference in New Issue