This is an Atom package/plugin that lets VoiceCode http://voicecode.io control Atom http://atom.io
This integration is needed because many VoiceCode voice commands are more sophisticated than simply pressing keys or clicking the mouse. For example, a command that selects the next curly brace, or a command that extends the current selection(s) forward until the next comma, etc.
To automatically connect Atom to VoiceCode on startup, in your Atom user init file, add the following:
atom.commands.dispatch(atom.views.getView(atom.workspace), 'voicecode:connect')If you want to manually connect it rather than have it auto-connect, just click the menu item: Packages > VoiceCode > Connect
If you want to add new commands that are not already included in this package, just do the following in your Atom user init file:
window.voiceCodeCommands =
myCoolCommand: (options) ->
# do something here
# the 'options' are passed over from VoiceCode
console.log "my cool command worked!"Then, in your VoiceCode user commands, you can call this Atom command as follows:
@runAtomCommand "myCoolCommand", someObjectOrValueAnd for a more concrete example, it may look like this in VoiceCode:
"commandName":
kind: "action"
description: "does something cool, and has an override for Atom IDE"
grammarType: "numberCapture"
action: (input) ->
switch @currentApplication()
when "Sublime Text"
@exec "subl --command 'select_next_word'"
when "Atom"
@runAtomCommand "myCoolCommand",
distance: input
value: "something"
else
# do some default actionIn VoiceCode simply do:
@runAtomCommand "trigger", "tree-view:add-file"If you would like to make custom changes or contribute to this package, general development instructions are here: https://github.com/atom/atom/blob/master/docs/contributing-to-packages.md
- In Atom, go to preferences/packages and uninstall the VoiceCode package
git clonethe branch or version of this repository you want to use- from the root of the the cloned repository, run
apm link - restart Atom