https://github.com/dasdron15/tomo
A lightweight and beginner-friendly terminal code editor
https://github.com/dasdron15/tomo
c code editor ncurses text-editor tree-sitter
Last synced: 3 months ago
JSON representation
A lightweight and beginner-friendly terminal code editor
- Host: GitHub
- URL: https://github.com/dasdron15/tomo
- Owner: Dasdron15
- License: mit
- Created: 2025-04-11T23:14:08.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-08-13T22:12:36.000Z (3 months ago)
- Last Synced: 2025-08-14T00:14:59.120Z (3 months ago)
- Topics: c, code, editor, ncurses, text-editor, tree-sitter
- Language: C
- Homepage:
- Size: 918 KB
- Stars: 22
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tomo


**Tomo** is a terminal-based code editor focused on simplicity and working out of the box without any configuration. Inspired by the lightweight nature of Helix and the intuitiveness of VS Code, it uses `ncurses` for terminal UI and `tree-sitter` for fast syntax highlighting.
Image of Tomo code editor in action:

## Features
- Syntax highlighting
- Smart indentation
- Custom themes
- Command palette
## Themes
**Tomo** supports custom themes via `.ini` files. Place your theme files in `~/.config/tomo/themes` directory.
### Theme file format
Each theme is a simple `.ini` file with the following format:
```ini
default = "#d0d0d0"
keyword = "#ff5555"
type = "#87cefa"
custom_type = "#ffa500"
string = "#98fb98"
number = "#f0e68c"
char = "#98fb98"
function = "#dda0dd"
identifier = "#b0c4de"
preprocessor = "#7fffd4"
comment = "#808080"
unactive = "#555555"
status_bar_bg = "#202020"
status_bar_text = "#d0d0d0"
background = "#121212"
select = "#333333"
```
- Colors should be in hexadecimal format (`#RRGGBB`).
- `default` - text default color
- `keyword` - programming language keywords
- `type` - built-in types (like `int`, `float`)
- `custom_type` - user-defined types (like structs, classes)
- `string` - string literals
- `number` - numeric literals
- `char` - character literals
- `function` - function names
- `identifier` - variable and parameter names
- `preprocessor` - preprocessor directives (C/C++)
- `comment` - Comments
- `unactive` - Unactive line numbers
- `status_bar_bg` - status bar background
- `status_bar_text` - status bar text color
- `background` - editor background
- `select` - selected text background
## Shortcuts
- Ctrl + C - Copy selected text
- Ctrl + V - Paste selected text
- Ctrl + X - Cut selected text
- Ctrl + G - Go to line
- Ctrl + Q - Quit the editor
- Ctrl + S - Save the file
- Ctrl + T - Change theme
- Ctrl + P - Open command palette
- Arrow keys - Move cursor
- Arrow keys + Shift - Start text selection
## Installation
```sh
git clone https://github.com/Dasdron15/Tomo.git
cd
make
sudo make install
```
`make` builds the editor and `sudo make install` installs it system-wide
## Usage
```sh
tomo
```
Currently, folder/project opening is not supported but planned for future releases.
## Planned features
- Undo/Redo
- Folder/project support
- config file support
- Mouse support
- Syntax highlighting for more languages
- Auto-completion
- Vim mode
## Contribution
Contributions, bug reports and feature requests are welcome!