Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7565207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:05:42+00:00 2026-05-30T14:05:42+00:00

I am reading fortran 77 code (which I hate!) and in order to keep

  • 0

I am reading fortran 77 code (which I hate!) and in order to keep vim from coloring the lines weirdly after line 72, I included let fortran_free_source=1 before the syntax on line in my .vimrc.

However, after doing this, all comments which begin with ‘C’ or ‘c’ are not colored the way comments should be colored. Only comments which begin with ‘!’ are colored correctly. How should I edit my .vimrc file so that comments in the old fortran style are colored correctly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:05:44+00:00Added an answer on May 30, 2026 at 2:05 pm

    New answer:
    Add to your .vimrc let fortran_have_tabs=1 that should get rid of it. The only side effect will be that tabs are no longer highlighted.

    Old answer:

    I wouldn’t know any direct solution for this but a dirty hack would be to copy the fortran.vim in your syntax folder and remove line 332:

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

    if you call it myfortran.vim (in your ~/.vim/syntax folder) you can use set syntax=myfortran. I’m sure there must be a more elegant way but this should work.

    If you leave it as fortran.vim then only the file in ~/.vim/syntax will be loaded and not the one in /usr/yourvimdir/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today I was reading code from some very popular numerical libraries written in FORTRAN
Reading code from other posts, I'm seeing something like this. struct Foo { Foo()
Reading this question I found this as (note the quotation marks) code to solve
Reading source code of sample projects, such as Beast and Bort, are recommended as
reading excel files from C# working well in 32 bit version server. It is
I have been reading the code used by R to fit a generalized linear
I'm working with a legacy + academic + numerical fortran-77 code that requires g77
Reading source code of my current project, I see: [self retain] in one class,
Reading this site, I've found this : [The] line private static final Foo INSTANCE
My boss just asked me to integrate his bosses old Fortran code into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.