Red Hat Bugzilla – Bug 1256148
VIM's Fortran syntax file doesn't allow one to set "free form" syntax
Last modified: 2016-05-04 03:43:06 EDT
Description of problem:
When VIM is loaded with a free-form file, or if "fortran_free_source" is set, VIM still loads "fixed form" syntax highlighting.
Version-Release number of selected component (if applicable):
(does not occur for vim-enhanced-7.4.475-2.fc21)
Steps to Reproduce:
1. vim test.f90
2. type "iprogram test" (leading 'i' is to go into insert mode)
3. Save file and exit VIM
4. vim test.f90
Both times, file is highlighted as if fixed-form syntax file (despite .f90 extension), with column 1 as an error and column 6 as a line-continuation highlight. From what I can tell, VIM in Fedora 22 NEVER lets you view free-form files.
Second time, file is highlighted with "program" as a block delimiter, as in free-form syntax.
This does not happen in my Fedora 21 installations---those behave as expected and obey "let fortran_free_source=1".
please update to vim-7.4-1718-1.fc22. I've tested it with your steps from comment #1 and it looks ok to me. The first pass hightlighted characters 1 and 6, the second marked the whole word 'program' as a keyword.
Please note that it might take a while for that new vim package to make it to the mirrors.
Oddly, this bug seems to have been caused because another bug got FIXED---I had (unbeknownst to me until today) a rogue command in my .vimrc files that contained a typo ("fixed" instead of "free"), but it was being ignored in older versions. The latest version evidently fixed that bug, which revealed my typo. So we've now fixed two bugs!