Skip to content

Commit 13889ec

Browse files
committed
updated readme
1 parent 762f582 commit 13889ec

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

README.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,7 @@ atom.commands.dispatch(atom.views.getView(atom.workspace), 'voicecode:connect')
2020

2121
If you want to manually connect it rather than have it auto-connect, just click the menu item: `Packages > VoiceCode > Connect`
2222

23-
## Adding your own commands
24-
25-
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:
26-
27-
```coffeescript
28-
window.voiceCodeCommands =
29-
myCoolCommand: (options) ->
30-
# do something here
31-
# the 'options' are passed over from VoiceCode
32-
console.log "my cool command worked!"
33-
```
34-
35-
Then, in your VoiceCode user commands, you can call this Atom command as follows:
36-
37-
```coffeescript
38-
@runAtomCommand "myCoolCommand", someObjectOrValue
39-
```
40-
41-
And for a more concrete example, it may look like this in VoiceCode:
42-
43-
```coffeescript
44-
atom.commands
45-
"my-command":
46-
spoken: "next word"
47-
grammarType: "numberCapture"
48-
action: (input = 1) ->
49-
@runAtomCommand 'selectNextWord', {distance: input}
50-
```
51-
52-
### Triggering existing Atom commands
23+
### Triggering Atom commands
5324
The Atom editor has a ton of built-in commands, and each Atom package adds even more. Any of these commands can be triggered directly from VoiceCode. In VoiceCode simply do:
5425

5526
```coffeescript

0 commit comments

Comments
 (0)