How can I make emacs highlight lines that go over 80 chars?

后端 未结 8 1543
不思量自难忘°
不思量自难忘° 2020-12-01 02:18

I know there are solutions to making emacs show the 80 line column, but I don\'t want that sort of visual disturbance. I\'d just like to make it highlight a line if it\'s ov

8条回答
  •  抹茶落季
    2020-12-01 02:45

    This is not exactly what you wanted, but I had a similar problem and found this question/answer. All I wanted was to insert a visual guide, when I needed it. This is what I finally ended up with:

    (defun insert-80 ()
        "Insert an 80-character-wide guide at beginning of line."
        (interactive)
        (beginning-of-line)
        (insert "0         1         2         3         4         5         6         7         |")
        (newline)
        (insert "01234567890123456789012345678901234567890123456789012345678901234567890123456789|")
        (newline)
    )
    

    Super simple, but sometimes very effective.

提交回复
热议问题