Skip to content

Releases: suacayipkisi/t-code

t-code v0.3

Choose a tag to compare

@suacayipkisi suacayipkisi released this 21 Oct 19:39

T-Code v0.3 Debug and Theme Update

t-code is now an IDE with a debugger. This release also adds quick fixes, code folding, color themes,
panels you can move around, and right-click menus everywhere, while keeping memory use low.

Debugging (new)

  • F5 builds with debug info and starts the program under gdb (14 or newer, gdb -i dap).
    F9 or a click left of a line number sets a breakpoint. A right click sets a condition.
  • F10 / F11 / Shift+F11 step over / into / out. F6 pauses, Shift+F5 stops and
    Ctrl+Shift+F5 restarts.
  • Run and Debug panel (Ctrl+Shift+D):
    • Variables: values that changed since the last pause are colored, and arrays and structs
      open like folders.
    • Watch: expressions, kept per project.
    • Call Stack: frames in libraries are folded into one row.
    • Breakpoints: the full list, across all files.
  • Values under the pointer while paused, and an evaluate line (with -exec for gdb commands).
  • Crashes, from a segfault or AddressSanitizer, stop on the bad line and are explained in one
    plain sentence.
  • Disassembly View:
    • the function's instructions, with its source lines between them;
    • stepping by instruction, instruction breakpoints, and registers.

Editor

  • Quick fixes (Ctrl+.), such as a missing ;, a missing #include or a misspelled name,
    plus clangd's refactorings.
  • Go to Symbol in File (Ctrl+Shift+.) and Switch Source / Header (Alt+O).
  • Code folding (Ctrl+Shift+[ / ]) and sticky scroll: the heads of the enclosing
    function, loop or namespace stay at the top.
  • Highlights:
    • the cursor on a name lights up that symbol's uses;
    • code that an #if leaves out is dimmed;
    • git changes show in the strip beside the minimap.
  • A right-click menu in the editor with the important commands.
  • A save conflict bar when the file changed on disk: Overwrite, Reload or Compare, instead of
    silently overwriting.
  • make writing compile_commands.json is picked up by itself, with no clangd restart.

Window

  • Color themes: Dark Classic, Gruvbox and other dark and light themes, each with a preview, in
    a rounded or square look. You can edit settings.ini, theme.css and the editor's style
    scheme by hand.
  • Panels move between docks: drag a panel's icon to the left, bottom or right. Each panel has
    a show/hide button in the title bar. "View: Reset Panel Layout" puts everything back.
  • Open in New Window: a second window for the same project, sharing clangd.
  • Right-click menus on tabs, Open Tabs, files, Source Control, search results, terminals and
    the debugger's lists.
  • Source Control:
    • commit details on hover, and "Open Commit Details" shows a commit with its diff;
    • collapsible sections.
  • Comparisons open at the first change.
  • Settings pages listed on the left.

Run other languages

Ctrl+F5 runs scripts by their interpreter: Python, JavaScript / TypeScript, shell, Lua, Ruby,
Perl, PHP, Go, Java, or any file with #!. It also runs Cargo, Go, npm, Maven and Gradle
projects, and Python from its root with its venv.

Faster

  • Semantic coloring is updated by delta: on an 18 000-line file, an edit used to stall the window
    for about 280 ms and now takes under 1 ms.
  • Git comparisons no longer run on the main thread.

Keys that changed

  • F5 now starts debugging. Build and run moved to Ctrl+F5, and Ctrl+Shift+B still
    builds only.

Install

Distribution Command
Fedora 44 sudo dnf install ./t-code-0.3.0-1.fc44.x86_64.rpm
Arch Linux sudo pacman -U t-code-0.3.0-1-x86_64.pkg.tar.zst
Debian 13 sudo apt install ./t-code_0.3.0-1_amd64.deb
Void Linux t-code-0.3.0_1.x86_64.xbps (glibc) or t-code-0.3.0_1.x86_64-musl.xbps (musl), with xbps-rindex -a and xbps-install

