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

fortran "#if 0" syntax highlight error with folding

Expand Messages
  • Dexter Douglas
    Hello, I am trying to add support to highlight #if 0 blocks as a comment.  I have attached a fortran.vim file that seems to work.  My syntax highlighting
    Message 1 of 2 , Oct 22, 2009
      Hello,

      I am trying to add support to highlight "#if 0" blocks as a
      comment.  I have attached a fortran.vim file that seems
      to work.  My syntax highlighting is fine until I turn
      on syntax-based folding ("let fortran_fold=1" in my .vimrc file).
      When I turn on folding, all text after a 0 is colored as a
      comment.

      Any help fixing my fortran.vim syntax file will be greatly appreciated.

      Thank you.



      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Dexter Douglas
      Hello, After some trial and error, I found my problem. I needed to add my new #if 0 regions to the contains=ALLBUT regions in the folding section of the
      Message 2 of 2 , Oct 31, 2009
        Hello,

        After some trial and error, I found my problem. I needed to add my new "#if 0" regions to the "contains=ALLBUT" regions in the folding section of the fortran.vim file.

        I have attached my updated fortran.vim file in case others find it useful.

        Thanks.

        --- On Thu, 10/22/09, Dexter Douglas <luomo1138@...> wrote:

        > From: Dexter Douglas <luomo1138@...>
        > Subject: fortran "#if 0" syntax highlight error with folding
        > To: vim_use@...
        > Date: Thursday, October 22, 2009, 6:58 PM
        > Hello,
        >
        > I am trying to add support to highlight "#if 0" blocks as
        > a
        > comment.  I have attached a fortran.vim file that seems
        > to work.  My syntax highlighting is fine until I turn
        > on syntax-based folding ("let fortran_fold=1" in my .vimrc
        > file).
        > When I turn on folding, all text after a 0 is colored as a
        > comment.
        >
        > Any help fixing my fortran.vim syntax file will be greatly
        > appreciated.
        >
        > Thank you.
        >
        >
        >      
        > >
        >



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.