Multi-cursor editing

  • @Ekopalypse said in Multi-cursor editing:

    The documentation for searchFlags is described here.

    Yes but that documentation falls flat when you need an actual number to pass to a function!

    Is there some Python magic one can do to find these identifiers? What I mean is, if I do dir(MENUCOMMAND) in the P.S. console, I see:

    >>> dir(MENUCOMMAND)

    Some similar way of finding these “SCFIND_” things?

  • @Alan-Kilborn

    for readability you normally use FINDOPTION.NONE instead of the 0.
    In order to get all values from such enum you can call its values method.
    For example: FINDOPTION.values() would return


  • @Ekopalypse said in Multi-cursor editing:

    for readability you normally use FINDOPTION.NONE instead of the 0.

    Yes, but you have to know that EXISTS first! :-)

    To your point about “readability”…that’s why I was asking.
    I would much rather NOT use the magic number of zero.

    I didn’t see anything that logically links FINDOPTION to the SCFIND nomenclature. Maybe I missed the connection.

  • @Ekopalypse said in Multi-cursor editing:

    For example: FINDOPTION.values() would return

    Just a slight note for any future readers:

    FINDOPTION.values() at the Pythonscript console yields:

    >> FINDOPTION.values()
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
    TypeError: 'dict' object is not callable

    The proper thing to do is FINDOPTION.values (no parentheses).

  • Ooopps - you are right, thx for reporting.
    Seems I have wrapped it incorrectly with my python3 plugin.

    Yes, not every enum has really the same, but most of the time similar, name as the normal c-headers have.
    To get all the enums you can run globals() in the console or from a script.

  • @Ekopalypse said in Multi-cursor editing:

    my python3 plugin.

    gimme, Gimme, GIMME! :-)

  • I’m sorry, but it’s still an alpha version.
    As long as not all functions/methods work as described
    you’re not really gonna enjoy it.
    Had a nasty plugin crash yesterday because instead using
    an signed integer I used an unsigned one. :-(

    But there will be fewer and fewer open issues.
    And since I was wrong with the release date several times,
    I prefer not to give a forecast until when a beta version can be expected.

    The actual situation, Corona, has one advantage - I have more time to work on PySnack (That’s what I want to call it).

  • @Ekopalypse said in Multi-cursor editing:

    Thanks for testing and improving.

    Glad to be of help. Let me know if more tests are needed.

    Best Regards.

  • @dail said in Multi-cursor editing:

    I use BetterMultiSelection

    As do I - along with SurroundSelection and DoxyIt. Do you still support DoxyIt, I submitted a pull request a little while back.


  • @Michael-Vincent

    Personally I haven’t used DoxyIt in years. I wouldnt say it’s not supported, just my interest is quite lacking.

    In light of recent circumstances I find myself with copious amounts of free time currently, so I will make it a point to take a look at your PR soon.

Log in to reply