Text editor selection niceties (esp. "Add Next Occurence" of selection)



  • Preamble: I realize that this is actually multiple feature requests, and that there may be valid product strategy reasoning behind not adding these features. That said, I would love these.

    In dedicated text editors such as VS Code, Sublime, and Atom, there are some super useful keyboard shortcuts that allow you to manipulate text in ways that help accelerate coding in small but helpful ways. Drawbot has some very nice abilities of its own that keep me using its editor for coding (command click-dragging / arrow incrementing of values is wonderful). Still, a few text helpers would be wonderful.

    Below is a screenshot of VS Code's "Selection" menu, which has several functions that would be helpful (I don't happen to use expand/shrink selection, but others probably do).

    The very most useful function, for me, is the ability to "Add Next Occurrence" of a word to a selection (very close to "Select All Occurrences"). This makes it really quick to do things like updating a variable name between several lines. This is also possible with a find/replace all, but that tends to take me out of a workflow significantly more because I have to figure out that bit of UI instead of just making it happen.

    0_1515927613266_selectNextOccurence.gif

    Also sometimes handy is having the ability to add multiple cursors, with shortcuts to add cursors above or below the current one. This is awesome for editing things like ASCII art or glyph recipe strings.Still, this is less of an important feature to me, because I'm happy enough opening my code in a separate editor for this kind of work. But if it were in the Drawbot (/ RoboFont) text editor, I might have to context-switch that much less!

    0_1515925982332_e1c5396b-1ae9-4ad3-b305-a5f0a99e1b53-image.png



  • @thundernixon I doubt DB's editor will ever be super advanced, but there's the command-E shortcut to enter the selection into the search string. Together with command-G (find next) that allows me to quickly find the next occurrences of anything.


  • admin

    the code editor has already lots of coding editing powers. Its not the goal to embed such code-editing specific features.

    I would encourage to start very basic in DrawBot/RoboFont. Once a script expands into a multiple files and becomes bigger it will always be easier to manage it from an external editor.

    DrawBot has support to detect external changes and reload automatically, when no change was made inside DrawBot, when DrawBot becomes active.



  • @frederik and @justvanrossum thanks for the thoughtful replies and helpful tips!

    Command-E and Command-G will be very useful. 🙂

    And yeah, I found that early on that DrawBot does reload pretty nicely, so probably I just need to make better use of that.


Log in to reply