Sidekick ergonomics: float toggle, zoom, escape, yank-joined#4
Open
GuillaumeLagrange wants to merge 2 commits into
Open
Sidekick ergonomics: float toggle, zoom, escape, yank-joined#4GuillaumeLagrange wants to merge 2 commits into
GuillaumeLagrange wants to merge 2 commits into
Conversation
…ined - sidekick: add terminal-mode <esc>/<esc><esc> to stopinsert in cli win - sidekick: <leader>aF toggles float/right split (95% float) - sidekick: <leader>az zooms the current window (tab-scoped) - keymaps: <leader>yj in visual mode yanks joined (single line) to +
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Quality-of-life tweaks for the
folke/sidekick.nvimworkflow, plus a small visual-mode yank helper.nvim/plugin/ai.luacli.win.keysentries (stopinsert,stopinsert2) so<esc>and<esc><esc>bothstopinsertin the sidekick CLI window without clobbering the global terminal<esc>mapping.<leader>aF— toggle the sidekick CLI between a 95%/95% float and the default right split (moden/t).<leader>az—Snacks.zoom()toggle (snacks.nvim is already a dep vianvim/plugin/snacks.lua), moden/t.nvim/lua/keymaps.lua<leader>yjin visual mode — yanks the selection, collapses all internal whitespace/newlines into single spaces, trims, and writes the result to the+register. Notifies with the resulting char count.Layout notes
This repo uses
vim.pack(not lazy.nvim). The lazy-stylekeys = { … }andopts.cli.win.keysblocks from the task description were adapted into the existingsetup()call andvim.keymap.setcalls innvim/plugin/ai.lua.Manual step (Claude Code config not tracked here)
This repo does not track any
claude/or.claude/directory, sokeybindings.jsonwas not added.In the Chat context, only one action is bound to
escapeby default:chat:cancel(cancels the current request/input). To move it offescape— so Neovim's terminal-mode<esc>from this PR can pass through cleanly — drop the following at~/.claude/keybindings.json:{ "$schema": "https://www.schemastore.org/claude-code-keybindings.json", "bindings": [ { "context": "Chat", "bindings": { "ctrl+shift+c": "chat:cancel", "escape": null } } ] }Notes:
escapebindings (autocomplete:dismiss,help:dismiss,confirm:no) live in other contexts and are unaffected.escapeworking and add a second key, drop the"escape": nullline.Validation
luajit -blparses bothnvim/plugin/ai.luaandnvim/lua/keymaps.luacleanly (Neovim not installed in this environment, so thenvim --headlessruntime check was substituted with a Lua syntax check).Test plan
<esc>exits terminal insert mode (and only there).<leader>aFtoggles between float (95%×95%) and right split.<leader>azzooms the current window viaSnacks.zoom(); pressing again unzooms.<leader>yjputs a single-line, whitespace-collapsed copy of the selection into the system clipboard and notifies with the char count.