This question already has an answer here:

It looks pretty usefull to see where the buffer ends. For example, with help of black dashes column, like at this screenshot (look at left grey-colored border). How to implement this solution in my .emacs file?

marked as duplicate by Drew, Kaushal Modi, Stefan, Tyler, zck Oct 7 '15 at 3:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

(setq-default indicate-empty-lines t)

Or M-x toggle-indicate-empty-lines to turn it on and off.

This only works with a GUI because it uses the fringe.

Read more:




I've written a package, char-font-lock, that (among else) highlight empty lines at the end of a buffer.

It also highlights the last line (in case it doesn't end with a newline), space at the end of lines, tab characters, and non-ascii characters. You can cherry pick which of the things you would like to highlight.

For example: enter image description here


Not everyone is happy with it, but whitespace-mode is included with Emacs since version 23. It does a good job of showing the end of a file and any extra blank lines, along with showing the ends of lines and distinguishing tabs from spaces. The faces used are of course configurable--I keep the colors bright because I only use the mode occasionally. Here is an example of editing XML with whitespace-mode enabled in conjunction with linum-mode (which produced the line numbers in the fringe), giving a very vi-ish look to the window:

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.