History Report a problem
Article Edit this page Discussion

Fortran highlighting problems

From Vim Tips Wiki

Jump to: navigation, search

Tip 449 Previous TipNext 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:

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pushing Daisies
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Astronomy Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions


Vote for featured Wikia!

Send this article to a friend
"Fortran highlighting problems"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation