def toggle_comments(*unneeded): press("cmd-/")
def back(m): refocus_page(None) press("cmd-[")
def forward(m): refocus_page(None) time.sleep(0.1) press("cmd-right") refocus_page(None)
def open_focus_devtools(m): press("cmd-shift-c")
def last_panel(m): open_focus_devtools(None) press("cmd-[")
def go_to_webpage(m): press("cmd-t") navigate_to_url(get_webpage(m))
def global_chrome_close_tab(m): current_app = ui.active_window().app switcher.switch_app(name="Google Chrome") press("cmd-w") current_app.focus()
def command_from_palette(command): press(atom_command_pallet) time.sleep(0.2) utils.paste_text(command) time.sleep(0.1) press("enter")
def code_snippet(m): snippet_key = " ".join(m["atom.snippets"]) utils.insert(snippets[snippet_key]) press("tab")
def cut_line(m): select_line(m) press("cmd-x")
def copy_line(m): select_line(m) press("cmd-c")
def select_line(m): jump_to_bol(m) press("cmd-left") press("shift-down")
def execute_atom_command(command, parameters=None): press(atom_hotkey) press(command) if parameters: Str(parameters)(None) press("enter")
def snipline(): press("escape") press("ctrl-shift-k")
def defun(m): text("(defun ())") sleep(0.1) # Time in seconds. press("esc 4 left") press("alt-p cmd-f11")
def code_snippet_naked(m): words = " ".join([str(word).lower() for word in m._words[0:]]) Str(snippets[words])(None) press("tab")
def jump_tab(m): tab_number = utils.parse_words_as_integer(m._words[1:]) if tab_number is not None and tab_number > 0 and tab_number < 9: press("cmd-%s" % tab_number)
def duplicate(m): press("cmd-x") press("cmd-v") press("cmd-v") press("up")
def global_chrome_new_tab(m): switcher.switch_app(name="Google Chrome") press("cmd-t")
def jump_to_end_of_line(): press("cmd-right")
def navigate_to_url(url, win=None): set_url(url, win) press("enter")
def jump_to_beginning_of_text(): press("cmd-left")
def next_panel(m): open_focus_devtools(None) press("cmd-]")
def jump_to_nearly_end_of_line(): press("left")
def focus_address_bar(m=None): press("cmd-l") time.sleep(0.1)
def fn(m): if len(m._words) > 1: jump_to_bol(m) press("cmd-right") then()
def forward(m): refocus_page(None) press("cmd-]") refocus_page(None)
def enablePareditMode(m): press('alt-x') sleep(0.1) # Time in seconds. text('enable-paredit-mode')
def link(m): refocus_page(None) press("f")
"crew <dgndictation>": find_next, "trail <dgndictation>": find_previous, "replace next": Key("cmd-alt-e"), "shackle": Key("cmd-l"), "selrang" + numerals + " [over]": select_lines, "shockey": Key("cmd-shift-enter"), "shockoon": Key("cmd-right enter"), "sprinkoon" + numerals: jump_to_eol_and(lambda: press("enter")), "peach": Key("cmd-t"), "peach <dgndictation>": [Key("cmd-t"), text], "peachy <dgndictation>": open_fuzzy_file, "advanced open file": Key("cmd-alt-o"), "(pain | bang)" + numerals: change_pain, "tab" + numerals: jump_tab, "goneck": Key("cmd-shift-]"), "gopreev": Key("cmd-shift-["),