Command-Based Text Editor written in cpp using Linked Lists and Stack

Overview

Command Based Text Editor

Our goal in this project is to write a command-based text editor in cpp using linked lists and stack.

This text editor will print the contents of a file to the screen, page by page.

Each page consists of 10 lines. An example image is given below.

I have implemented a stack to keep track of all actions carried out, so you can undo actions if needed.

Sample txt files are included to the "Resource Files" folder of the project

Main Commands:

  • open filename: The program should open the file whose name is provided in the field filename and loads its contents. For example, if the user enters "open test.txt", your program should open test.txt and load each line in the file to the linked list.

  • save filename: The program should write the contents of the linked list to the file whose name is provided in the filename field.

  • insert n text: The program should insert a new line with the "text" area user entered to the n_th_ line. For example, if the user enters "insert 5 hello my friend", your program should insert a new line at line position 5 and put "hello my friend" in that line.

    If the .txt file already contains more than n lines, it should insert thin new line between lines n-1 and n, putting the newly inserted text at line n. If the file contains
    less than n lines, it should fill the gap with blank lines until the newly inserted line becomes at position n.

  • delete n: The program should delete the line at position n.

  • move n m: The program should move the line at position n to new position m.

  • replace n text: The program should replace the text at line n with the string provided within text area.

  • next: Previous contents of the file should not change, but the program should display the next page.

  • prev: Previous contents of the file should not change, but the program should display the previous page.

  • undo: Reverts the last action taken. User should be able to call as many undo commands as s/he likes, and should be able to revert back to the initial state of the file after calling undo action enough times

Owner
bedirhanbardakci
An enthusiastic young developer who is currently studying at Yeditepe University, Faculty of Computer Engineering.
bedirhanbardakci
Add a scrollbar to the kakoune text editor (experimental!)

Scrollbar.kak This is a scrollbar for kakoune, the educated programmer's terminal editor of choice. It uses the line-flagging feature and a compiled s

Sawdust & Diamonds 12 Nov 9, 2021
CLIp is a clipboard emulator for a command line interface written in 100% standard C only. Pipe to it to copy, pipe from it to paste.

CLIp v2 About CLIp is a powerful yet easy to use and minimal clipboard manager for a command line environment, with no dependencies or bloat. Usage Sy

A.P. Jo. 12 Sep 18, 2021
Windows command line program for Spleeter, written in pure C, no need of Python.

SpleeterMsvcExe is a Windows command line program for Spleeter, which can be used directly. It is written in pure C language, using ffmpeg to read and write audio files, and using Tensorflow C API to make use of Spleeter models. No need to install Python environment, and it does not contain anything related to Python.

Wudi 162 Jun 27, 2022
A Command-Line-Interface Debugger for 64-bit Windows written in C.

Debugger-For-Windows A command-line-interface debugger for 64-bit Windows. [email protected]:/mnt/c/Projects/C/Debugger$ ./Debugger.exe ./Tests/test.ex

Tomer Gibor 1 Nov 3, 2021
Library for writing text-based user interfaces

IMPORTANT This library is no longer maintained. It's pretty small if you have a big project that relies on it, just maintain it yourself. Or look for

null 1.9k Jun 18, 2022
ImTui: Immediate Mode Text-based User Interface

imtui ImTui is an immediate mode text-based user interface library. Supports 256 ANSI colors and mouse/keyboard input. Live demo in the browser Eventh

Georgi Gerganov 1.9k Jul 1, 2022
Library for creating terminal applications with text-based widgets

Library for creating terminal applications with text-based widgets FINAL CUT is a C++ class library and widget toolkit with full mouse support for cre

Markus Gans 647 Jul 3, 2022
cpp-progressbar is a small console program I wrote in c++. 3 themes are available

cpp-progressbar cpp-progressbar is a small console program I wrote in c++. 3 themes are available (this program only works on linux) Instalation Downl

Zielino 3 Jun 17, 2022
Cpp-std-fwd - forward declarations for C++ std headers

cpp-std-fwd Forward declarations for most useful runtime classes of the C++ 17 standard library. DISCLAIMER: This project is meant as a proof-of-conce

Philip Trettner 66 Apr 22, 2022
Simple command line tool that processes image files using the FidelityFX Super Resolution (FSR) or Contrast Adaptive Sharpening (CAS) shader systems.

Simple command line tool that processes image files using the FidelityFX Super Resolution (FSR) or Contrast Adaptive Sharpening (CAS) shader systems.

GPUOpen Effects 174 Jun 26, 2022
Simple, command line based player toolkit for the Ironsworn tabletop RPG

isscrolls - Command line based player toolkit for the Ironsworn tabletop RPG isscrolls is a simple toolkit for players of the Ironsworn tabletop RPG.

null 5 Jun 1, 2022
Draw sequence diagram in text from terminal.

sequence-diagram-cli Draw seqence diagram from terminal.

null 42 Feb 28, 2022
CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.

CLI11: Command line parser for C++11 What's new • Documentation • API Reference CLI11 is a command line parser for C++11 and beyond that provides a ri

null 2.1k Jul 5, 2022
Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.

Malcolm Smith 1.1k Jul 4, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Clara v1.1.5 !! This repository is unmaintained. Go here for a fork that is somewhat maintained. !! A simple to use, composable, command line parser f

Catch Org 651 Jun 15, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Lyra A simple to use, composing, header only, command line arguments parser for C++ 11 and beyond. Obtain License Standards Stats Tests License Distri

Build Frameworks Group 343 Jul 4, 2022
A single header C++ library for parsing command line arguments and options with minimal amount of code

Quick Arg Parser Tired of unwieldy tools like getopt or argp? Quick Arg Parser is a single header C++ library for parsing command line arguments

null 44 Feb 21, 2022
null 76 Apr 18, 2022
Rizin - UNIX-like reverse engineering framework and command-line toolset.

Rizin - UNIX-like reverse engineering framework and command-line toolset.

Rizin Organization 1.5k Jul 7, 2022