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

56240Re: hiding comments

Expand Messages
  • Vigil
    Feb 1, 2005
    • 0 Attachment
      I adapted this for /* */ comments and it works when I type it in manually,
      but it seems to be ignored when I put it in vimrc. What could I be doing

      sy region myfold start="^/\*" end="\*/$" fold transparent contains=ALLBUT,myfold


      On Tue, 1 Feb 2005, Wind sonic_wind-at-tut.by |Vim| wrote:

      > Hello David,
      > try this:
      > :sy region myFold start="^#@" skip="^#@" end="^\(#@\)\@!" fold transparent
      > Let me know if I missed something: I have little knowledge about Python.
      > Tuesday, February 1, 2005, 3:32:45 AM, you wrote:
      > DS> I would like to cause comment blocks in Python code to be folded away
      > DS> (or use some similar mechanism) independently of like indented,
      > DS> non-comment lines.
      > DS> In particular, I am using Vim with the outlining tool, Leo, which places
      > DS> marker lines in Python code files that start with '#@'. I would like to
      > DS> treat those blocks as deeply folded block since I never need to see it.
      > DS> But I can't seem to get folding to think take care of those comment
      > DS> lines and subsequently the rest of the Python file.
      > DS> In this snippet, I would like to treat lines 1 and 2 as a single,
      > DS> independent, block to be folded:
      > DS> 1 #@mark some section
      > DS> 2 #@<<vim plugin>>
      > DS> 4 #I hope I can read this comment even
      > DS> 5 #when the previous lines are folded
      > DS> 5 def open_in_vim():
      > DS> 6 open_best_editor('Vim')
      > DS> Any direction is appreciated.
      > DS> David S.


    • Show all 6 messages in this topic