Menu

Both code folding and code block highlighting

smd
2008-09-24
2012-11-13
  • smd

    smd - 2008-09-24

    Hi,

    I wanted to use code block folding and coloring with normal txt files, by defining "tags" for open and close comment block.. So this is what I did:

    View / User Define Dialog - make new User Language, then choose from Language menu option

    Then, under Folder & Default, I define /. as folder open keyword, and ./ as folder close keyword, and give foreground colors. This opens a code block, and colors the "tags" (/. and ./) but not the contents.

    If I instead go under Comment & Number tab, and do the same, entire block is colored, but there is no folding.

    A workaround is to define /. and ./ for code block folding, and /, and ,/ for comment, give the same foreground colors, and use

    /. /,
    write comments here
    write comments here
    ,/ ./

    as both colored and block-folded piece of text. Note the space between the two is required.

    Anyhow, I'd much rather only use a single /* instead of '/. /,' - is there any posibbility for that? What about adding a checkbox under Comment & Number saying "Treat as code block" which would allow this functionality to be applied to comment blocks?

    Cheers...

     
    • smd

      smd - 2008-09-24

      PS: Just tried this trick with 5.1 beta unicode, and it doesn't work :) goin' back to 5.0.3...

       
      • Don HO

        Don HO - 2008-09-24

        Then it'll be fixed.

        Don

         
    • Don HO

      Don HO - 2008-09-24

      I'll check the source code to see if your fr is possible, but I promise you nothing.

      Don