Skip to content

misc feature request: line comment on gutter click #2996

Open

Description

@dzzie

as I am working with queries I often put different criteria on different lines
then just comment them out as I switch between them for various tasks

select count(distinct(guid)) as g, count(guid) as c from main WHERE 
`group`=11
--submit like "%xxx%" and `group`=0

it would be super handy to have the gutter click event toggle a line comment prefix --

just a random idea

Activity

  1. chrisjlocke commented on Mar 25, 2022

    @chrisjlocke
    Member

    Seems like a good idea. I don't know if the text editor widget control thingy would recognise a gutter-click, but I guess it would. Could be a useful feature.

  2. dzzie commented on Mar 25, 2022

    @dzzie
    Author

    I guess technically its the SCN_MARGINCLICK scintinilla message. Example VB6 handler here:

    https://github.com/dzzie/scivb2/blob/b581d64030fecce1e2bc0ff786ffd9a59f515166/SciSimple.ctl#L378

    edit:
    looks like it is broken out in qsciscintilla.cpp

    void QsciScintilla::handleMarginClick(int pos, int modifiers, int margin)

  3. chrisjlocke commented on Mar 26, 2022

    @chrisjlocke
    Member

    Well, the code is already there to do the comment and uncommenting - a button does it already (or pressing Ctrl+/ ) so on a double-click, it just has to push the button too.

  4. dzzie commented on Mar 26, 2022

    @dzzie
    Author

    aghh the ctrl/ is pretty great, and never noticed the comment button. awesome thanks
    I also appreciate the block comment behavior if multiple lines selected
    quite well solved already i guess :)
    attention to detail like this is how you can tell a program is a labor of love and heavily use by its developers lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions