Coder Social home page Coder Social logo

shsms / mime Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 1.58 MB

mime is a scripting tool for text processing, inspired by Emacs Keyboard Macros.

Home Page: https://shsms.github.io/mime

License: GNU General Public License v3.0

Makefile 1.72% C++ 86.34% CMake 1.21% Rust 10.73%
cpp emacs scripting text-processing

mime's People

Contributors

shsms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mime's Issues

research cycle/deadlock detection

Some while loop cases to test:

  1. If there is a while(find/rfind), make sure we don't go back/forward such that the match gets found repeatedly.
  2. same with while(next/prev_line)

Add an Auto-fill function

Is your feature request related to a problem? Please describe.
When making changes, lines sometimes get too long. We need something like emacs' auto-fill mode to fold long lines and join short lines.

Describe the solution you'd like
We need a new method autofill(n) with optional n defaulting to 80. It would operate on a narrowed view if present, or on the entire document. We also need an autofill_region(n) that autofills only from mark to point, if a mark is present.

Find functions should return location of other end of the match

The find methods (find, rfind, find_fuzzy) return a boolean true if found, and move the cursor to the end (find, find_fuzzy) of the match, or to the beginning(rfind) of the match, and false if not found. Instead of returning a boolean, they should return the location of the beginning(find, find_fuzzy) of the match, or the end(rfind) of the match. And -1 if not found.

For example, find("hello") would move cursor to immediately after o if the text is found. find should return the location of h.

add ability to read from/write to files in chunks.

add file_reader class, which can read in chunks of n bytes or upto next delim, or upto first delim after n bytes.

add file_writer class, which can write to chunks, and can optionally add delim between chunks.

Add date/time functions

Add functions for:

  • getting the current time.
  • parsing time strings
  • formatting time to various string representations.

Add backspace and delete functions

Is your feature request related to a problem? Please describe.

Right now, to delete characters adjacent to the cursor, we need to make a region around it and delete the region, which is slow.

Describe the solution you'd like

On buffer objects,

  • a backspace function with optional size_t argument
  • a delete function with optional size_t argument

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.