A standalone GtkSourceView editor that bakes modern comforts in-process (no libpeas). Thor is a fast, native Linux editor with project browser, fuzzy finder, git gutter, C# support, terminal, and more — all via thor/host.py.
Project folder browser
- Open any folder and browse its files in the side panel.
- Files are colored by git state, like in VS Code: green means new, tan means changed, red means deleted.
- Open a folder with
Ctrl+Shift+O, or straight from the terminal:thor-code [folder]works likecode .(focuses the live window when the folder is already open;--new-windowforces a duplicate).
Quick file opener
- Press
Ctrl+P, start typing any part of a file name, and jump to it. It understands capitals (mcfindsMyClass.cs) and multiple words.
Git change markers
- The left edge of the editor shows what changed compared to git: green for added lines, tan for changed lines, red where lines were deleted. Untracked new files show all green. Marks refresh every time you save.
C# support
- Solution explorer, build / run / test per project, a test list with
pass/fail marks, clickable error list, code completions, hover help,
go-to-definition (
F12), find references (Shift+F12), formatting (Shift+Alt+F) and quick fixes (Alt+Enter).
Built-in terminal
- A terminal in the bottom panel, with tabs:
Ctrl+Alt+Topens a new terminal tab,Ctrl+Shift+Wcloses one,Ctrl+`jumps focus to the terminal and back.
Reopen closed tabs
Ctrl+Shift+Treopens the last closed document (repeat to restore older ones), keeping its cursor position.
Less clutter
Ctrl+Bhides side and bottom panes for distraction-free editing,Ctrl+J/Ctrl+Etoggle bottom / side pane alone.
Tab switching
Ctrl+PageDownjumps to the next tab,Ctrl+PageUpto the previous one, wrapping around at either end.
Auto-reload
- Files changed by another program (a build, a git checkout) reload on their own — but only when you have no unsaved edits, so your work is never overwritten.
Word highlighting
- Every occurrence of the word under your cursor lights up in the editor, with matching ticks in the ruler for quick scanning.
Small helpers
thor-open 'file.cs:line:col'opens a file at an exact position — handy for terminal links (thor-openunderstandsfile:lineandfile(line)).- One extra dark-friendly color scheme (
styles/atom-one-dark.xml) is installed automatically and used by default (gutter-friendly, viaGtkSource.StyleSchemeManager).
You need python3-gi, gir1.2-gtk-3.0, gir1.2-gtksource-4 and for C# the dotnet SDK plus Roslyn:
dotnet tool install --global roslyn-language-server
pip install -e . # provides `thor` console script
# or run without install:
python -m thor
./thor-cliLaunch:
thor [folder|file ...] # like `thor .`
thor-code [folder] # `code .` equivalent (own process per window)
thor-open 'file.cs:line:col' # open at location
THOR_DEBUG=1 thor # verbose [thor:*] traces + marker logStyles, csharp.lang, icons, desktop entry, and launchers are installed
via ./install.sh to standard XDG directories:
./install.sh # installs assets to ~/.local/share, logs to ~/.local/state, and launchers to ~/.local/bin- Desktop Entry:
~/.local/share/applications/dev.thor.Editor.desktop($XDG_DATA_HOME/applications/) - Icons:
~/.local/share/icons/hicolor/{scalable,256x256}/apps/dev.thor.Editor.{svg,png} - Styles:
~/.local/share/gtksourceview-4/styles/and~/.local/share/thor/styles/ - Language Specs:
~/.local/share/gtksourceview-4/language-specs/ - Configuration:
~/.config/thor/($XDG_CONFIG_HOME/thor/) - Cache:
~/.cache/thor/project-mode/($XDG_CACHE_HOME/thor/) - Logs & State:
~/.local/state/thor/logs/($XDG_STATE_HOME/thor/logs/) - Launchers:
~/.local/bin/($XDG_BIN_HOME)
| Keys | What it does |
|---|---|
Ctrl+Shift+O |
Open a project folder in a new window |
Ctrl+Shift+P |
Command palette (Edit Settings file opens ~/.config/thor/settings.toml) |
Ctrl+B |
Hide/show all panes (focus mode) |
Ctrl+J / Ctrl+E |
Toggle bottom / side pane |
Ctrl+PageUp / Ctrl+PageDown |
Previous / next tab |
Ctrl+Shift+T |
Reopen last closed document |
Ctrl+Alt+T / Ctrl+Shift+W |
New / close terminal tab |
Ctrl+` |
Jump focus to the terminal and back |
Ctrl+Space |
Code completions (C#) |
F12 / Shift+F12 |
Go to definition / find references (C#) |
Alt+Enter |
Quick fix for the error at the cursor (C#) |
Shift+Alt+F |
Format the file (C#) |
Ctrl+F / F3 / Shift+F3 |
Find bar / next / previous |
Ctrl+R |
Toggle word wrap (not in the terminal — that's reverse-search) |
Run the self-check first:
python3 doctor.py # checks Thor
python3 doctor.py --help # filteredThe usual culprits:
- One editor per process, one window per folder. Every window is its own
process (
NON_UNIQUEapplication, one window each). A secondthor-code <path>for an already-open folder focuses the live window via the per-root IPC socket (no duplicate);thor-open file:lineinside a live root forwards into it.thor --new-window <folder>forces a duplicate.Ctrl+Qand the window-manager close run the same per-window exit path, so one quit can never take down a sibling window. Global~/.config/thor/state.tomlis last-writer-wins by design. - Panes are hidden. New panels live in the side/bottom panes; turn
them on via View → Side Pane / Bottom Pane (or
Ctrl+B/Ctrl+E/Ctrl+J). - C# completions missing. Make sure the dotnet SDK and
roslyn-language-serverare installed (see above). The C# Output panel at the bottom shows what the language server is doing.
If you report a problem, run with debug and include traces:
THOR_DEBUG=1 thor ([thor:*]). Marker log: ~/.local/state/thor/logs/thor-csharp.log,
server stderr: ~/.local/state/thor/logs/roslyn-stderr.log.
The test suite runs under pytest — pytest-xvfb auto-creates a virtual display:
python3 -m pytest -qThor headless modules (thor/csharp/*, thor/project, etc.) import without a display.