Skip to content

Commit

Permalink
docs: improve readme for mappings
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Slusny <[email protected]>
  • Loading branch information
deathbeam committed Nov 20, 2024
1 parent 1062c99 commit 5147d2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@ See @deathbeam for [configuration](https://github.com/deathbeam/dotfiles/blob/ma

### Chat Mappings

- `<Tab>` - Complete the current input
- `<Tab>` - Trigger completion menu for special tokens or accept current completion (see help)
- `q`/`<C-c>` - Close the chat window
- `<C-l>` - Reset/clear the chat window
- `<C-l>` - Reset and clear the chat window
- `<CR>`/`<C-s>` - Submit the current prompt
- `gr` - Toggle sticky prompt - makes line under cursor sticky or deletes sticky line
- `<C-y>` - Accept current diff changes
- `gj` - Jump to buffer that suggested change is modifying (if buffer is not available, it will be created)
- `gq` - Add all diffs to quickfix list
- `gy` - Yank current diff to register (default register is `"`)
- `gd` - Show diff between source and suggested change
- `gp` - Show system prompt used for the current chat
- `gr` - Toggle sticky prompt for the line under cursor
- `<C-y>` - Accept nearest diff (works best with `COPILOT_GENERATE` prompt)
- `gj` - Jump to section of nearest diff. If in different buffer, jumps there; creates buffer if needed (works best with `COPILOT_GENERATE` prompt)
- `gq` - Add all diffs from chat to quickfix list
- `gy` - Yank nearest diff to register (defaults to `"`)
- `gd` - Show diff between source and nearest diff
- `gp` - Show system prompt for current chat
- `gs` - Show current user selection
- `gh` - Show help message

Expand Down Expand Up @@ -306,6 +306,12 @@ You can define custom contexts like this:
}
```

```markdown
> #birthday:user

What is my birthday
```

### Selections

Selections are used to determine the source of the chat (so basically what to chat about).
Expand Down
1 change: 1 addition & 0 deletions lua/CopilotChat/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ function M.setup(config)
local chat_help = '**`Special tokens`**\n'
chat_help = chat_help .. '`@<agent>` to select an agent\n'
chat_help = chat_help .. '`#<context>` to select a context\n'
chat_help = chat_help .. '`#<context>:<input>` to select input for context\n'
chat_help = chat_help .. '`/<prompt>` to select a prompt\n'
chat_help = chat_help .. '`$<model>` to select a model\n'
chat_help = chat_help .. '`> <text>` to make a sticky prompt (copied to next prompt)\n'
Expand Down

0 comments on commit 5147d2a

Please sign in to comment.