I want to mark the
textwidthth column using
colorcolumn and have used
the following (since I have slightly different
textwidths for different files)
au FileType py set textwidth=80 (say line 98) au FileType c set textwidth=79 (say line 99) let &colorcolumn=&textwidth (say line 100)
As you can see I have made sure that
textwidth has been defined before
colorcolumn is being set. I have also checked the output of the following commands
:verbose set textwidth? textwidth=79 Last set from my_vimrc line 99 :verbose set colorcolumn? colorcolumn=0 Last set from my_vimrc line 100
As you can see the value is
0 even though no other file is changing the value. Any reason why this might be happening ?
On a related note, vim is not breaking lines at 79 characters within
.c file even though
textwidth is set to
79. Could this also be a part of the problem ??