This question already has an answer here:

I'm new to Vim and I'm trying to include a line length marker, but only in Python files. As far as I know, this line length marker can be added to Vim by using set colorcolumn=<number> in the .vimrc. That code adds a column everywhere in Vim, like the Explorer. How can I restrict it only to Python files?

marked as duplicate by Tumbler41, Herb Wolfe, Sundeep, Martin Tournoij Mar 2 '17 at 12:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I've already find out how this is. I had to use autocmd FileType python setlocal colorcolumn=79.

Not the answer you're looking for? Browse other questions tagged or ask your own question.