Skip to content

In this project I will try to implement a usable code editor using only C programming language.

License

Notifications You must be signed in to change notification settings

nikiene/simple-text-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-text-editor

We finally have a functional editor, were you can open a new or existing file, modify it, and save it to the disk! I still need to add more functions to it, but im happy to say that you can try it already.

For now it only works for C programming language, in the future i will update it with more fuctionalities and other languages support.

Running the editor:

  • Clone the repository:

    First of all we need to clone the git repository on our local machine. Fire up your prefered terminal and type in

    git clone https://github.com/nikiene/simple-text-editor.git
    
  • Get inside the project's folder:

    cd ./simple-text-editor
    
  • Setup:

    Install the GCC C Compiler and the Make program.

    For Windows users:

    You will need to install some kind of Linux environment on your machine. You can use a Virtual Machine or WSL (Official Microsoft WSL guide: https://learn.microsoft.com/pt-br/windows/wsl/about). After installing your preferred Linux distribution, you will need to run this command inside the bash:

    bash
    sudo apt-get install gcc make
    

    image

    For Mac users:

    Run this on your terminal:

    xcode-select --install
    

    For Linux users:

    Run this on your terminal:

    sudo apt-get install gcc make
    

    Now that everything is set up, we can actually run the program!

  • Running:

    To run the editor is very simple:

    Inside the project folder just type in this command:

    make
    

    image

    It compiles the code and generates an executable.

    After you have succesfully compiled the code just type in this command to create a new file:

    ./main
    

    image

    Or you can specify the path to the file you want to open:

    image

    image

INSPIRATIONS:

https://viewsourcecode.org/snaptoken/kilo/01.setup.html

https://www.averylaird.com/programming/the%20text%20editor/2017/09/30/the-piece-table

About

In this project I will try to implement a usable code editor using only C programming language.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published