When the command palette or grammar-selector dropdowns are started from a script, they don’t get keyboard focus and anything typed will go into the document behind the dropdown.
I’m trying to write an ex-mode command to open the grammar-selector dropdown list, which you do in vim with
atom.packages.onDidActivatePackage (pack) -> if pack.name == 'ex-mode' Ex.registerCommand 'setf', -> atom.commands.dispatch(atom.views.getView(atom.workspace), 'grammar-selector:show')
What’s the right way to bring up the grammar selector or command palette from a script? Am I dispatching the command to the right place? The documentation for
dispatch is not very helpful.