Menu

#615 highlighting of fortran-77 columns in Editor

Undefined
applied
Patch
2021-05-07
2018-02-07
nickkuz
No

Introduce new option in C::B editor settings: to highlight columns in fixed-form fortran code.
Although obsolete, this form is widely used in legacy fortran code such as f77.
There are a lot of classic source code suppplied in f77 sources.
Proper highlighting in editor can help to identify a number of errors as early as possible.
f77 code highlighting is desirable to use by default for source code files with extensions ".f", ".for", "*.f77".
In f77, line length is limited to 72 characters. This limit should be highlighted by line.
In each line, characters from 1 to 5 are reserved for numeric labels (columns from 1 through 5).
Column 6 is reserved for line continuation mark. Fortran operators occupy columns from 7-th through 72.
It is desireble to highlight 6-th column by it own background color, which is slightly different from overall background color. E.g., if overall background is white, the choice of light green background for 6-th column is quite OK.

Discussion

  • Teodor Petrov

    Teodor Petrov - 2018-02-07

    If this is supported in scintilla/scite we could do it. Otherwise someone needs to first add such lexer to scintilla and then we could use it.

     
  • darmar

    darmar - 2018-02-23

    I think, it is possible to change the background of 6-th column in C::B settings:
    Settings->Editor->Syntax highlighting, Fortran77. Change color for "Continuation".

    I think, it would be good to add this change to the default color scheme in C::B. I could provide the patch.

     
  • Teodor Petrov

    Teodor Petrov - 2018-02-23

    @darmar: Please do so. Thank you.

     
    • darmar

      darmar - 2018-02-26

      The required patch file is attached.

       
      • Teodor Petrov

        Teodor Petrov - 2018-02-27

        Can you provide a commit message, too?

         
  • darmar

    darmar - 2018-02-28
    • Changed the default color for the continuation column in Fortran77 lexer.
     
  • Teodor Petrov

    Teodor Petrov - 2021-05-06
    • status: open --> applied
    • assigned_to: Teodor Petrov
    • Type: Feature_Request --> Patch
     
  • Teodor Petrov

    Teodor Petrov - 2021-05-06

    Applied in trunk. Sorry for the delay.

     
  • darmar

    darmar - 2021-05-07

    Thank you, Teodor.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.