Results 1 to 8 of 8

Thread: Gedit plugin to collapse blocks

  1. #1
    Join Date
    Jun 2009
    Beans
    1,618
    Distro
    Xubuntu 12.04 Precise Pangolin

    Gedit plugin to collapse blocks

    I'm looking for a gedit plugin to collapse blocks of code/text, anyone know of one? (Like with little +/- icons near the line numbers)
    Comitas. Brevitas. Nulla ambitio.

  2. #2
    Join Date
    Jun 2009
    Beans
    1,618
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Gedit plugin to collapse blocks

    Nowhere? Aww cmon, last thing I need is to have to run notepad++ in wine...
    Comitas. Brevitas. Nulla ambitio.

  3. #3
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Gedit plugin to collapse blocks

    No, there isn't one. It's often requested feature, but would require major changes to the GtkSourceView library that Gedit uses to show the source code. Collapsing code blocks would of course require the program to actually recognize blocks from the code. At least currently GtkSourceView doesn't do that.

  4. #4
    Join Date
    Jun 2009
    Beans
    1,618
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Gedit plugin to collapse blocks

    Well blocks of code are usually things between { and } or in the case of python, indented...

    Recognizing the code blocks isn't that hard, its the collapsing that's difficult, the entry would need to display horizontal lines on collapsed code blocks...

    It is definitley a high-ish profile feature, if the library would need major changes I think it should get it, I've never seen an advanced text editor without this feature...

    [SOLVED]
    Comitas. Brevitas. Nulla ambitio.

  5. #5
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Gedit plugin to collapse blocks

    No, it definitely isn't that simple. At least when you consider the amount of different code syntaxes Gedit/GtkSourceView supports.. Some languages would be as simple as what you suggested, but for many others it sure is a lot harder than that.

  6. #6
    Join Date
    Dec 2009
    Beans
    1

    Re: Gedit plugin to collapse blocks

    Could you not just do selection collapsing? It'd be more flexible that way and it'd be completely separate from that.

  7. #7
    Join Date
    Feb 2009
    Location
    Netherlands
    Beans
    784

    Re: Gedit plugin to collapse blocks


  8. #8
    Join Date
    Apr 2010
    Beans
    31

    Re: Gedit plugin to collapse blocks

    Quote Originally Posted by VCoolio View Post
    We need to update the above folding plugin for Gedit 3. I'll post it up if I get to it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •