Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl

- name: Install musl toolchain
run: sudo apt-get install -y musl-tools

- name: Cache cargo registry
uses: actions/cache@v4
Expand All @@ -54,12 +59,12 @@ jobs:
- name: Build release binaries
run: |
cargo build --release --bin vimcode
cargo build --release --bin vcd --no-default-features
cargo build --release --bin vcd --no-default-features --target x86_64-unknown-linux-musl

- name: Strip binaries
run: |
strip target/release/vimcode
strip target/release/vcd
strip target/x86_64-unknown-linux-musl/release/vcd

# ── .deb package ──────────────────────────────────────────────────────────
- name: Install cargo-deb
Expand All @@ -78,7 +83,7 @@ jobs:
- name: Prepare raw binary artifacts
run: |
cp target/release/vimcode vimcode-linux-x86_64
cp target/release/vcd vcd-linux-x86_64
cp target/x86_64-unknown-linux-musl/release/vcd vcd-linux-x86_64
echo "BIN_NAME=vimcode-linux-x86_64" >> $GITHUB_ENV
echo "TUI_BIN_NAME=vcd-linux-x86_64" >> $GITHUB_ENV

Expand Down Expand Up @@ -106,12 +111,12 @@ jobs:
./vimcode-linux-x86_64
```

**Option C — TUI-only binary (no GTK required)**
**Option C — TUI-only binary (no GTK required, statically linked)**
```
chmod +x vcd-linux-x86_64
./vcd-linux-x86_64
```
No GTK4 or other GUI libraries needed — works on headless servers.
Statically linked with musl — runs on any Linux (Ubuntu 20.04+, CentOS 7+, Alpine, etc.). No GTK4 or other libraries needed.

**Option D — Flatpak** (see attached `vimcode.flatpak` asset)
```
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vimcode"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
description = "Vim-like code editor with GTK4 and tree-sitter"
license = "MIT"
Expand Down
1 change: 1 addition & 0 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
---

## Recently Completed
- **Session 156**: IDE Polish — indent guides (vertical lines at tabstops, active guide highlight, blank line bridging), bracket pair highlighting (matching `(){}[]` background color), auto-close brackets/quotes (skip-over, pair backspace, smart quote context), 3 new settings + theme colors across all 4 themes, GTK+TUI rendering, 29 tests
- **Session 155**: Core Commentary Feature — unified comment toggling into `src/core/comment.rs` (46+ language table, two-pass algorithm, override chain), `:Comment`/`:Commentary` commands, `vimcode.set_comment_style()` plugin API, Ctrl+/ fix for GTK+TUI, VSCode Ctrl+Q/F10, 19+31 tests
- **Session 154**: Keymaps editor in settings panel — `BufferEditor` setting type, scratch buffer with validation, `:Keymaps` command, GTK button + TUI display, 11 tests
- **Session 153**: Richer Lua Plugin API + VimCode Commentary + User Keymaps — Extended plugin API (cursor write, settings access, state queries, buffer insert/delete, register write, 7 new autocmd events, `set_mode()` refactor, visual/command keymap fallbacks); VimCode Commentary bundled extension (gcc/gc/`:Commentary`, 40+ language comment strings, undo support); plugin `set_lines` undo fix; user-configurable keymaps in settings.json (`"mode keys :command"` format, multi-key sequences, override built-in keys, `{count}` substitution); 22 + 17 + 13 = 52 new tests (2801 total)
Expand Down
5 changes: 4 additions & 1 deletion PROJECT_STATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# VimCode Project State

**Last updated:** Mar 9, 2026 (Session 155Core Commentary Feature) | **Tests:** 2908
**Last updated:** Mar 9, 2026 (Session 156IDE Polish: Indent Guides, Bracket Matching, Auto-Pairs) | **Tests:** 2937

> Feature documentation lives in **README.md**.
> Per-session implementation notes through Session 154 are in **SESSION_HISTORY.md**.
Expand All @@ -26,6 +26,9 @@ When implementing a new key/command, add tests covering:

## Recent Work