Check the downloads with sha256sum -c SHA256SUMS. Debugging needs gdb 14 or newer; the packages
recommend it.

t-code v0.2.1

Choose a tag to compare

@suacayipkisi suacayipkisi released this 20 Oct 15:01

t-code 0.2.1

The Files panel is now a native folder tree inside the window instead of a terminal file manager, plus temporary tabs, per-project indentation and smarter typing.

Scroll to the very bottom to access the installation files

What's new

Files panel

  • A native GTK folder tree (GtkListView): folders load when opened, git colors and letters, drag and drop (move, copy from outside, drop onto the editor to open)
  • Create (a/b.c makes the folders), rename, delete, cut / copy / paste from the right-click menu
  • No more t-code-fm process

Tabs

  • Temporary tabs like VS Code's preview editor: a click in the Files panel reuses one italic tab until you edit it or double-click it
  • A comparison (Compare with HEAD, File History, commits) is one tab with both sides, and closes together

Editor

  • Indentation from .editorconfig, .clang-format or the file itself, shown in the status bar; click it to change it for the whole project
  • Enter after an opening bracket goes one level deeper (between a pair the closer gets its own line)
  • Double click selects a name only (letters, digits, _)
  • Selecting a name highlights its other occurrences and marks their lines beside the minimap
  • Tab moves between a completed function's parameters

clangd

  • "clangd: Restart Language Server" in the Command Palette (also retries a server that gave up)
  • A "⚠ No compile flags" hint in the status bar when includes are not found and no compile_commands.json / compile_flags.txt applies

Install

x86_64 packages for Fedora 44, Arch Linux, Debian 13 (trixie) and Void Linux (glibc and musl):

sudo dnf install ./t-code-0.2.1-1.fc44.x86_64.rpm      # Fedora
sudo pacman -U t-code-0.2.1-1-x86_64.pkg.tar.zst       # Arch Linux
sudo apt install ./t-code_0.2.1-1_amd64.deb            # Debian

Void Linux (use the x86_64-musl file on musl):

xbps-rindex -a t-code-0.2.1_1.x86_64.xbps
sudo xbps-install --repository="$PWD" t-code

Check the downloads with sha256sum -c SHA256SUMS. Each package was installed in a fresh container of its distribution and started on a headless X server.

Known issues in t-code 0.2.1

These are known problems in 0.2.1. All of them are planned to be fixed for 0.3.

Saving can overwrite changes made outside t-code

If a file is changed on disk by another program (a git checkout, another editor) while its tab
has unsaved changes, t-code does not reload it, so your edits are not lost. But the next save
(Ctrl+S or autosave) writes over the change on disk without asking.

Workaround: if you change a file outside t-code, save or close its tab in t-code first. A tab
with no unsaved changes reloads the file by itself.

Planned fix: before saving, check whether the file changed on disk, and if it did, ask:
Overwrite / Reload / Compare.

The window can freeze briefly on large repositories

A few git calls still block the window until they finish:

  • File History (Ctrl+Alt+H) and Compare with HEAD (Ctrl+Alt+D), which run git log --follow
  • opening or switching a project, which runs git rev-parse
  • Quick Open (Ctrl+P), which lists the project's files

On a small project this cannot be noticed. On a very large repository, or on a network filesystem
(NFS, sshfs), the window can stop responding for a moment.

Planned fix: run these in the background like the Source Control and Search panels already do.

Socket commands break on file names with a line break

Commands sent to $TCODE_SOCKET (open, preview, compare, …) are one per line, so a path
that contains a newline is split into two commands. This only affects scripts that use the
socket; the Files panel does not go through it.

Planned fix: separate commands with \0 (a byte that cannot appear in a path).

Not there yet

  • No debugger. Build and Run (F5) are there, but there are no breakpoints and no way to
    inspect variables yet. A GDB integration (through its DAP mode) is planned for 0.3.
  • One file shows in one place only. A file cannot be open in both editor groups at once
    (opening it in the other group moves the tab), so the same file cannot be seen side by side.
  • No multiple cursors (GtkSourceView 5 does not have them).

