def slack_search_channel(name_search: str) -> None: """Search for a channel to jump to.""" actions.self.slack_switch_channel() actions.insert(name_search)
def code_state_while(): actions.insert('while :') actions.edit.left()
def code_state_return(): actions.insert('return ')
def code_state_else(): actions.insert('else:') actions.key('enter')
def code_state_case(): actions.insert('case \nbreak;') actions.edit.up()
def go_to_website(website: str): """Goes to a specific website""" actions.browser.focus_address() actions.insert(website) actions.key("enter")
def code_operator_subscript(): actions.insert('[]') actions.key('left')
def code_state_case(): actions.insert('case :') actions.edit.left()
def code_state_do(): actions.insert('do {') actions.key('enter')
def code_state_else_if(): actions.insert('elseif ()') actions.edit.left()
def code_state_for_each(): actions.insert('foreach ()') actions.edit.left()
def snippet_insert(text: str): """Inserts a snippet""" actions.user.vscode("editor.action.insertSnippet") actions.insert(text) actions.key("enter")
def snippet_search(text: str): actions.user.vscode("editor.action.insertSnippet") actions.insert(text)
def jump_line(n: int): actions.user.vscode("workbench.action.gotoLine") actions.insert(str(n)) actions.key("enter") actions.edit.line_start()
def insert_formatted(phrase: Union[str, Phrase], formatters: str): """Inserts a phrase formatted according to formatters. Formatters is a comma separated list of formatters (e.g. 'CAPITALIZE_ALL_WORDS,DOUBLE_QUOTED_STRING')""" actions.insert(format_phrase(phrase, formatters))
def code_state_go_to(): actions.insert('goto ;') actions.edit.left()
def insert_many(strings: List[str]) -> None: """Insert a list of strings, sequentially.""" for string in strings: actions.insert(string)
def code_state_return(): actions.insert('return ;') actions.edit.left()
def file_manager_open_directory(path: str): """opens the directory that's already visible in the view""" actions.key("cmd-shift-g") actions.sleep("50ms") actions.insert(path) actions.key("enter")
def code_break(): actions.insert('break;')
def code_state_else_if(): actions.insert('elif :') actions.key('left')
def code_next(): actions.insert('continue;')
def code_state_switch(): actions.insert('switch ()') actions.edit.left()
def code_insert_return_type(type: str): actions.insert(f': {type}')
def code_state_for_each(): actions.insert('for in ') actions.key('left') actions.edit.word_left() actions.key('space') actions.edit.left()
def code_block(): actions.insert('{}') actions.edit.left() actions.key('enter')
def code_from_import(): actions.insert('from import ') actions.key('left') actions.edit.word_left() actions.key('space') actions.edit.left()
def code_comment_documentation(): actions.insert('/**')
def code_insert_type_annotation(type: str): actions.insert(f": {type}")
def jump_line(n: int): actions.key("ctrl-l") actions.insert(str(n)) actions.key("enter")