Trigger built-in menu commands? Change focus from Find to the editor?

I’m a JS dev and I want to make an Editor Extension that simply executes a sequence of things already found in Nova’s UI:

  1. Editor > Selection > Select All Instances (Cmd-Ctrl-E, assuming that you have just done a Find)

  2. Focus on editor instead of Find field (can be done by Esc key, not sure how else; otherwise the following command won’t work on your document—it only happens uselessly INSIDE the Find field itself)

  3. Editor > Selection > Select Line (Cmd-L)

Done by hand, that sequence selects all the lines containing the current Find, ready to Copy or Cut. But I’d love to automate it under a single keyboard shortcut (a la BBEdit). Hopefully without re-inventing the wheels already found in Nova’s menus.

TIA!

1 Like

Hi there,

As Im reading through your case I think you should be able to do that by using cmd+D after selecting first occasion of repeating pattern.

You can hold cmd+D until all of them are selected and them manipulate them as you wish.

Hope it helps.