1

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?

6
(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:

http://www.gnu.org/software/emacs/manual/html_node/emacs/Useless-Whitespace.html

http://www.gnu.org/software/emacs/manual/html_node/elisp/Fringe-Indicators.html

4

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

1

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.