I have code written in Fortran 77 and I read it using vim. The code is written in such a way that the comments are in lines starting with c, as is customary in Fortran 77. However, vim does not recognize them and therefore uses coloring syntax, which makes the code very difficult to read! How can I overcome this?
I saw that there is a message with the same problem . I read the answers and tried the various solutions that were suggested:
add let fortran_have_tabs=1to .vimrc
add
syn match fortranComment excludenl "^[!c*].*$" contains=@fortranCommentGroup,@spell
syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell
to.vimrc
but they do not work for me. Does anyone know why? Am I mistaken somewhere? Otherwise, does anyone have any other suggestion?