Results 1 to 3 of 3

Thread: How can I edit the gedit plugins?

  1. #1
    Join Date
    Nov 2007
    Location
    Croatia
    Beans
    27
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    How can I edit the gedit plugins?

    There is a plugin for gedit called Code Comment which, when a key shortcut is pressed, comments all selected lines with the '#' sign. There is nothing in the settings that would allow me to change this behavior, so I would like to know how would I go about editing this plugin to change the comment character to '/'.

  2. #2
    Join Date
    Aug 2009
    Location
    Charleston, SC (USA)
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How can I edit the gedit plugins?

    So I don't think its a relatively small and easy feat to change but on my Ubuntu system (13.10 64 bit) I found the files relating to the plugin under

    Code:
    /usr/lib/x86_64-linux-gnu/gedit/plugins/codecomment.py
    /usr/lib/x86_64-linux-gnu/gedit/plugins/codecomment.plugin
    I found it running the following commands
    Code:
    sudo updatedb
    locate codecomment
    Hope that helps!
    ~Caboose
    Last edited by Caboose885; April 11th, 2014 at 12:21 PM. Reason: spelling corrections
    "When our actions do not, our fears do make us traitors." -- Shakespeare
    "Unless someone like you cares a whole awful lot, nothing is going to get better. It's not!" -- Dr. Seuss


  3. #3
    Join Date
    Nov 2007
    Location
    Croatia
    Beans
    27
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How can I edit the gedit plugins?

    Quote Originally Posted by Caboose885 View Post
    So I don't think its a relatively small and easy feet to change but on my Ubuntu system (13.10 64 bit) I found the files relating to the plugin under

    Code:
    /usr/lib/x86_64-linux-gnu/gedit/plugins/codecomment.py
    /usr/lib/x86_64-linux-gnu/gedit/plugins/codecomment.plugin
    I found it running the following commands
    Code:
    sudo updatedb
    locate codecomment
    Hope that helps!
    ~Caboose
    It helps a bunch!

    If only I knew I could have simply searched for a "codecomment" file, i wouldn't have had to open the thread at all On my system (Mint), it was actually under
    Code:
    /home/nino/.gnome2/gedit/plugins/codecomment.py
    and as it turns out the characters are being defined by the language's metadata, not the plugin author himself. So what i could do instead in the plugin, is enlist PHP as one of the languages suitable for block comments (because originally only C was in there), which is also consistent with my other code and it allows me to enlist CSS under there too, since CSS only has block comments.

    So that's great. Thank you very much.

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
  •