Pext Editor is a simple command-line text editor written in C. It allows users to create and edit text files with a minimal interface. This project is a basic implementation of a text editor that takes input from the user and saves it to a file.
Spoiler : this is a toy project :)
-
Create and edit text files
-
Specify filenames via command-line arguments or user input
-
Automatically appends .txt extension if missing
-
Quit editing with Ctrl+Q
Installation
To use Pext Editor, follow these steps:- Clone the Repository
git clone https://github.com/prajwal-56/Pext-Editor.git
cd Pext-Editor
Run the Program
./PextEditor [filename]
- If a filename is provided, the editor will use that name.
- If no filename is given, the program will ask for one.
How to Use :
- Run the program with or without a filename. - If you run the Program with a filename, you can start writing the content. It`ll be stored in a txt file with that filename - If you didn't, No worries ! The program will ask you for a filename. - Start typing your content. - Whenever you're done, Press Ctrl+Q to save and exit. - The file will be created in the same directory.Example Usage:
Creating a File
./PextEditor myfile
- This will create (or overwrite if a file already exist) myfile.txt.
- You can now directly start twriting your content, It will be stored in that file.
Running Without Arguments
./PextEditor
- This will prompt you to enter a filename.