Git Product home page Git Product logo

led's Introduction

What is this?

led is a line-oriented text editor in command line. This editor is similar to the standard program on unix systems - GNU ed. But i'm not going to make an exact clone of that program, it's just a pet project.

Features

Now the program can:

  • save text to it's buffer
  • write or append text to file
  • show the contents of the buffer
  • insert or delete text in buffer
  • set own prompt in editor

Example of usage

How to launch

This program work only on linux(ubuntu).

Required tools: gcc, cmake, make, shell(bash).

To compile and install program type this:

$ ./build.sh

Or use cmake directly:

$ mkdir build && cd build
$ # or if you want release version, change option to -DCMAKE_BUILD_TYPE=RELEASE
$ cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/ ..
$ make
$ sudo make install

Options

Enter the -h option to check all program options:

$ led -h
usage: led [options...]

[cli options]:
	-h        - prints this help message
	-v        - shows the program version
	-f [file] - set the filename by default

[program commands]:
	q  - quit
	sp [str] - set custom prompt
	sd - set default prompt
	sf [file] - set filename
	cs - clear screen
	c  - clean buffer
	p  - print buffer
	pl - print buffer with numbered lines
	pc - print buffer by characters
	pf - print filename
	a  - append data to buffer(without \n)
	an - append data to buffer(with \n)
	w [file] - safe buffer to file
	wa [file] - safe buffer to file(append, not rewrite)
	f [file] - fill buffer from file
	fn [file] - fill buffer from file(with \n)
	ia [line] [str] - insert data after specified line
	ian [line] [str] - insert data after specified line(with \n)
	ib [line] [str] - insert data before specified line
	ibn [line] [str] - insert data before specified line(with \n)
	dl [line] - delete the specified line
	dr [line1] [line2] - delete the lines in the specified range

Also, you can check build options, by typing -h to build script:

$ ./build.sh -h
usage: ./build.sh [options...]

options:
	-d - compile and install debug version
	-r - compile and install release version
	-c - delete compiled object files
	-h - prints help message

It is recommended to use this script from the main repository folder, not a build or other nested directories.

TODO list

  • add linked list, and delete overhead with buffers
  • delete getopt_long(), add getopt()
  • rewrite parser
  • rewrite build system
  • rewrite documentation
  • add a documentation about the program internals
  • add a delete_substring()
  • add a copying function
  • add a addressing strings
  • add a concatenate strings function
  • add a insert function that uses an relative indices in the row for inserting data

led's People

Contributors

hulkiedo17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

led's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.