Loading ...
Sorry, an error occurred while loading the content.
 

Fortran settings and indent files

Expand Messages
  • Ajit J. Thakkar
    Here is a first stab at settings and indent files for Fortran Ajit Vim indent file Language: Fortran90 (and Fortran95, Fortran77, F and elf90) Version:
    Message 1 of 4 , Sep 6, 2000
      Here is a first stab at settings and indent files for Fortran

      Ajit
    • Martin Kahlert
      ... [..] i would replace the line if getline(lnum) !~ ^ s*$ in the first version by something like that: if getline(lnum) !~ ^ ( s*$ ) |[c*] Testcase: X =
      Message 2 of 4 , Sep 6, 2000
        On Wed, Sep 06, 2000 at 09:22:59AM -0300, Ajit J. Thakkar wrote:
        > Here is a first stab at settings and indent files for Fortran
        [..]
        i would replace the line
        if getline(lnum) !~ '^\s*$'
        in the first version by something like that:
        if getline(lnum) !~ '^\(\s*$\)\|[c*]'

        Testcase:
        X = X + 1
        C Hello World!
        IF (X .eq. 1) THEN
        X = X + 2
        ENDIF

        Another problem will be labels:
        10 CONTINUE


        Bye,
        Martin.

        PS: Is there a possibility to indent
        IF (X .eq. 1) THEN
        10 CONTINUE
        X = X + 2
        ENDIF
        into
        IF (X .eq. 1) THEN
        10 CONTINUE
        X = X + 2
        ENDIF
        ?

        --
        The early bird gets the worm. If you want something else for
        breakfast, get up later.
      • Ajit J. Thakkar
        ... Quite right! The current version of the indent file does reasonably well only with free format source code. A good indent file for fixed format source code
        Message 3 of 4 , Sep 7, 2000
          Martin Kahlert wrote:
          >Another problem will be labels:

          Quite right! The current version of the indent file does reasonably well
          only with free format source code. A good indent file for fixed format
          source code will require some work.

          Cheers
          Ajit
        • Ajit J. Thakkar
          v0.2 at http://www.unb.ca/chem/ajit/vim.htm handles fixed format source code better than v0.1 but lots needs to be done --- especially with tabs Ajit
          Message 4 of 4 , Sep 12, 2000
            v0.2 at http://www.unb.ca/chem/ajit/vim.htm handles fixed format source
            code better than v0.1 but lots needs to be done --- especially with tabs

            Ajit
          Your message has been successfully submitted and would be delivered to recipients shortly.