diff --git a/_custom_globals.py b/_custom_globals.py index 6cf4538..00b12b5 100644 --- a/_custom_globals.py +++ b/_custom_globals.py @@ -18,12 +18,12 @@ class UsefulStuff(MappingRule): "arrow": Text("->"), "double arrow": Text("=>"), "enter|slap": Key("enter"), + "spank": Key("space"), "east": Key("end"), "west": Key("home"), "format": Key("ctrl") + Key("alt") + Key("f"), - "save file": Key("ctrl") + Key("s"), - "hash": Key("#"), - "punch": Key(","), + "hash": Text("#"), + "punch": Text(","), } globalStuff = Grammar("useful custom global commands") # Create a grammar to contain the command rule. diff --git a/_multiedit.py b/_multiedit.py index 810d071..a558dde 100644 --- a/_multiedit.py +++ b/_multiedit.py @@ -113,6 +113,7 @@ config.cmd.map = Item( "paste": release + Key("c-v"), "scratch": release + Key("c-z"), "no scratch": release + Key("c-y"), + "save file": release + Key("c-s"), "duplicate ": release + Key("c-c, c-v:%(n)d"), "copy": release + Key("c-c"), "cut": release + Key("c-x"), diff --git a/_namingcon.py b/_namingcon.py index f8023e6..401cb82 100644 --- a/_namingcon.py +++ b/_namingcon.py @@ -40,6 +40,14 @@ def caps_first_format(command): # Callback when command is spoken. printer = Text(upperString) printer.execute() +# Voice command rule for first caracter of the first word. +def dictate_format(command): # Callback when command is spoken. + textToPrint = command + someString = str(textToPrint) + upperString = someString.capitalize() + printer = Text(upperString) + printer.execute() + # Voice command rule for "middle_underscores" naming convention. def middle_underscores(command): # Callback when command is spoken. textToPrint = command @@ -111,6 +119,11 @@ class ProgrammingNamingConventions(MappingRule): "caps first ": Function(caps_first_format) + Text("%(symbol)s"), " caps first ": Text("%(symbol)s") + Function(caps_first_format), + #this command capitalizes the 1st letter of first word example: Test value + "dictate ": Function(dictate_format), + "dictate ": Function(dictate_format) + Text("%(symbol)s"), + " dictate ": Text("%(symbol)s") + Function(dictate_format), + #this command capitalizes the 1st letter of each word and removes spaces example: TestValue "camel ": Function(camel_format), "camel ": Function(camel_format) + Text("%(symbol)s"),