Vim Tips Wiki
Advertisement

Previous TipNext Tip

Tip: #449 - Fortran highlighting problems

Created: March 26, 2003 4:23 Complexity: basic Author: Fabien Bouleau 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...

Comments

This one placed before "syntax on" works better:

au BufRead *.for let b:fortran_fixed_source=1 

FB

syrion--AT--freesbee.fr , March 26, 2003 5:50


You can also add the following line to a source file:

C vim:set ft=fortran: 


Anonymous , March 26, 2003 23:34


Advertisement