예제 #1
0
def toggle_comments(*unneeded):
    press("cmd-/")
예제 #2
0
def back(m):
    refocus_page(None)
    press("cmd-[")
예제 #3
0
def forward(m):
    refocus_page(None)
    time.sleep(0.1)
    press("cmd-right")
    refocus_page(None)
예제 #4
0
def open_focus_devtools(m):
    press("cmd-shift-c")
예제 #5
0
def last_panel(m):
    open_focus_devtools(None)
    press("cmd-[")
예제 #6
0
def go_to_webpage(m):
    press("cmd-t")
    navigate_to_url(get_webpage(m))
예제 #7
0
def global_chrome_close_tab(m):
    current_app = ui.active_window().app
    switcher.switch_app(name="Google Chrome")
    press("cmd-w")
    current_app.focus()
예제 #8
0
def command_from_palette(command):
    press(atom_command_pallet)
    time.sleep(0.2)
    utils.paste_text(command)
    time.sleep(0.1)
    press("enter")
예제 #9
0
def code_snippet(m):
    snippet_key = " ".join(m["atom.snippets"])
    utils.insert(snippets[snippet_key])
    press("tab")
예제 #10
0
def cut_line(m):
    select_line(m)
    press("cmd-x")
예제 #11
0
def copy_line(m):
    select_line(m)
    press("cmd-c")
예제 #12
0
def select_line(m):
    jump_to_bol(m)
    press("cmd-left")
    press("shift-down")
예제 #13
0
def execute_atom_command(command, parameters=None):
    press(atom_hotkey)
    press(command)
    if parameters:
        Str(parameters)(None)
        press("enter")
예제 #14
0
def snipline():
    press("escape")
    press("ctrl-shift-k")
예제 #15
0
def defun(m):
    text("(defun  ())")
    sleep(0.1) # Time in seconds.
    press("esc 4 left")
    press("alt-p cmd-f11")
예제 #16
0
def code_snippet_naked(m):
    words = " ".join([str(word).lower() for word in m._words[0:]])
    Str(snippets[words])(None)
    press("tab")
예제 #17
0
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)
예제 #18
0
def duplicate(m):
    press("cmd-x")
    press("cmd-v")
    press("cmd-v")
    press("up")
예제 #19
0
def global_chrome_new_tab(m):
    switcher.switch_app(name="Google Chrome")
    press("cmd-t")
예제 #20
0
def jump_to_end_of_line():
    press("cmd-right")
예제 #21
0
def navigate_to_url(url, win=None):
    set_url(url, win)
    press("enter")
예제 #22
0
def jump_to_beginning_of_text():
    press("cmd-left")
예제 #23
0
def next_panel(m):
    open_focus_devtools(None)
    press("cmd-]")
예제 #24
0
def jump_to_nearly_end_of_line():
    press("left")
예제 #25
0
def focus_address_bar(m=None):
    press("cmd-l")
    time.sleep(0.1)
예제 #26
0
 def fn(m):
     if len(m._words) > 1:
         jump_to_bol(m)
     press("cmd-right")
     then()
예제 #27
0
def forward(m):
    refocus_page(None)
    press("cmd-]")
    refocus_page(None)
예제 #28
0
def enablePareditMode(m):    
    press('alt-x')
    sleep(0.1) # Time in seconds.
    text('enable-paredit-mode')
예제 #29
0
def link(m):
    refocus_page(None)
    press("f")
예제 #30
0
 "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-["),