I am reading fortran 77 code (which I hate!) and in order to keep vim from coloring the lines weirdly after line 72, I included let fortran_free_source=1 before the syntax on line in my .vimrc.
However, after doing this, all comments which begin with ‘C’ or ‘c’ are not colored the way comments should be colored. Only comments which begin with ‘!’ are colored correctly. How should I edit my .vimrc file so that comments in the old fortran style are colored correctly?
New answer:
Add to your .vimrc
let fortran_have_tabs=1that should get rid of it. The only side effect will be that tabs are no longer highlighted.Old answer:
I wouldn’t know any direct solution for this but a dirty hack would be to copy the fortran.vim in your syntax folder and remove line 332:
if you call it myfortran.vim (in your ~/.vim/syntax folder) you can use set syntax=myfortran. I’m sure there must be a more elegant way but this should work.
If you leave it as fortran.vim then only the file in ~/.vim/syntax will be loaded and not the one in /usr/yourvimdir/