Inside dejima, nvim already auto-opens claudecode.nvim on startup, but only as the configured narrow right-hand split. That is the right shape for referring to Claude while editing, and the wrong shape for actually working in Claude, which is what most of a sandbox session is.
This follows the auto-start with tab split, so the same terminal buffer also gets a full-screen window in its own tab. The original tab keeps the editor plus the narrow split, so both layouts are available at once: tab 2 to work in Claude, tab 1 to work side-by-side with it. Only the dejima auto-start path is touched; <leader>ac on a normal host behaves exactly as before.
:ClaudeCode returns with the terminal window focused (the snacks provider's open is synchronous and focusing), so a plain tab split operates on the right window. It is guarded on the current buffer matching the plugin's active terminal bufnr, so a failed or unexpected open cannot duplicate some other buffer into a new tab instead.
Tested by running headless nvim with DEJIMA=1 against this branch's config and dumping the resulting layout: tab 1 has the editor (55 cols) and the Claude terminal split (24 cols), tab 2 has the same terminal buffer at full width, focused, with mode t. Window-local options set by snacks (number=false, signcolumn=no, winhighlight) are inherited by the split, so the full-screen view looks identical to the split one, and snacks' buffer-local auto_insert BufEnter returns the window to terminal mode whenever you switch to that tab.
**Summary generated by LLM agent**
Inside dejima, nvim already auto-opens claudecode.nvim on startup, but only as the configured narrow right-hand split. That is the right shape for referring to Claude while editing, and the wrong shape for actually working in Claude, which is what most of a sandbox session is.
This follows the auto-start with `tab split`, so the same terminal buffer also gets a full-screen window in its own tab. The original tab keeps the editor plus the narrow split, so both layouts are available at once: tab 2 to work in Claude, tab 1 to work side-by-side with it. Only the dejima auto-start path is touched; `<leader>ac` on a normal host behaves exactly as before.
`:ClaudeCode` returns with the terminal window focused (the snacks provider's `open` is synchronous and focusing), so a plain `tab split` operates on the right window. It is guarded on the current buffer matching the plugin's active terminal bufnr, so a failed or unexpected open cannot duplicate some other buffer into a new tab instead.
Tested by running headless nvim with `DEJIMA=1` against this branch's config and dumping the resulting layout: tab 1 has the editor (55 cols) and the Claude terminal split (24 cols), tab 2 has the same terminal buffer at full width, focused, with mode `t`. Window-local options set by snacks (`number=false`, `signcolumn=no`, winhighlight) are inherited by the split, so the full-screen view looks identical to the split one, and snacks' buffer-local `auto_insert` BufEnter returns the window to terminal mode whenever you switch to that tab.
The auto-start left the Claude terminal only as a narrow right split. Follow it with a tab split so the same terminal buffer also gets a full-screen tab, while the original tab keeps the side-by-side layout with the editor.
branderson
approved these changes 2026-08-10 14:14:51 -07:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary generated by LLM agent
Inside dejima, nvim already auto-opens claudecode.nvim on startup, but only as the configured narrow right-hand split. That is the right shape for referring to Claude while editing, and the wrong shape for actually working in Claude, which is what most of a sandbox session is.
This follows the auto-start with
tab split, so the same terminal buffer also gets a full-screen window in its own tab. The original tab keeps the editor plus the narrow split, so both layouts are available at once: tab 2 to work in Claude, tab 1 to work side-by-side with it. Only the dejima auto-start path is touched;<leader>acon a normal host behaves exactly as before.:ClaudeCodereturns with the terminal window focused (the snacks provider'sopenis synchronous and focusing), so a plaintab splitoperates on the right window. It is guarded on the current buffer matching the plugin's active terminal bufnr, so a failed or unexpected open cannot duplicate some other buffer into a new tab instead.Tested by running headless nvim with
DEJIMA=1against this branch's config and dumping the resulting layout: tab 1 has the editor (55 cols) and the Claude terminal split (24 cols), tab 2 has the same terminal buffer at full width, focused, with modet. Window-local options set by snacks (number=false,signcolumn=no, winhighlight) are inherited by the split, so the full-screen view looks identical to the split one, and snacks' buffer-localauto_insertBufEnter returns the window to terminal mode whenever you switch to that tab.