**Session 156 — IDE Polish: Indent Guides, Bracket Matching, Auto-Pairs (2937 tests):**
Three visual/editing polish features: (1) **Indent guides** — vertical `│` lines at each tabstop in TUI, thin Cairo lines in GTK; controlled by `indent_guides` setting (default on); active guide at cursor scope highlighted brighter; blank lines bridge surrounding indent levels. (2) **Bracket pair highlighting** — when cursor is on `(){}[]`, both brackets get a distinct background (`bracket_match_bg` theme color); `bracket_match` field on Engine updated at end of `handle_key()`; `match_brackets` setting (default on). (3) **Auto-close brackets/quotes** — typing `([{"'\`` in Insert mode inserts matching closer with cursor between; typing closer when next char matches skips over it; Backspace between a pair deletes both; smart context for quotes (only pair after whitespace/brackets/BOL); `auto_pairs` setting (default on). All three features have `:set` toggle support, settings UI entries, and theme colors across all 4 built-in themes. 29 integration tests in `tests/ide_polish.rs`.

**Session 155 — Core Commentary Feature (2908 tests):**
Unified comment toggling from three separate implementations (Lua plugin, Rust `toggle_comment_range()`, Rust `vscode_toggle_line_comment()`) into a single core module `src/core/comment.rs`. New `CommentStyle`/`CommentStyleOwned` types, `comment_style_for_language()` table covering 46+ languages (including block comments for HTML/CSS/XML), two-pass `compute_toggle_edits()` algorithm, `resolve_comment_style()` override chain (plugin → extension manifest → built-in → fallback `#`). Added `CommentConfig` to `ExtensionManifest` in `extensions.rs`. New `toggle_comment()` method on Engine replaces old `toggle_comment_range()` and `vscode_toggle_line_comment()`. Rewired `gcc`, visual `gc`, and VSCode `Ctrl+/` to use the new core. Added `:Comment` command (`:Commentary` kept as alias). Plugin API: `vimcode.set_comment_style(lang_id, {line, block_open, block_close})`. Fixed Ctrl+/ in GTK (key name `"slash"` not `"/"`) and TUI (crossterm byte 0x1F → `Char('7')` mapping). VSCode mode: added Ctrl+Q quit, F10 menu toggle, menu visible by default. 19 unit tests in `comment.rs`, 31 integration tests in `tests/commentary.rs`.

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ There's a touch of irony here - using a cli tool to write the editor that I've w
- **First-class Vim mode** — deeply integrated, not a plugin
- **Cross-platform** — GTK4 desktop UI + full terminal (TUI) backend
- **CPU rendering** — Cairo/Pango (works in VMs, remote desktops, SSH)
- **Clean architecture** — platform-agnostic core, 2908+ tests, zero async runtime dependency
- **Clean architecture** — platform-agnostic core, 2937+ tests, zero async runtime dependency

> **Note:** VimCode does not implement VimScript. Extension and scripting is handled via
> the built-in Lua 5.4 plugin system. The goal is full Vim *keybinding* and *editing*
Expand Down Expand Up @@ -830,6 +830,9 @@ Additional options (set directly in `settings.json`):
| `updatetime` | `4000` | Milliseconds between swap file writes for dirty buffers (`:set updatetime=N`) |
| `breadcrumbs` | `true` | Show file path + symbol hierarchy bar below the tab bar (`:set breadcrumbs` / `:set nobreadcrumbs`) |
| `autohide_panels` | `false` | TUI only: hide sidebar + activity bar at startup; `Ctrl-W h` reveals them, focus returns to editor auto-hides (`:set autohidepanels` / `:set noautohidepanels`) |
| `indent_guides` | `true` | Show vertical indent guide lines at each tabstop level (`:set indentguides` / `:set noindentguides`) |
| `match_brackets` | `true` | Highlight matching `(){}[]` bracket pair when cursor is on a bracket (`:set matchbrackets` / `:set nomatchbrackets`) |
| `auto_pairs` | `true` | Auto-close brackets and quotes in Insert mode; typing closer skips over it; Backspace between pair deletes both (`:set autopairs` / `:set noautopairs`) |

- `:set option?` — query current value (e.g. `:set ts?` → `tabstop=4`)
- `:set option!` — toggle a boolean option (e.g. `:set wrap!`); `no<option>!` explicitly disables (e.g. `:set nowrap!`)
Expand Down
Loading