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

foldmethod=indent -> How to fold comment lines?

Expand Messages
  • Asis Hallab
    Dear Vimers, I have the following fold settings in my .vimrc: set foldmethod=indent set foldlevelstart=1 set foldminlines=1 Unfortunately comment lines are not
    Message 1 of 2 , Dec 6, 2012
    View Source
    • 0 Attachment
      Dear Vimers,

      I have the following fold settings in my .vimrc:
      set foldmethod=indent
      set foldlevelstart=1
      set foldminlines=1

      Unfortunately comment lines are not folded away,
      while code lines are. See attached example.
      (Btw I apologize for sending a screenshot to an audience that loves
      the purity of text terminals.) 

      Does anyone know, how to make vim fold comment lines, too?

      Kind regards!

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Ben Fritz
      ... Note changing this will fold the function into the comments that have the same indent level. If you don t want this you ll need to use a different
      Message 2 of 2 , Dec 6, 2012
      View Source
      • 0 Attachment
        On Thursday, December 6, 2012 9:54:53 AM UTC-6, Asis Hallab wrote:
        > Dear Vimers,
        >
        >
        > I have the following fold settings in my .vimrc:
        > set foldmethod=indent
        > set foldlevelstart=1
        > set foldminlines=1
        >
        >
        > Unfortunately comment lines are not folded away,
        >
        > while code lines are. See attached example.
        > (Btw I apologize for sending a screenshot to an audience that loves
        > the purity of text terminals.) 
        >
        >
        > Does anyone know, how to make vim fold comment lines, too?
        >

        :help fold-indent

        Which refers you to:

        :help 'foldignore'

        Note changing this will fold the function into the comments that have the same indent level. If you don't want this you'll need to use a different foldmethod.

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.