Linux, plaintext & minimalism
October 1, 2019

How to visually highlight long lines in Vim

I couldn’t find this documented somewhere and I had to do some reading before figuring it out myself, so I might as well document it here. What I’m talking about is the feature in Vim that let’s you visually highlight long lines.

You can manually enable it with the command :set colorcolumn=<Value> and it will work for that session. But manually enabling it or statically enabling it wasn’t any options either, I only wanted to enable it for Bash- and Python-files and after some reading I figured it out:

au BufWinEnter *.sh,*.py set colorcolumn=80
Tag: Vim


I don't have a commenting system simply because I haven't found a solution that I like. If you want to leave any feedback and/or have any questions feel free to contact me either via e-mail, the fediverse, by XMPP or by IRC (I'm Hund at freenode.net).