A lightweight terminal-based text editor written in C, inspired by GNU nano. This minimalist editor provides essential text editing functionality with a clean, straightforward interface.
This is a casual project I wrote to dive into some low-level programming concepts - terminal manipulation, raw mode input handling, and text buffer management. It's not a serious production-ready editor, just a fun exploration of how terminal-based text editors work under the hood.
If you have suggestions, improvements, or bug fixes, feel free to open a pull request!
Don't forget to leave a star! ⭐️
-
File Operations
- Open and edit existing files
- Save changes to disk (Ctrl+O)
-
Text Editing
- Full cursor navigation
- Insert and delete characters
- Multi-line text support
-
Search Functionality
- Find text within the document (Ctrl+W)
- Case-sensitive search
-
Keyboard Shortcuts
Ctrl+X- Exit the editorCtrl+O- Save file (write out)Ctrl+W- Search for text
- C compiler (GCC or Clang)
- CMake or Make
- Linux/macOS/Unix system
- Clone the repo:
git clone https://github.com/SekulDev/nano_clone.git
cd nano_clone- Build it:
make- Run it:
./nano_clone your_file.txtThat's it! 🎉
mkdir build
cd build
cmake ..
make
./nano_clone your_file.txtsudo make installNow you can use it from anywhere:
nano_clone myfile.txtImportant: You must provide a filename when starting the editor!
nano_clone filename.txt| Shortcut | Action |
|---|---|
Ctrl+X |
Exit the editor |
Ctrl+O |
Save file |
Ctrl+W |
Search for text |
| Arrow Keys | Move cursor around |
Editor won't compile?
- Make sure you have GCC or Clang installed
- Try
gcc --versionto check
"Command not found" when running?
- Use
./nano_cloneinstead of justnano_cloneif you didn't install it system-wide
Weird characters on screen?
- Your terminal might not support the required features
- Try a different terminal emulator
- Basic text editing only (no syntax highlighting)
- No undo/redo
- No multi-file editing
- It's a learning project, not production software!
Contributions are welcome! This is a casual project, so don't worry about making it perfect - just make it better!
MIT License - do whatever you want with it.
Note: Built as a fun dive into low-level terminal programming. The code might not be perfect, but it works and it taught me a lot!