Mode line's %p displays the percentage of the current view of the buffer:
%p The percentage of the buffer text above the top of window, or ‘Top’, ‘Bottom’ or ‘All’. Note that the default mode line construct truncates this to three characters.
I don't like the Top/Bottom/All and I'd like to always display the percentage. Is there a way to achieve this?
Topmeans 0%.Bottommeans 100%.Allmeans 100% and the top is visible too. You can do pretty much anything you like to the mode line, but in this case it would be a pain to monkey with this. Note that you can easily reverse the percentage direction - see%P(instead of%p). – Drew Mar 22 '15 at 16:00point-minandwindow-start, andwindow-endandpoint-max, and if so desired, the size of the visible buffer could be factored in -- i.e., points betweenwindow-starttowindow-end-- those calculations could be done in a blink of an eye and would not affect performance because point does not move. Those buffer-size calculations could be turned into percentages. I believe that this is an answer, but I'll let someone else write it up because I have other projects on my plate today. – lawlist Mar 22 '15 at 18:24