-
Notifications
You must be signed in to change notification settings - Fork 0
A sidebar on Ctrl+B: drill's first plugin, clickable to the last gesture #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/macos-cmd
Are you sure you want to change the base?
Changes from all commits
4a08ac2
cd03cbc
7578ae0
a549f22
07df2f8
5ce0c30
5258910
5991681
471810f
7265ef0
9a1a3c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # The file sidebar | ||
|
|
||
| `Ctrl+B` shows it, `Ctrl+B` hides it, and in both directions your caret stays | ||
| in your code — the tree is furniture, not a destination. On a Mac whose | ||
| terminal forwards Cmd ([docs/macos-cmd.md](macos-cmd.md)), `Cmd+B` does the | ||
| same thing and also works from inside the REPL, where `Ctrl+B` is | ||
| deliberately left alone (readline's backward-char, and tmux's prefix). | ||
|
|
||
| **It roots at the folder of the file you are in**, freshly on every open — | ||
| `d lld-prac main` shows the `lld-prac/` folder with `main.py` highlighted, | ||
| no matter which directory your shell happened to be in when you typed it. | ||
| (drill launches nvim from wherever you were; the shell's directory is a tree | ||
| of everything *except* your project.) Switch to a file elsewhere and the next | ||
| `Ctrl+B` roots there instead. | ||
|
|
||
| ## The gestures | ||
|
|
||
| Everything is a mouse gesture; the keyboard is only for typing names. | ||
|
|
||
| - **Click a file** — opens it, in the file window. Never in the interpreter: | ||
| the open logic refuses terminal windows outright. | ||
| - **Click a folder** — folds or unfolds it. One click. There is no | ||
| double-click folklore anywhere in the tree. | ||
| - **`[+ File]` / `[+ Folder]`** — real buttons in the tree's top bar. Click, | ||
| type a name at the prompt, Enter. The location is taken from the row your | ||
| cursor is on: a folder row means *in here*, a file row means *next to me*. | ||
| - **Right-click** — a menu on the row you clicked: New file, New folder, | ||
| Open, Open in split, Rename, Cut, Copy, Paste, Delete. Plain text labels | ||
| on purpose — no nerd font required, anywhere in the sidebar. | ||
| - **Ctrl+click** — select several files (marked with `*`). | ||
| - **Drag a file onto a folder** — moves it into that folder. Drop it on a | ||
| file instead and it moves next to that file. If the row you dragged was | ||
| marked, the **whole marked selection moves** in one gesture. | ||
|
|
||
| A press that drifts a cell before the button comes up is a click that | ||
| jittered, not a drag — the same trackpad rule the rest of drill's mouse | ||
| handling lives by, so nothing ever moves by accident. | ||
|
|
||
| Inside the tree, drill's file keys say no the same way they do in the | ||
| directory listing: `Ctrl+S`, `Ctrl+E`, `Ctrl+R` do nothing there. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The doc promises that Prompt for AI agents |
||
|
|
||
| ## What it costs when you don't use it | ||
|
|
||
| Nothing. This is drill's one exception to "no plugins", and it is built to | ||
| stay an exception: | ||
|
|
||
| - The three checkouts (nvim-tree, and volt+menu for the right-click menu) | ||
| are **pinned to exact commits** by `vendor.sh` — a table of three SHAs and | ||
| a loop, not a plugin manager. The same commits on every machine, every | ||
| install, until a pin is bumped on purpose. | ||
| - **Nothing loads at startup.** The checkouts are not even on the runtime | ||
| path until the first `Ctrl+B` of the session. Never press it and you run | ||
| the config drill always had, byte for byte. | ||
| - The same change **sealed the accidental plugin door**: plugins in your | ||
| `~/.local/share/nvim/site` used to load inside drill through `packpath` | ||
| even though the README said "no plugins". They no longer do. Your own | ||
| nvim setup outside drill is untouched either way. | ||
|
|
||
| ## When it says no | ||
|
|
||
| - *"sidebar plugins are not fetched"* — run `./vendor.sh` in your drill | ||
| directory (`~/drill` unless you moved it). `install.sh` does this for you; | ||
| a `git pull` upgrade does not. | ||
| - *"the sidebar needs nvim 0.10+"* — everything else in drill still works; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: install.sh now hard-requires Neovim 0.10+ (HARD abort), but README.md still states "Requires Neovim 0.9+" and this new line implies the rest of drill runs fine on 0.9. Align the minimum version in README.md (and soften this bullet) so users don't rely on 0.9 support that the installer refuses. Prompt for AI agents |
||
| the pinned plugins are what need 0.10. | ||
| - `Cmd+B` does nothing — your terminal is not forwarding Cmd. One setting: | ||
| [docs/macos-cmd.md](macos-cmd.md). | ||
| - **Right-click opens your terminal's own menu instead of drill's** — the | ||
| terminal is eating the click before nvim sees it. In iTerm2 that is a | ||
| Pointer binding, and it wins over mouse reporting: **Settings → Pointer → | ||
| Bindings**, select the *Right button · single click → Open Context Menu* | ||
| row, press **−** to remove it. With the binding gone, the click reaches | ||
| drill whenever the editor is running, and iTerm2 still shows its own menu | ||
| at the shell prompt, where nothing is listening for the mouse. (Ctrl-click | ||
| in drill is multi-select, not the menu — that one is drill's on purpose.) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: The README still tells users 'Requires Neovim 0.9+', but this PR bumps install.sh's Neovim gate to 0.10+ (the sidebar's pinned plugins need 0.10). Update the Install details line to match so the documented minimum matches the enforced minimum.
Prompt for AI agents