views:

347

answers:

1

I need to highlight anything beyond column 72 with a different background color. What's the best method? Something similar to a visible line margin that some editors do is also good. Is it possible?

Some background:

The syntax is a Pascal like, and works correctly.

Only the Background needs to change. The foreground is already highlighted as it should be. There are cases where a String will be more than 80 characters and will pass the 72 column limit, and should be highlighted as a string.

The coding standards are similar to COBOL and all characters beyond column 72 should by comment lines. These column 72 comments do start with the comment start character, and are highlighted properly.

+3  A: 

You can

:match DiffAdd '\%>72v.*'

which will highlight the characters you don't want.

(adapted from here).

Peter
This is great, but only works if the line contains characters beyond column 72. Is it possible to have it highlight even when the line contains less characters?
Ayman
not that I've come across.
Peter