Full Changelog: v0.2...v0.2.1

t-code v0.2

Choose a tag to compare

@suacayipkisi suacayipkisi released this 19 Oct 08:43

t-code 0.2

The editor tabs are now GtkSourceView 5 views inside the window instead of terminals running micro, with a language server client built into t-code. No process per tab, problems underlined while you type, and about a third less memory with 25 files open.

What's new

Editor

  • clangd built in: errors and warnings underlined, completion with snippets and automatic #includes, parameter hints, hover, semantic colors
  • Go to Definition (F12, Ctrl+click) with Go Back, Find All References, Rename, Format Document (optionally on save)
  • Find / replace bar with case, whole word and regex
  • Brackets and quotes close themselves, line commands (duplicate, move, delete, toggle comment), indentation detected from the file
  • Indent guides with the bracket pair around the cursor, a minimap that marks lines with problems, git's changes in the gutter
  • A compact, VS Code-like completion list

Window

  • Files, Source Control, Search and the shell can be moved between 12 docks (left, bottom, right): drag a panel's icon, or right-click it
  • Side-by-side comparisons (Compare with HEAD, File History, commits) stay aligned and scroll together
  • Native Markdown preview (md4c in a text view): no WebKit, with tables, images and highlighted code blocks
  • t-code started in a folder opens that folder; middle-clicking the dock icon opens a new window

Memory (25 C files, each tab shown, PSS)

0.1.1 (micro) 0.2
editors 25 micro processes, 412 MB in the window
t-code window 57 MB 83 MB
clangd 361 MB 470 MB
in all 839 MB 557 MB

clangd keeps at most five documents open, runs with two malloc arenas, and t-code returns freed memory to the system when tabs close.

Install

x86_64 packages for Fedora 44, Arch Linux, Debian 13 (trixie) and Void Linux (glibc and musl):

sudo dnf install ./t-code-0.2-1.fc44.x86_64.rpm      # Fedora
sudo pacman -U t-code-0.2-1-x86_64.pkg.tar.zst       # Arch Linux
sudo apt install ./t-code_0.2-1_amd64.deb            # Debian

Void Linux (use the x86_64-musl file on musl):

xbps-rindex -a t-code-0.2_1.x86_64.xbps
sudo xbps-install --repository="$PWD" t-code

Check the downloads with sha256sum -c SHA256SUMS. Each package was installed in a fresh container of its distribution and started on a headless X server.

New build dependencies: gtksourceview-5 (5.16 or newer) and md4c; webkitgtk-6.0 and micro are no longer needed.

The micro-based t-code lives on in the micro-main branch (0.1.1).

Full Changelog: v0.1.1...v0.2

t-code v0.1.1

Choose a tag to compare

@suacayipkisi suacayipkisi released this 17 Oct 15:14

t-code 0.1.1

A performance release: about 8 times less memory than 0.1 and almost no CPU while idle.

Measured on Fedora 44 with 25 C files open, after clangd finished indexing:

0.1 0.1.1
Memory in all, one tab looked at 2239 MB 275 MB
Memory in all, all 25 tabs opened 2254 MB 942 MB
clangd 1718 MB 208 MB
CPU while idle (one core) 120% under 3%

In a normal desktop session with 25 tabs, 0.1.1 used 232 MB and 0.3% CPU while idle. See the
Performance section of the README for the details and how to measure it yourself.

Changes

  • Editors start when their tab is first shown, so a restored session with many tabs runs only
    the visible editors.
  • clangd runs with two malloc arenas: it held 1.5 GB or more while using 130 MB itself.
  • Idle editors no longer redraw 30 times a second. Hidden editors write nothing, and t-code does
    the autosave for the files that changed.
  • The Markdown preview's network process (about 60 MB) exits with the last preview.
  • Starting t-code no longer flashes clipboard windows in GNOME's dock and no longer clears the
    clipboard.

