Fortran_free_source terminates vim comment syntax schedule

I am reading the fortran 77 code (which I hate!), And so that vim doesn't stain the lines weirdly after line 72, I included let fortran_free_source=1before the line syntax onin my .vimrc.

However, after that, all comments starting with 'C' or 'c' are not colored, as comments should be colored. Only comments starting with '!' correctly painted. How do I modify a .vimrc file so that old fortran style comments are correctly colored?

+1
source share
3 answers

New answer: Add to your .vimrc let fortran_have_tabs=1, which should get rid of it. The only side effect is that the tabs no longer stand out.

:

, fortran.vim 332:

    syn match fortranSerialNumber       excludenl "^.\{73,}$"lc=72

myfortran.vim( ~/.vim/), set syntax = myfortran. , , .

fortran.vim, ~/.vim/, /usr/yourvimdir/

+2

. Vim 72- , , , .

, , , , ,

hi! link fortranSerialNumber fortranString

...

+2

~/.vimrc/after/syntax/fortran.vim:

syn match fortranComment excludenl "^[!c*].*$" contains=@fortranCommentGroup,@spell
syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell

Fortran, , .

Everything in ~ / .vimrc / after / syntax / starts after parsing the default syntax highlighting file. The two lines above are in my copy of fortran.vim, but are inside the statements if, so they do not always take effect.

You can add d inside the first line "^[!cd*].*$"if you want to highlight non-standard comment lines of "d".

0
source

All Articles