I have seen some solutions on here which will highlight an entire line if it goes beyond 80 characters, and also to do a line-wrap
once the line becomes greater than 80. What I would like to do is to edit my .emacs
file so that any character beyond 80 takes on a different background. So the first 80 characters will have my current emacs background, then characters > 80 would have a black background say. Can someone point me in the right directions? Thanks!
I recently wrote an extensive article on the subject. Here's the gist of it:
(require 'whitespace)
(setq whitespace-line-column 80) ;; limit line length
(setq whitespace-style '(face lines-tail))
(add-hook 'prog-mode-hook 'whitespace-mode)
Here are some other solutions that people use, in addition to the one that @BozhidarBatsov mentions:
column-marker.el
-- highlight any column(s)fill-column-indicator.el
-- highlight the fill columnmode-line-posn.el
-- highlight column number in mode line when greater than limitwide-column.el
-- highlight cursor when column passes limitSee also:
(FWIW, my personal preference is mode-line-posn.el
--- less intrusive, just the right amount of indication.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With