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

Folding C comments

Expand Messages
  • Jay Heyl
    Sorry if this has been answered before. I searched the group (and most everywhere else online) and was not able to find an answer. The project I m working on
    Message 1 of 1 , Jun 30, 2009
      Sorry if this has been answered before. I searched the group (and most everywhere else online) and was not able to find an answer.

      The project I'm working on is using C and that coding standard specifies the use of single-line comments only. ("//" only, not "/* ... */")

      I love using the folding mechanism and it works pretty well out of the box except for the file and function headers that are consecutive lines with "//" at the beginning of the line. When I open a file I effectively see nothing but headers. Not at all what I want. I want those comment blocks to fold as a single region.

      Does anyone know of a way to get consecutive single-line comments, even if it's only comments that begin in the first column, to fold like other blocks of code?

      I experimented a bit and found a way that was close, but it folded the line after the comment block into the comment block region. This didn't work at all for functions that had the function header end on the immediately preceding line.

      Any help on this would be greatly appreciated.

        -- Jay

      --~--~---------~--~----~------------~-------~--~----~
      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.