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

Re: Fortran settings and indent files

Expand Messages
  • 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 1 of 4 , Sep 6, 2000
    • 0 Attachment
      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 2 of 4 , Sep 7, 2000
      • 0 Attachment
        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 3 of 4 , Sep 12, 2000
        • 0 Attachment
          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.