Tests and tools

  • New tests for the shared language server: request routing, diagnostics, closing documents,
    idle shutdown, and 400 editors connecting and disconnecting with a heap growth check.
  • make test-asan runs the tests under AddressSanitizer and fails on any leak.
  • The package tests check that 5 opened files start only 1 editor and that clangd has the
    arena limit.
  • tools/ has scripts that measure memory and CPU: proc-report.sh, headless.sh,
    clangd-mem.py and micro-redraws.py.

Install

sudo dnf install ./t-code-0.1.1-1.fc44.x86_64.rpm      # Fedora 44
sudo pacman -U t-code-0.1.1-1-x86_64.pkg.tar.zst       # Arch Linux
sudo apt install ./t-code_0.1.1-1_amd64.deb            # Debian 13

Upgrading from 0.1 works with the same commands.

Void Linux (added later)

Packages for Void Linux, glibc and musl. xbps installs from a repository, so index the
downloaded file first (use the x86_64-musl file on musl):

xbps-rindex -a t-code-0.1.1_1.x86_64.xbps
sudo xbps-install --repository="$PWD" t-code

Void has no Cascadia Code package; t-code uses the system's monospace font (any font can be
picked in Settings). These packages were built and tested in Void containers, not on a real
Void installation. They include two small portability fixes for musl that came after the
v0.1.1 tag (see the commit on main).

SHA256SUMS has the checksums of all five packages.

Full Changelog: v0.1...v0.1.1

t-code v0.1

Choose a tag to compare

@suacayipkisi suacayipkisi released this 17 Oct 13:48

t-code 0.1

The first release of t-code: a lightweight, terminal-centric C/C++ IDE for Linux. One GTK4 window, three kinds of real terminals: a file manager, editor tabs running micro with clangd, and your shell. It uses about 100–150 MB of RAM, not counting clangd.

Highlights

  • File manager (t-code-fm): written in plain C with no libraries. It shows git status colors and file icons, and has a right-click menu, drag and drop, and cut/copy/paste.
  • Editor tabs: each tab is micro in its own terminal, with VS Code Dark Modern colors and C/C++ coloring close to clangd's. Tabs can be split side by side.
  • One shared clangd: all editors use a single language server through t-code-lsp, instead of one per tab.
  • Minimap and indent guides: the minimap marks clangd's error and warning lines.
  • Search panel (Ctrl+Shift+F): ripgrep-based, with Match Case, Whole Word and Regex options and include/exclude globs.
  • Source Control (Ctrl+Shift+G): stage, unstage, discard, commit and push, plus a commit list.
  • Git comparisons: Compare with HEAD (Ctrl+Alt+D) and File History (Ctrl+Alt+H) show old versions side by side.
  • Build / Run: finds CMake, a Makefile or a single C/C++ file. Compiler errors in the shell can be Ctrl+Clicked.
  • Other tools: Quick Open (Ctrl+P), Command Palette (Ctrl+Shift+P), Markdown preview, a settings window, and sessions that are remembered for each project.

Install

Packages for x86_64:

Distribution Package
Fedora 44 t-code-0.1-1.fc44.x86_64.rpm
Arch Linux t-code-0.1-1-x86_64.pkg.tar.zst
Debian 13 (trixie) t-code_0.1-1_amd64.deb
sudo dnf install ./t-code-0.1-1.fc44.x86_64.rpm     # Fedora
sudo pacman -U t-code-0.1-1-x86_64.pkg.tar.zst      # Arch Linux
sudo apt install ./t-code_0.1-1_amd64.deb           # Debian

The package manager installs micro, clangd, git and the Cascadia Code font as well. Start t-code from the app menu, or run t-code [folder].

To build from source instead, run ./install.sh, which installs into ~/.local. You can also build the packages yourself with packaging/build.sh; see the README.

Notes

  • micro 2.0.14 or newer is required.
  • Each user's editor state (backups, history) is kept in ~/.local/state/t-code/micro/.
  • Your own ~/.config/micro is never touched.

Full Changelog: https://github.com/suacayipkisi/t-code/commits/v0.1