Home

Awesome

overlength.vim

Highlight when lines go over the length that you want them.

Usage

This plugin is on by default when you install it :smile:

To toggle or turn it off, you can do the following:

call overlength#toggle():

Configuration

Example configuration:

let overlength#default_overlength = 120

" Disable highlighting in markdown.
call overlength#set_overlength('markdown', 0)

" To disable highlighting in multiple fts at once
call overlength#disable_filetypes(['markdown', 'term'])

" Highlight only at 120 characters in vim, even though textwidth = 78
call overlength#set_overlength('vim', 120)

overlength#default_to_textwidth:

call overlength#set_overlength(filetype, length):

overlength#default_overlength:

overlength#default_grace_legnth:

call overlength#set_highlight(cterm, guibg):

overlength#highlight_to_end_of_line:

Note on Multi Width Bug

I cannot figure out how to solve the problem for the case where overlength#highlight_to_end_of_line is set to v:false (i.e., you only want highlighting on the column only, not the whole line) due to the vim limitation of:

	Note that some virtual column positions will never match, because they
	are halfway through a tab or other character that occupies more than
	one screen character.

So, sometimes the highlighting will miss. If this bothers you, please leave an issue and maybe I can fix it.