A feature-rich console-based text editor built in C++ that simulates core functionalities of real text editors such as insert, delete, undo/redo, cursor movement, word operations, and file handling.
This project is a C++ text editor simulation that demonstrates how a real text editor works internally using data structures and algorithms.
It supports:
- Text insertion and deletion
- Cursor-based editing
- Undo and redo system
- Word-based deletion
- Search functionality
- File saving and loading
- Usage statistics tracking
- Insert text at cursor position
- Delete characters at cursor
- Delete custom range of text
- Delete full word at cursor
- Undo last operations (insert/delete)
- Redo undone operations
- Stack-based implementation
- Move cursor to any position
- Real-time cursor display
- Find all occurrences of a pattern
- Displays all matching positions
- Save text to file
- Load text from file
- Append text to existing file
- Number of insert operations
- Number of delete operations
- Undo/Redo counts
- Stack sizes
This project is built using core Data Structures & Algorithms concepts:
stack (vector)→ Undo/Redo systemstring manipulation→ text editingfile streams→ file handlingcursor logic→ index-based editingsearch algorithm→ substring searchencapsulation (OOP)→ class-based design
This project is useful for:
- 🎓 Computer Science students (DSA / OOP practice)
- 🧑🏫 Beginners learning C++
- 🧪 Students preparing for programming exams
- 💼 Developers learning how text editors work internally
This project was created to:
- Understand how real text editors manage data internally
- Practice object-oriented programming in C++
- Implement undo/redo systems using stacks
- Improve problem-solving and logic-building skills
- Build a strong portfolio project for academic submission
- C++
- STL (vector, string, algorithm)
- File Handling (fstream)
- OOP principles
========== DOCUMENT ========== |Hello World|
Chars: 11 | Words: 2 | Cursor: 11
- GUI version (Qt or SFML)
- Syntax highlighting
- Multi-line editing support
- Clipboard (copy/paste system)
- Mouse cursor support
- Auto-save feature
bash g++ main.cpp -o editor ./editor
📌 Author
Developed as a learning project for mastering:
Data Structures Algorithms C++ OOP design
⭐ If you like this project
Give it a star ⭐ and feel free to improve it or fork it.