A terminal-based text editor for Linux, macOS and Windows. Similar to nano but with modern keyboard shortcuts and better file handling. And maybe a tiny bit larger in size :)
- Cross-platform terminal UI
- UTF-8 and ISO-8859-1 encoding support with auto-detection
- LF and CRLF line ending detection and preservation
- Undo/redo with full history
- Find and replace with unified search mode (real-time incremental search)
- Search history navigation and case-sensitive/whole word options
- System clipboard integration (Ctrl+C/X/V)
- Line numbers (toggle with Ctrl+L)
- Word wrap (toggle with Ctrl+W)
- Configurable cursor shapes (block, underline, bar)
- 14 built-in color themes including retro DOS and IBM phosphor styles
- Syntax highlighting with 50+ language support (Chroma-based)
- Whitespace visualization (spaces, tabs, line endings)
- Auto-indentation (preserves leading whitespace on Enter)
- Zen mode (F11 to hide status bar)
- Bracket matching and navigation (Ctrl+B)
- Current line highlight (toggle via View menu)
- Autosave with automatic recovery on startup
- Smart Home key (cycles between first non-whitespace and column 0)
- Block indent/unindent (Tab/Shift+Tab with selection)
- Comment/Uncomment toggle (Ctrl+/) - language-aware
- Trim trailing whitespace on save (configurable)
- Position log - remembers cursor position across sessions
- Scrollbar indicator showing viewport position
- Verbatim Unicode character input (Ctrl+Shift+U hex, Ctrl+Shift+D decimal)
- External formatter integration (Ctrl+Shift+F) with built-in support for 20+ languages
- External linter integration (Ctrl+Shift+L) with diagnostics navigation (F8/Shift+F8)
npm install -g @tomcoolpxl/cooleditThe npm package downloads the matching release binary from GitHub Releases during
installation. It currently supports Linux, macOS, and Windows on x64 and
arm64.
If npm global installs require sudo, switch npm to a user-owned prefix instead:
mkdir -p ~/.local/bin
npm config set prefix ~/.local
export PATH="$HOME/.local/bin:$PATH"
npm install -g @tomcoolpxl/cooleditTo make it permanent for future shells, add the same line to your shell startup file:
export PATH="$HOME/.local/bin:$PATH"curl -fsSL https://raw.githubusercontent.com/tomcoolpxl/cooledit/main/install.sh | shInstall a specific version:
COOLEDIT_VERSION=vX.Y.Z curl -fsSL \
https://raw.githubusercontent.com/tomcoolpxl/cooledit/main/install.sh | shThe script installs to ~/.local/bin (non-root) or /usr/local/bin (root) and
verifies the SHA256 checksum automatically.
winget install cooledit.cooleditDownload the archive for your platform from the
Releases page, extract, and
place the cooledit binary somewhere on your PATH.
Requires Go 1.25 or later:
git clone https://github.com/tomcoolpxl/cooledit
cd cooledit
go build -o cooledit ./cmd/cooledit# Open a file
cooledit filename.txt
# Create new file (opens for editing even if doesn't exist)
cooledit newfile.txt
# Create file without name
cooledit
# Show line numbers
cooledit -l filename.txt
cooledit --line-numbers filename.txt
# Use custom config file
cooledit -c /path/to/config.toml filename.txt
cooledit --config /path/to/config.toml filename.txt
# Show version
cooledit -v
cooledit --version
# Show help
cooledit -h
cooledit --helpCtrl+S- SaveCtrl+Shift+S- Save asCtrl+Q- Quit
Ctrl+Z- UndoCtrl+Y- RedoCtrl+X- Cut (current line if no selection)Ctrl+C- Copy (current line if no selection)Ctrl+V- PasteCtrl+A- Select allCtrl+/- Toggle comment on line or selectionInsert- Toggle insert/replace modeTab- Insert spaces to next tab stop (or indent selection)Shift+Tab- Unindent line or selectionCtrl+I- Insert literal tab characterCtrl+Shift+U- Insert Unicode character by hex code pointCtrl+Shift+D- Insert Unicode character by decimal code pointCtrl+Shift+F- Format document with external formatterCtrl+Shift+L- Run linter on current fileF8- Jump to next diagnosticShift+F8- Jump to previous diagnosticBackspace- Delete one character
Ctrl+F- Enter unified search mode (incremental search with real-time results)Alt+C- Toggle case sensitivity (in search mode)Alt+W- Toggle whole word matching (in search mode)F3/Shift+F3- Find next/previous matchEnter- Navigate to next match (in search mode)Up/Down- Navigate search history (in search mode)Ctrl+R- Replace current match (in search mode)Ctrl+H- Replace all matches (in search mode, with confirmation)Escape- Exit search modeCtrl+G- Go to line
Arrow keys- Move cursorShift+Arrow keys- Select textCtrl+Left/Ctrl+Right- Jump by wordHome- Smart home (first non-whitespace, then column 0)End- Line endCtrl+Home- File startCtrl+End- File endPage Up/Page Down- Scroll by pageCtrl+]- Jump to matching bracketCtrl+B- Toggle file browser
Ctrl+L- Toggle line numbersCtrl+W- Toggle word wrapCtrl+Shift+W- Toggle whitespace displayCtrl+H- Toggle syntax highlightingF11- Toggle status bar (Zen mode)F10orEsc- Toggle menuF1- Show keyboard shortcuts help- Additional toggles via View menu: current line highlight, scrollbar, trim whitespace on save, remember cursor position
Press the underlined letter to activate menu items:
- File: Save, Save As, Quit
- Edit: Undo, Redo, Cut, Copy, Paste, Select All (Grab All)
- Search: Find/Replace, Find Next, Find Prev
- Help: Keyboard Shortcuts
Config file is auto-created at:
- Linux/macOS:
~/.config/cooledit/config.toml - Windows:
%APPDATA%\cooledit\config.toml
Example configuration:
[editor]
line_numbers = false
soft_wrap = false
tab_width = 4
syntax_highlighting = true
show_whitespace = false
current_line_highlight = false # Highlight current line with different background
trim_trailing_whitespace = false # Trim trailing whitespace on save
remember_position = true # Remember cursor position across sessions
show_scrollbar = false # Show scrollbar indicator
[ui]
show_menubar = false
show_statusbar = true
theme = "default"
cursor_shape = "block" # Options: block, underline, bar
cursor_blink = true
[search]
case_sensitive = false
whole_word = false
[autosave]
enabled = true
idle_timeout = 2 # seconds before autosave
min_interval = 30 # minimum seconds between autosaves14 built-in themes available via View → Themes menu:
- default - Terminal defaults with green cursor
- dark - Dark background, light text
- light - Light background, dark text
- monokai - Popular dark theme with vibrant colors
- solarized-dark - Precision dark color scheme
- solarized-light - Precision light color scheme
- gruvbox-dark - Retro warm dark colors
- gruvbox-light - Retro warm light colors
- dracula - Dark with purple accents
- nord - Arctic bluish theme
- dos - Classic DOS Edit blue background
- ibm-green - Classic green phosphor monitor
- ibm-amber - Classic amber phosphor monitor
- cyberpunk - Neon theme with hot pink and cyan
Custom themes can be defined in config file using [themes.custom_name] sections.
Press Ctrl+F to enter unified search mode with real-time incremental search:
- Type to search - matches appear immediately as you type (all letters and characters are typed)
- Search highlights all matches in the viewport
- Status bar shows match count (e.g., "Match 3 of 15")
Enter- Navigate to next matchF3/Shift+F3- Navigate next/previous matchUp/Down- Navigate search historyBackspace- Delete character from query (or exit if query is empty)
Alt+C- Toggle case sensitivity (indicator shows "Match Case" or "Ignore Case")Alt+W- Toggle whole word matching (indicator shows "Whole Word")- Search preferences persist across searches within the session
Ctrl+R- Replace current match (prompts for replacement text)Ctrl+H- Replace all matches (shows confirmation dialog with match count)- Replace-all is undoable as a single operation
Escape- Exit search mode and return to normal editing- Query is saved to history for next search
- Pre-fills search from current selection (if text is selected)
- Real-time match highlighting (current match vs other matches)
- Visual error state when no matches found (red status bar)
- Debounced search (waits 150ms after last keystroke)
- Performance limit: up to 1000 matches (shows "1000+" if more exist)
- Encoding auto-detection (UTF-8, ISO-8859-1)
- Line ending auto-detection (LF, CRLF)
- Original encoding and line endings preserved on save
- Files are loaded entirely into memory
Cooledit automatically saves backup copies of your work to prevent data loss.
- Autosave triggers after 2 seconds of inactivity (configurable)
- Backups are stored in a dedicated directory:
- Windows:
%APPDATA%\cooledit\autosave\ - Linux:
~/.local/share/cooledit/autosave/ - macOS:
~/Library/Application Support/cooledit/autosave/
- Windows:
If cooledit finds an autosave backup when opening a file, it shows a recovery prompt:
- [R]ecover - Load the autosave content (marks file as modified)
- [O]pen original - Load the original file (keeps autosave for later)
- [D]iscard - Delete the autosave and load original file
- Autosave is cleared when you save with Ctrl+S
- Autosave is kept if you quit without saving (for future recovery)
- Toggle autosave via View → Autosave menu
Press Ctrl+Shift+F or use Edit → Format Document to format the current file using an external formatter.
Cooledit includes default formatters for many languages:
| Language | Formatter | Language | Formatter |
|---|---|---|---|
| Go | gofmt |
Python | black |
| JavaScript | prettier |
TypeScript | prettier |
| Rust | rustfmt |
JSON | prettier |
| YAML | prettier |
HTML/CSS | prettier |
| C/C++ | clang-format |
Java | google-java-format |
| Shell/Bash | shfmt |
TOML | taplo |
| Markdown | prettier |
SQL | sql-formatter |
Override or add formatters in your config file:
# Use goimports instead of gofmt for Go
[formatters.go]
command = "goimports"
# Use autopep8 instead of black for Python
[formatters.python]
command = "autopep8"
args = ["-"]
# Add formatter for a language without built-in support
[formatters.haskell]
command = "ormolu"
args = ["--stdin-input-file", ".hs"]- Format is undoable with
Ctrl+Z - 5-second timeout prevents hangs
- Error messages shown in status bar
- Works with any command that reads from stdin and writes to stdout
Press Ctrl+Shift+L or use Edit → Run Linter to check the current file for errors and warnings.
Cooledit includes default linters for many languages:
| Language | Linter | Language | Linter |
|---|---|---|---|
| Go | go vet |
Python | ruff |
| JavaScript | eslint |
TypeScript | eslint |
| Rust | cargo check |
C | gcc -fsyntax-only |
| C++ | g++ -fsyntax-only |
Shell/Bash | shellcheck |
| YAML | yamllint |
JSON | jsonlint |
- Gutter markers: Shows severity in the line number column
✗- Error (red)⚠- Warning (yellow)ℹ- Info (blue)•- Hint
- Status bar: Shows diagnostic message when cursor is on affected line
- Navigation: Use
F8/Shift+F8to jump between diagnostics
Override or add linters in your config file:
# Use golangci-lint instead of go vet for Go
[linters.go]
command = "golangci-lint"
args = ["run", "--fast"]
# Use pylint instead of ruff for Python
[linters.python]
command = "pylint"
args = ["--output-format=parseable"]
# Add linter for a language without built-in support
[linters.ruby]
command = "rubocop"
args = ["--format", "emacs"]- Diagnostics cleared automatically when you edit the file
- 10-second timeout prevents hangs
- Error messages shown in status bar
- Works with any command that outputs
file:line:col: messageformat
# Build
go build ./cmd/cooledit
# Run tests
go test ./...
# Run without building
go run ./cmd/cooledit filename.txtgithub.com/gdamore/tcell/v2- Terminal handlinggithub.com/atotto/clipboard- System clipboard integrationgithub.com/BurntSushi/toml- Configuration file parsing
- No multiple file buffers
- No plugin system
- Single file editing only
Tom Cool
Copyright (C) 2026 Tom Cool
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
See the LICENSE file for the complete license text.
The complete source code for this software is available at: https://github.com/tomcoolpxl/cooledit
To report bugs or request features, please open an issue at: https://github.com/tomcoolpxl/cooledit/issues