Fortran highlighting problems
From Vim Tips Wiki
Tip 449 Previous Tip • Next Tip
Created: March 26, 2003 Complexity: basic Author: Fabien Bouleau Minimum version: 6.0 Karma: 4/4 Imported from: Tip#449
Sometimes the FORTRAN syntax file doesn't set the correct source form.
So if you want to choose it by yourself, add the following line in your vimrc file:
au BufNew *.for let b:fortran_fixed_source=1 " set the correct value
The other way to do this is to change the file extension (F77/F90/F95), but it might be a long and/or hazardous work for big projects...
[edit] Comments
This one placed before "syntax on" works better:
au BufRead *.for let b:fortran_fixed_source=1
You can also add the following line to a source file:
C vim:set ft=fortran:
Categories: Review | VimTip | LanguageSpecific | Syntax
