VoiceCode
Sublime Text plugin that lets VoiceCode remote-control the editor
Details
Installs
- Total 471
- Win 254
- Mac 154
- Linux 63
Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | May 17 | May 16 | May 15 | May 14 | May 13 | May 12 | May 11 | May 10 | May 9 | May 8 | May 7 | May 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
VoiceCode / Sublime Text (2|3) Integration Package
This is a Sublime Text plugin that lets VoiceCode control Sublime Text
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.
Setup
First make sure the commandline utility for Sublime Text is installed and working https://www.sublimetext.com/docs/3/osx_command_line.html
Adding your own commands
If you want to add new commands that are not already included in this package, just add something similar to the following in a user extension file for Sublime Text.
import sublime, sublime_plugin
class SelectPreviousWordCommand(sublime_plugin.TextCommand):
def run(self, edit):
pos = self.view.sel()[0].begin()
all_previous = [r for r in self.view.find_all('\w+') if r.begin() < pos]
if all_previous:
region = all_previous[-1] # return nearest
if region:
self.view.sel().clear()
self.view.sel().add(region)
Then, in your VoiceCode user commands, you can call this Sublime Text command as follows:
@sublime().do('select_previous_word')
or if you need to pass options/arguments to a Sublime command, add them as the second parameter like:
@sublime().do('some_command', {foo: "bar", baz: 3.2})
Triggering existing Sublime Text commands
Sublime has a lot of builtin commands. To trigger them from VoiceCode simply do something like:
@sublime().do('goto_line', {line: 10})
Checkout this page for more info about Sublime commands.