How to setup a line length marker in vim

C
:set colorcolumn=80

Press ESC in command mode and set like below
:set colorcolumn=n
for example: 'n' is the 80th character. 
which will display vertical marker line at 80th character.

Source

Also in C: