Simple Text Editor oriented by lines
ELIS is a simple text editor made with C++ using ncurses and double-linked lists.
This project aims to make use of the power from the double-linked list data structure for the development of a simple text editor like Vi.
C++ 11ncursesmakeless
In order to compile and get the program running, just clone the repo by doing:
git clone https://github.com/FelipeCRamos/ELIS.git && cd ELISAnd then, run the make command that will compile the entire project
(check dependencies).
Then, just run with ./elis [<file>].
This implementation it's kind of exotic, so here's the tutorial:
There are three main modes on the Editor, which are:
This mode is the one to navigate around, perform undo operations and navigate
on the another modes. You can get here by pressing ESC key anywhere.
When on the NORMAL mode, you can:
- Press
ENTERorj: Go to the line below (if exists) - Press
k: Go to the line above (if exists) - Press
u: Undo what you have done - Press
i: Enter onINSERTmode - Press
:: Enter onCOMMAND INSERTmode
This mode is the one to perfom type operations on your file. You can get here
by pressing the i key while on NORMAL mode.
When here, you can:
- Press
ESC: Go back to theNORMALmode - Press
*(any key): Insert character at the end of the current selected line
Here you can perfom read/write of files, go-to specific lines, append, insert,
remove lines... To get here you just need to type : while on NORMAL mode.
When on this mode, you can use the following commands:
-
:W [<name>]Saves all lines of the buffer in
nameASCII file. Ifnameisn't specified, simply saves on the actual file. If the actual filename wasn't provided, ELIS will ask for thenameargument. -
:E <name>Reads to the buffer all lines of an
nameASCII file, If the specified file don't exist, an empty ASCII filenamewill be created. -
:I [n]Enter in INSERT mode, being possible to insert text before Nth line. If
nisn't provided, text will be inserted before actual line. -
:A [n]Enter in INSERT mode, being possible to insert text after Nth line. If
nisn't provided, text will be insertedafteractual line. -
:M [n]Makes Nth line the actual line. If
nisn't provided, then the current line will be the last line on buffer. -
:D [n [m]]Remove
ntomlines. If onlynis give, remove only that line. If no numbers are given, removes the current line. -
:HProvides a cool help text.
-
:QQuits the program. If the actual text isn't saved, the program will show an alert asking for save.
This project was made by the following fellas:
And a special thanks to:
