---
name: "emacs"
description: >-
  Emacs mode provides commands for using the Emacs text editor.  This editor is
  normally used to write and edit code, but you may find it as a useful editor
  for any type of text.  Emacs has many features that make it ideal for voice
  text editing.  It has a steep learning curve, but it is worth the time.  Three
  particularly useful features are dired, shell buffer, and position marking.
  With dired, you can easily navigate folders and files on your computer.  If
  you use the emacs shell, you can take advantage of all the text editing
  commands built into emacs.  With position marking, you can easily select areas
  of text for copying, cutting, or moving.  If you are an experienced Emacs
  user, you will likely want to edit and expand on these commands.  See the
  <a href="https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf">basic keyboard shortcuts</a>
  and
  <a href="https://www.gnu.org/software/emacs/refcards/pdf/dired-ref.pdf">dired keyboard shortcuts</a>.
alternates:
  - "e max"
initiallyActive: false
exclusive: false
commands:
  - name: "quit emacs"
    description: >-
      Quits emacs.
    alternates:
      - "quit e max"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "c"
  - name: "open file"
    description: >-
      Opens a file or directory.
    alternates:
      - "open the file"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "f"
  - name: "save buffer"
    alternates:
      - "safe buffer"
      - "c buffer"
      - "c prefer"
      - "save prefer"
      - "steve buffer"
      - "say puffer"
      - "sea buffer"
      - "see you buffer"
      - "save puffer"
      - "says buffer"
    description: >-
      Saves the current buffer.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "s"
  - name: "cancel command"
    description: >-
      Cancels a command that was started in the minibuffer.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "g"
  - name: "scratch"
    description: >-
      Undo the last edit.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "u"
  - name: "revert buffer"
    description: >-
      Revert the current buffer.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "x"
      - name: "type"
        fixedArguments:
          - "revert-buffer"
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "short yes"
    description: >-
      Types "y".
    functions:
      - name: "keyPress"
        fixedArguments:
          - "y"
  - name: "short no"
    description: >-
      Types "n".
    functions:
      - name: "keyPress"
        fixedArguments:
          - "n"
  - name: "search"
    description: >-
      Searches forward for text in the current buffer.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "s"
  - name: "search back"
    description: >-
      Searches back for text in the current buffer.
    alternates:
      - "search pack"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "r"
  - name: "jump after"
    description: >-
      Searches for word in the current buffer and jumps cursor to the right of it.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "s"
      - name: "type"
        utteranceArguments: 1
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "jump after comma"
    description: >-
      Searches for "," in the current buffer and jumps cursor to the right of it.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "s"
      - name: "type"
        fixedArguments:
          - ","
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "jump after period"
    description: >-
      Searches for "." in the current buffer and jumps cursor to the right of it.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "s"
      - name: "type"
        fixedArguments:
          - "."
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "jump before"
    description: >-
      Searches for word in the current buffer and jumps cursor to the left of it.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "s"
      - name: "type"
        utteranceArguments: 1
      - name: "keyPress"
        fixedArguments:
          - "enter"
      - name: "keyPress"
        fixedArguments:
          - "escape"
      - name: "keyPress"
        fixedArguments:
          - "b"
  - name: "go start"
    description: >-
      Moves the cursor to the beginning of the line.
    alternates:
      - "ghost art"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "a"
  - name: "go finish"
    description: >-
      Moves the cursor to the end of the line.
    alternates:
      - "go finnish"
      - "go finished"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "e"
  - name: "go to line"
    description: >-
      Opens the minibuffer function to go directly to a specific line.
      Example: "go to line one twenty five".
      This is very useful if you enable line numbers in your emacs settings.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "g"
      - name: "keyPress"
        fixedArguments:
          - "g"
      - name: "number"
        utteranceArguments: 1
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "kill"
    description: >-
      Cuts the text from the cursor to the end of the line.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "k"
  - name: "copy"
    description: >-
      Copies the selected text.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "w"
  - name: "cut"
    description: >-
      Cuts the selected text.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "w"
  - name: "paste"
    description: >-
      Pastes the previously cut/copied text.
    alternates:
      - "piste"
      - "peace"
      - "paced"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "y"
  - name: "mark spot"
    description: >-
      Marks the cursor position to begin a selection.
      This is similar to holding the shift key in other programs.
      This is very helpful when editing text by voice.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "space"
  - name: "replace"
    description: >-
      Opens the replace function in the minibuffer.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "shift"
          - "alt"
          - "5"
  - name: "toggle image"
    description: >-
      Toggle between image and text view for an image.
    alternates:
      - "target image"
      - "togo image"
      - "togo imgur"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "x"
      - name: "type"
        fixedArguments:
          - "image-toggle-display"
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "split none"
    description: >-
      If the window layout currently contains more than one buffer,
      the current buffer becomes the only displayed buffer.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "1"
  - name: "split horizontal"
    description: >-
      Splits the current buffer layout horizontally.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "2"
  - name: "split vertical"
    description: >-
      Splits the current buffer layout vertically.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "3"
  - name: "other buffer"
    description: >-
      Jumps to the other buffer.
    alternates:
      - "other buffers"
      - "heather buffer"
      - "are there buffer"
      - "oh there are buffer"
      - "author buffer"
      - "of their buffer"
      - "oh there buffer"
      - "other above her"
      - "the other buffer"
      - "i'll throw a buffer"
      - "oh they're a buffer"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "o"
  - name: "list buffers"
    description: >-
      Opens a buffer that lists all open buffers.
    alternates:
      - "list the buffers"
      - "list of buffers"
      - "list of offers"
      - "list of hers"
      - "list puffers"
      - "wist buffers"
      - "list prefers"
      - "mr buffers"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "b"
  - name: "close buffer"
    description: >-
      Closes the current buffer.
    alternates:
      - "close puffer"
      - "clothes buffer"
      - "quills buffer"
      - "closed buffer"
      - "clueless buffer"
      - "clothes prefer"
      - "close prefer"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "x"
      - name: "type"
        fixedArguments:
          - "kill-this-buffer"
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "start macro"
    description: >-
      Starts recording a macro.
      These macros are very useful for repetitive editing by voice.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "shift"
          - "9"
  - name: "finish macro"
    description: >-
      Finish recording the macro started with "start macro".
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "shift"
          - "0"
  - name: "macro"
    description: >-
      Execute the previously recorded macro.
    alternates:
      - "mackerel"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "keyPress"
        fixedArguments:
          - "e"
  - name: "register copy first"
    description: >-
      Copy the selected text into register 1.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "type"
        fixedArguments:
          - "r"
      - name: "type"
        fixedArguments:
          - "s"
      - name: "type"
        fixedArguments:
          - "1"
  - name: "register paste first"
    description: >-
      Paste the text in register 1.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "type"
        fixedArguments:
          - "r"
      - name: "type"
        fixedArguments:
          - "i"
      - name: "type"
        fixedArguments:
          - "1"
  - name: "register copy second"
    description: >-
      Copy the selected text into register 2.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "type"
        fixedArguments:
          - "r"
      - name: "type"
        fixedArguments:
          - "s"
      - name: "type"
        fixedArguments:
          - "2"
  - name: "register paste second"
    description: >-
      Paste the text in register 2.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "type"
        fixedArguments:
          - "r"
      - name: "type"
        fixedArguments:
          - "i"
      - name: "type"
        fixedArguments:
          - "2"
  - name: "register copy third"
    description: >-
      Copy the selected text into register 3.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "type"
        fixedArguments:
          - "r"
      - name: "type"
        fixedArguments:
          - "s"
      - name: "type"
        fixedArguments:
          - "3"
  - name: "register paste third"
    description: >-
      Paste the text in register 3.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "x"
      - name: "type"
        fixedArguments:
          - "r"
      - name: "type"
        fixedArguments:
          - "i"
      - name: "type"
        fixedArguments:
          - "3"
  - name: "indent left"
    description: >-
      Indents left by an amount equal to the provided utterance argument number.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "u"
      - name: "type"
        fixedArguments:
          - "-"
      - name: "number"
        utteranceArguments: 1
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "x"
      - name: "type"
        fixedArguments:
          - "indent-rigidly"
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "indent right"
    description: >-
      Indents left by an amount equal to the provided utterance argument number.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "u"
      - name: "number"
        utteranceArguments: 1
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "x"
      - name: "type"
        fixedArguments:
          - "indent-rigidly"
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "fill paragraph"
    description: >-
      Fills the current paragraph.
      Add something like this to your .emacs file:
      (setq-default fill-column 80)
    functions:
      - name: "keyPress"
        fixedArguments:
          - "escape"
      - name: "keyPress"
        fixedArguments:
          - "q"
  - name: "fill region"
    description: >-
      Fills the current region.
      Add something like this to your .emacs file:
      (setq-default fill-column 80)
    functions:
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "x"
      - name: "type"
        fixedArguments:
          - "fill-region"
      - name: "keyPress"
        fixedArguments:
          - "enter"
  - name: "center cursor"
    description: >-
      Adjusts the buffer scroll to place the cursor at center.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "control"
          - "l"

  # dired commands
  
  - name: "copy file"
    description: >-
      For a dired directory listing, copy the file at the current line.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "shift"
          - "c"
  - name: "delete file"
    description: >-
      For a dired directory listing, delete the file at the current line.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "shift"
          - "d"
  - name: "new directory"
    description: >-
      For a dired directory listing, create a new directory.
    functions:
      - name: "type"
        fixedArguments:
          - "+"
  - name: "rename file"
    description: >-
      For a dired directory listing, rename the file at the current line.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "shift"
          - "r"
      - name: "keyPress"
        fixedArguments:
          - "down"
  - name: "file permissions"
    description: >-
      For a dired directory listing, change Linux style permissions of selected files.
      Owner, group, others.
      Read = 4, Write = 2, Execute = 1.
    functions:
      - name: "keyPress"
        fixedArguments:
          - "shift"
          - "m"
  - name: "mark file"
    description: >-
      For a dired directory listing, mark the file at the current line.
    alternates:
      - "marked file"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "m"
  - name: "unmark file"
    description: >-
      For a dired directory listing, unmark the file at the current line.
    alternates:
      - "unmarked file"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "u"

  # shell commands
  
  - name: "next command"
    description: >-
      This command is specific to shell buffers.
      Goes to the next command in the shell command history.
      The optional utterance argument is the number of times the key should be pressed.
      If the argument is not provided,
      the key is pressed once.
    functions:
      - name: "keyRepeat"
        fixedArguments:
          - "control"
          - "down"
        utteranceArguments: 1
  - name: "prior command"
    description: >-
      This command is specific to shell buffers.
      Goes to the prior command in the shell command history.
      The optional utterance argument is the number of times the key should be pressed.
      If the argument is not provided,
      the key is pressed once.
    alternates:
      - "prayer command"
    functions:
      - name: "keyRepeat"
        fixedArguments:
          - "control"
          - "up"
        utteranceArguments: 1
  - name: "insert power"
    description: >-
      This command is specific to shell buffers.
      Inserts "PowerShell -File ", so you can execute a PowerShell script easily.
    functions:
      - name: "type"
        fixedArguments:
          - "PowerShell -File "
  - name: "run shell"
    description: >-
      This command is specific to shell buffers.
      Opens a shell in a new buffer.
    alternates:
      - "run chill"
    functions:
      - name: "keyPress"
        fixedArguments:
          - "alt"
          - "x"
      - name: "type"
        fixedArguments:
          - "shell"
      - name: "keyPress"
        fixedArguments:
          - "enter"
