Coder Social home page Coder Social logo

ijk's Issues

support num command

In vi, user is able to repeat a command multiple times by num followed by the command (e.g. 4x to remove the character 4 times).

Currently, recognizing the num part is only to JUMP node on FSM. To make it possible for num part to cooperate with other commands, we may need to move the num part to INIT node, or add new edge from JUMP node (should be renamed to NUM btw).

Anyway, the change should be undoable atomically and the concept of change log set is implemented in prior.

repeat the latest command by dot

The current ijk does not implement . to repeat the latest command because simply repeating the latest log may be invalid. For example, delete 4 chars when there is only 3 chars in the buffer, what would happen? This may lead to SEGV.

An idea is that apply_log should return Result and when it is Err the editor state is restored and the repeat command only succeed the log returns Ok.

change log set

When shifting multiple lines with range+> or <, the undoing will undo the change line by line, no atomically. The natural behavior should be undoing atomically. Obviously we need a concept like change log set which is namely a set of change log which is undoable at once.

The change log set is, in database context, kind of transaction which contains multiple change set which is able to revert atomically later.

C-f and C-b should reach the end

C-f does not reach the end when there is shorter than one page distance to the end. This behavior is bit awkward compared to original vi. The cursor should reach the end as G jumps to the end. (pressing C-f continuously = G) So is C-b.

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.