Git Product home page Git Product logo

yocto's Introduction

Yocto

A simple and compact text editor using ncurses and a gap buffer, written in C++, in ~650 lines of code. More information is available on the wiki.

How to use

make build
make install

Or use the user-friendly dialog utility (wizard.sh) which also supports configuring yocto

License

Copyright (C) 2022-2024 ikozyris
Copyright (C) 2022-2024 gkozyris

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

yocto's People

Contributors

gkozyris avatar ikozyris avatar vitaspiros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

vitaspiros

yocto's Issues

Live editing

As almost all text editors do, being able to read the file while editing is a must feature.
For this issue to close, the following need to be complete:

  • Scroll on text (pager)
  • Insertion
    • Screen
    • File
  • Files can be saved and edited (without bugs)
  • There are no issues with line wrapping
  • Features from previous releases get ported
    • Makefile
    • Reading
    • Line numbers
  • Special keys work
    • Arrow keys
    • Enter
    • Control *
    • Backspace + Delete
  • Unicode (wchar_t)
  • Make code modular and separate it in functions and files

Cannot ran pre-compiled binary in ncurses branch

Expected behavior

When typing _ , as stated in the instructions, the program must replace _ with a space character.

Current behavior

The program does not replace _ (underscores) with spaces.

Specs

OS: Ubuntu 20.04
Program ran from: pre-compiled binary

It seems like the pre-compiled binary in the Binaries directory is outdated because when the program is built from source and then ran, its behavior is as expected. Please fix.

Cannot write more than 2 words

Steps to reproduce

Select either 2 or 3. Then on Enter text: type: word1 word2. You will notice that it will skip entering file name. Also, it will have created a file called word2 and its content will be: word1

Expected behavior

Create file with contents: word1 word2

Actual behavior

Described in "Steps to reproduce".

Non-interactive mode

Although the main feature of this program is that it is not what the issue says, there should be a non-interactive way to use it.

Display line number

Display line number before line content, e.g:

1| Hello world, this is the first line,
2| this is the second line..
3| of a boring text

Move cursor

Currently, there is no feature to move the cursor. If any arrow key is pressed, the cursor won't move. It could be added with ncurses.h. Some documentation can be found here:

I don't know how to use this library. I know the basics of the library
Current state:

  • Learn basics of ncurses
  • Get cursor position
  • Move cursor
  • Integrate it on the main program

Buggy reading

Steps to reproduce

Create a file with the following content:
THE START
Line 2
Line 3

Line 5
Line 6
THE END

Then try to read it.

Expected behavior

to read it properly

Actual behavior

It detects lines correctly (7) but because line 4 is empty it gets ignored. Output below:

THE START
Line 2
Line 3
Line 5
Line 6
THE END
THE END
THE END

Can only read from local directory

If tried to read a file located in a different than your local directory, the program crashes. e.g., the file is located on: /home/user/dir1/dir2 and the program is run on: /home/user/dir1/.

Makefile

Create a makefile for simplicity. Not needed but it would be fun doing.

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.