phantom is a lightweight, terminal-based text editor written in Rust. It combines the simplicity of a basic text editor with some powerful features inspired by Vim.
- Simple and intuitive interface
- Vim-like modal editing (Normal, Insert, Visual, and Command modes)
- Syntax highlighting
- System clipboard integration
- Customizable (Currently Keybindings and Colors)
- Directory Navigation (Sidebar)
- Debug Output Menu
- Search in file
- Undo and Redo
- Tabs
- Minimap
- Cross-Platform?
- Linux: 100%
- MacOS: 80% (Some keybinds do not work and colors are fucked)
- Windows: 75% (Opens and base functionality works, but issues with file navigation and some keybinds)
Download latest phantom executable from releases
Place executable in /usr/bin (or in any folder in your path)
-
Ensure you have Rust and Cargo installed on your system. If not, install them from https://www.rust-lang.org/.
-
Clone this repository:
git clone https://github.com/0xGingi/phantom.git
-
Navigate to the project directory:
cd phantom
-
Build the project:
cargo build --release
-
The executable will be created in the
target/release
directory.
To start phantom:
phantom
phantom file.txt
phantom ~/Project
If a filename is provided, phantom will attempt to open that file. Otherwise, it will start with a blank document. If a directory is provided, phantom will enter directory navigation mode
- Linux:
~/.config/phantom
- Windows:
%APPDATA%\phantom
- MacOS:
~/Library/Application Support/phantom
Ctrl+Q
: Quit the editor
i
orInsert
: Enter Insert modea
: Enter Insert mode after the cursoro
: Insert a new line below and enter Insert modeO
: Insert a new line above and enter Insert modedd
: Delete the current lineyy
: Yank (copy) the current linep
: Paste after the current lineCtrl+Y
: Copy the current line to system clipboardCtrl+P
: Paste from system clipboard below the current linev
: Enter Visual mode- Arrow keys: Move the cursor
Home
: Move to the start of the lineEnd
: Move to the end of the lineDelete
: Delete the character under the cursor:
: Enter Command modeCtrl+B
: Toggle debug menu visibilityCtrl+E
: Enter directory navigation mode/
: Enter Search moden
: Go to next search resultN
: Go to previous search resultPageUp
: Scroll up one pagePageDown
: Scroll down one pageCtrl+U
: UndoCtrl+R
: RedoCtrl+T
: New TabCtrl+W
: Close TabF1
-F9
: Switch to Tab 1-9Tab
: Swap Between TabsCtrl+M
: Toggle Minimap
Esc
: Return to Normal modeEnter
: Insert a new lineBackspace
: Delete the character before the cursor- Any character key: Insert the character at the cursor position
Esc
: Return to Normal modey
: Copy selected text to system clipboard- Arrow keys: Extend selection
:w
: Save the current file:w filename
: Save the current file as 'filename':q
: Quit the editor:wq
: Save and quit:e filename
: Open 'filename' for editing
Enter
: Perform search and return to Normal modeEsc
: Cancel search and return to Normal mode
phantom includes a debug output area that displays information about key presses, cursor position, and the results of operations like saving files.