Disable filetype parameter when switching to any other file type?

I have this line in my .vimrc:

au filetype python set colorcolumn=80

I would prefer the color column to disappear when I switch to a non python buffer. Is there a way to do this?

+3


source to share


1 answer


Use setlocal to only set this to the buffer you want.

au filetype python setlocal colorcolumn=80

      



You can also shorten it to setl

au filetype python setl colorcolumn=80

      

+3


source







All Articles