Identify text crossing the 80 char limit in vim
28 Jul 2014First we assume a spherical cow with a vt100
If you use the Kernel coding style, one of the more taxing issues is staying within the 80 char limit. Instead of using something like checkpatch.pl to identify code failing this requirement after creating patches, you can use vim’s inbuilt long line highlight options to identify offending lines in code. The following snippet will highlight all any text that crosses virtual column 80
If you prefer something less in your face, the following snippet will only highlight characters at column 81
You can also directly add these to your .vimrc file, removing the colon the at the start. More details can be found at the vim help page
comments powered by Disqus