@@ -42,9 +42,9 @@ https://github.com/user-attachments/assets/4dd19151-89e4-4272-abac-6710dbc6edc1
4242 vim .keymap .set ({ " n" , " x" }, " <C-a>" , function () require (" opencode" ).ask (" @this: " , { submit = true }) end , { desc = " Ask opencode" })
4343 vim .keymap .set ({ " n" , " x" }, " <C-x>" , function () require (" opencode" ).select () end , { desc = " Execute opencode action…" })
4444 vim .keymap .set ({ " n" , " x" }, " ga" , function () require (" opencode" ).prompt (" @this" ) end , { desc = " Add to opencode" })
45- vim .keymap .set (" n" , " <C-.>" , function () require (" opencode" ).toggle () end , { desc = " Toggle opencode" })
46- vim .keymap .set (" n" , " <S-C-u>" , function () require (" opencode" ).command (" messages_half_page_up " ) end , { desc = " opencode half page up" })
47- vim .keymap .set (" n" , " <S-C-d>" , function () require (" opencode" ).command (" messages_half_page_down " ) end , { desc = " opencode half page down" })
45+ vim .keymap .set ({ " n" , " t " } , " <C-.>" , function () require (" opencode" ).toggle () end , { desc = " Toggle opencode" })
46+ vim .keymap .set (" n" , " <S-C-u>" , function () require (" opencode" ).command (" session.half.page.up " ) end , { desc = " opencode half page up" })
47+ vim .keymap .set (" n" , " <S-C-d>" , function () require (" opencode" ).command (" session.half.page.down " ) end , { desc = " opencode half page down" })
4848 -- You may want these if you stick with the opinionated "<C-a>" and "<C-x>" above — otherwise consider "<leader>o".
4949 vim .keymap .set (' n' , ' +' , ' <C-a>' , { desc = ' Increment' , noremap = true })
5050 vim .keymap .set (' n' , ' -' , ' <C-x>' , { desc = ' Decrement' , noremap = true })
@@ -165,27 +165,26 @@ Input a prompt to send to `opencode`.
165165
166166### 🧑🏫 Command — ` require("opencode").command() `
167167
168- Send a [ command] ( https://opencode.ai/docs/keybinds ) to ` opencode ` :
169-
170- | Command | Description |
171- | ---------------------------| ----------------------------------------------------------|
172- | ` session_new ` | Start a new session |
173- | ` session_share ` | Share the current session |
174- | ` session_interrupt ` | Interrupt the current session |
175- | ` session_compact ` | Compact the current session (reduce context size) |
176- | ` messages_page_up ` | Scroll messages up by one page |
177- | ` messages_page_down ` | Scroll messages down by one page |
178- | ` messages_half_page_up ` | Scroll messages up by half a page |
179- | ` messages_half_page_down ` | Scroll messages down by half a page |
180- | ` messages_first ` | Jump to the first message in the session |
181- | ` messages_last ` | Jump to the last message in the session |
182- | ` messages_copy ` | Copy the last message in the session |
183- | ` messages_undo ` | Undo the last message in the session |
184- | ` messages_redo ` | Redo the last message in the session |
185- | ` input_clear ` | Clear the TUI input |
186- | ` agent_cycle ` | Cycle the selected agent |
187-
188- > Supports * all* commands — these are just the most useful ones.
168+ Send a command to ` opencode ` :
169+
170+ | Command | Description |
171+ | -------------------------| ----------------------------------------------------------|
172+ | ` session.list ` | List sessions |
173+ | ` session.new ` | Start a new session |
174+ | ` session.share ` | Share the current session |
175+ | ` session.interrupt ` | Interrupt the current session |
176+ | ` session.compact ` | Compact the current session (reduce context size) |
177+ | ` session.page.up ` | Scroll messages up by one page |
178+ | ` session.page.down ` | Scroll messages down by one page |
179+ | ` session.half.page.up ` | Scroll messages up by half a page |
180+ | ` session.half.page.down ` | Scroll messages down by half a page |
181+ | ` session.first ` | Jump to the first message in the session |
182+ | ` session.last ` | Jump to the last message in the session |
183+ | ` session.undo ` | Undo the last action in the current session |
184+ | ` session.redo ` | Redo the last undone action in the current session |
185+ | ` prompt.submit ` | Submit the TUI input |
186+ | ` prompt.clear ` | Clear the TUI input |
187+ | ` agent.cycle ` | Cycle the selected agent |
189188
190189### 📝 Select — ` require("opencode").select() `
191190
0 commit comments