Skip to content

Highlight text that extends beyond a certain column. Can be used to enforce 80 column rule (well more like suggest, not enforce)

Notifications You must be signed in to change notification settings

jordonbiondo/column-enforce-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 

Repository files navigation

column-enforce-mode

Highlight text that extends beyond a certain column.

This mode is meant to be a very lightweight, zero configuration, way to help enforce the 80 column rule. It can be configured for any N-column rule however.

What it looks like enforcing the 80 column rule:

http://i.imgur.com/EezaOo9.png

Usage

Start it up interactively on the current buffer,

default startup:
M-x: column-enforce-mode 

or by specific rule function
M-x: 80-column-rule

or with a prefix arg specifying the column limit
C-u 90 M-x column-enforce-n

or tie it to a major mode:

(add-hook 'c-mode-hook 'column-enforce-mode)

tie it to all source code modes:

(add-hook 'prog-mode-hook 'column-enforce-mode)

or enable globally

(global-column-enforce-mode t)

Allowing long comments

By default column-enforce-mode will mark comments that exceed the limit. You can allow long comments in your code with:

(setq column-enforce-comments nil)

Customizing the column

(setq column-enforce-column <your desired column>)

Customizing the look

Customize `column-enforce-face’ to change the look of the mode

About

Highlight text that extends beyond a certain column. Can be used to enforce 80 column rule (well more like suggest, not enforce)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •