Skip to content

Commit b04c779

Browse files
committed
Revert seamless nvim/zellij nav; keep Ctrl+hjkl (#198)
Per decision: keep Neovim's own Ctrl+hjkl for its splits and scope Alt+hjkl to zellij panes — the two nav layers stay separate, with no wasm plugin and nothing new to maintain. Backs out the step-3 seamless work (zellij-autolock + zellij-nav.nvim): - remove dot_files/zellij/autolock.kdl, hypercube/plugins/nav.lua, and config/keymaps.lua; unwire them from config/lazy.lua and plugins/ init.lua. - devcube Containerfile: drop the wasm bake + autolock merge step. - docs: KEYBINDINGS.md nav notes and the config.kdl comments now state the two-layer split plainly; KEYBINDINGS-PROPOSAL.md records §4/step 3 as declined. Kept (unaffected by this decision): the single Ctrl+Space zellij leader, Ghostty as a plain renderer, and zellij in the base image. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SDzdtoy59UEWDZvZhZBkhB
1 parent dd59dd7 commit b04c779

9 files changed

Lines changed: 23 additions & 105 deletions

File tree

KEYBINDINGS-PROPOSAL.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
> Addresses [#198](https://github.com/binarypie-dev/hypercube/issues/198)
44
> "devcube: Fix keybindings mess."
55
>
6-
> Status: **proposal / RFC.** No configs are changed by this document. It
7-
> describes the target scheme, the rationale, and a staged migration.
6+
> Status: **proposal / RFC.** It describes the target scheme, the rationale, and
7+
> a staged migration.
8+
>
9+
> **Adopted:** the single `Ctrl+Space` zellij leader (§"Tier 2"), Ghostty as a
10+
> plain renderer (§"Tier 4"/step 2), and shipping zellij in the base image.
11+
> **Declined:** the seamless cross-boundary `Alt+hjkl` of §4 / step 3 (the
12+
> `vim-zellij-navigator` / autolock route below). It needs a baked wasm plugin
13+
> and a first-run permission grant for marginal benefit, so Neovim keeps its own
14+
> `Ctrl+hjkl` for splits and `Alt+hjkl` stays scoped to zellij panes — the two
15+
> nav layers are intentionally separate. The §4 design is kept for the record.
816
917
## The problem
1018

KEYBINDINGS.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ There is no pane-mode vs tab-mode vs resize-mode to juggle. See
2121
[KEYBINDINGS-PROPOSAL.md](KEYBINDINGS-PROPOSAL.md) for the full rationale
2222
([#198](https://github.com/binarypie-dev/hypercube/issues/198)).
2323

24-
> The scheme is now in place end to end: zellij owns multiplexing under the
25-
> `Ctrl+Space` leader, Ghostty is a plain renderer (no terminal leader), and
26-
> `Alt+hjkl` moves focus seamlessly between Neovim splits and zellij panes.
24+
> zellij owns multiplexing under the `Ctrl+Space` leader and Ghostty is a plain
25+
> renderer (no terminal leader). Within a tab, `Alt+hjkl` moves between zellij
26+
> panes; Neovim keeps its own `Ctrl+hjkl` for moving between its splits. The two
27+
> are intentionally separate — Neovim is the editor layer, zellij the mux layer.
2728
2829
## Hyprland Window Management
2930

@@ -162,12 +163,9 @@ These work everywhere, no mode required:
162163
| `Alt + h/j/k/l` | Move focus (hops between tabs at the edges) |
163164
| `Alt + =` / `Alt + -` | Grow / shrink pane |
164165

165-
> **Seamless with Neovim.** `Alt+hjkl` also steps *into* and out of Neovim's
166-
> own splits, so the editor ↔ agent boundary needs no gear-change. Inside `devc`
167-
> this is handled by `zellij-autolock` (holds zellij in locked mode while nvim is
168-
> focused, so the keys reach nvim) plus `zellij-nav.nvim` (does the in-editor
169-
> move and hands off to the next zellij pane at the edge). On first launch zellij
170-
> asks once to grant the autolock plugin its permissions.
166+
> `Alt+hjkl` moves between zellij **panes**. Inside Neovim, use Neovim's own
167+
> `Ctrl+hjkl` to move between **its** splits (see the Neovim section); the two
168+
> navigation layers are kept separate by design.
171169
172170
---
173171

@@ -267,14 +265,13 @@ Neovim uses LazyVim with **Space** as the leader key.
267265

268266
| Keybinding | Action |
269267
|------------|--------|
270-
| `Alt+H/J/K/L` | Navigate windows — and out into zellij panes at the edge |
268+
| `Ctrl+H/J/K/L` | Navigate Neovim windows |
271269
| `Space w` | Window menu |
272270
| `Space -` | Horizontal split |
273271
| `Space \|` | Vertical split |
274272

275-
> `Alt+hjkl` is the single nav chord across Neovim and zellij (see the zellij
276-
> section). LazyVim's old `Ctrl+hjkl` window nav is retired
277-
> ([#198](https://github.com/binarypie-dev/hypercube/issues/198)).
273+
> `Ctrl+hjkl` moves between Neovim's own splits; `Alt+hjkl` moves between zellij
274+
> panes (see the zellij section). They're separate layers by design.
278275
279276
### Buffers
280277

dot_files/devcube/Containerfile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,6 @@ COPY zellij/ /root/.config/zellij/
281281
COPY workmux/ /root/.config/workmux/
282282
COPY starship/ /usr/share/hypercube/config/starship/
283283

284-
# zellij-autolock: bake the wasm at a stable image path (so a stale home volume
285-
# can't shadow it) and fold its config (zellij/autolock.kdl) into the seeded
286-
# config.kdl. With zellij-nav.nvim in the baked Neovim config this gives
287-
# seamless Alt+hjkl navigation between Neovim splits and zellij panes (#198).
288-
# DEVCUBE ONLY — the host base image keeps a plain /etc/zellij/config.kdl.
289-
ARG ZELLIJ_AUTOLOCK_VERSION=0.2.2
290-
RUN mkdir -p /usr/share/zellij/plugins \
291-
&& curl -fsSL "https://github.com/fresh2dev/zellij-autolock/releases/download/${ZELLIJ_AUTOLOCK_VERSION}/zellij-autolock.wasm" \
292-
-o /usr/share/zellij/plugins/zellij-autolock.wasm \
293-
&& cat /root/.config/zellij/autolock.kdl >> /root/.config/zellij/config.kdl \
294-
&& rm /root/.config/zellij/autolock.kdl
295-
296284
# Make fish root's login shell so every interactive shell in the container
297285
# (zellij panes, `just shell`, any sub-shell) loads the baked fish config --
298286
# including the WORKMUX_BACKEND=zellij pin in conf.d/10-devcube.fish.

dot_files/nvim/config/lua/config/keymaps.lua

Lines changed: 0 additions & 9 deletions
This file was deleted.

dot_files/nvim/config/lua/config/lazy.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ end
2828
local hypercube_ui = require("hypercube.plugins.ui")
2929
local hypercube_extras = require("hypercube.plugins.extras")
3030
local hypercube_ai = require("hypercube.plugins.ai")
31-
local hypercube_nav = require("hypercube.plugins.nav")
3231

3332
require("lazy").setup({
3433
spec = {
@@ -39,7 +38,6 @@ require("lazy").setup({
3938
hypercube_ui,
4039
hypercube_extras,
4140
hypercube_ai,
42-
hypercube_nav,
4341

4442
-- Your personal plugins (add files to ~/.config/hypercube/nvim/lua/plugins/)
4543
{ import = "plugins" },

dot_files/nvim/config/lua/hypercube/plugins/init.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,4 @@ return {
1111

1212
-- Import Hypercube AI (sidekick.nvim)
1313
{ import = "hypercube.plugins.ai" },
14-
15-
-- Import Hypercube navigation (seamless Neovim ↔ zellij)
16-
{ import = "hypercube.plugins.nav" },
1714
}

dot_files/nvim/config/lua/hypercube/plugins/nav.lua

Lines changed: 0 additions & 24 deletions
This file was deleted.

dot_files/zellij/autolock.kdl

Lines changed: 0 additions & 36 deletions
This file was deleted.

dot_files/zellij/config.kdl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ default_layout "compact"
4343
// ESCAPE g lock (pass every key to a focused TUI; Ctrl+Space unlocks)
4444
// Esc / Enter returns to Normal.
4545
//
46-
// NO leader needed — these work everywhere (and cross into nvim splits once
47-
// vim-zellij-navigator is wired up, see KEYBINDINGS-PROPOSAL.md step 3):
46+
// NO leader needed — these move focus between zellij panes from anywhere:
4847
// Alt h/j/k/l move focus Alt = / Alt - grow / shrink pane
48+
// (Inside Neovim, use Neovim's own Ctrl+hjkl for its splits — separate layer.)
4949
//
5050
// workmux ↔ zellij: `workmux add <branch>` opens each git worktree as its own
5151
// TAB running the agent (see ../workmux/config.yaml). So your parallel agents
@@ -60,8 +60,7 @@ keybinds clear-defaults=true {
6060
bind "Ctrl Space" { SwitchToMode "tmux"; }
6161

6262
// Bare directional focus + resize — no mode, muscle memory everywhere.
63-
// MoveFocusOrTab so h/l also hop between tabs at the edges. nvim grabs
64-
// these first when focused, falling through to zellij at split edges.
63+
// MoveFocusOrTab so h/l also hop between tabs at the pane-grid edges.
6564
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
6665
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
6766
bind "Alt j" "Alt Down" { MoveFocus "Down"; }

0 commit comments

Comments
 (0)