Coder Social home page Coder Social logo

add-ed's People

Contributors

gennyble avatar sidju avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

isgasho 0xack13

add-ed's Issues

Adding multi-buffer support

Inspired by the old "qed" editor, adding support for multiple buffers via the 'b' and 'B' commands could be nice. In a terminal UI this would add little, but for a vi style UI or a multi window GUI it adds some flexibility.

As always, I'd love to hear some feedback before I commit on this feature.

"/" command input reaches codepath that should be unreachable

Internal error! Save and quit, and please report at `https://github.com/sidju/add-ed/issues`
debug data: UnreachableCode { file: "/home/solofs12/.cargo/registry/src/index.crates.io-6f17d22bba15001f/add-ed-0.13.0/src/cmd/parsing/selection.rs", line: 245, column: 7 }

At least it doesn't crash :)

Moving with tags behaved oddly

When moving selection 'x,'y forward the tag x was duplicated and left on the line immediately following the selection. Furthermore the line that the selection was moved to ended up being placed where the selection was before.

Very strange....

Separate w and W handling

The differences are sufficient in how it affects the handling of current filepath to warrant a separate handler. Current implementation has some errors causing the filepath to be changed unduly if there is no explicit selection given to W, which has now caused me some minor data loss....

Can't save empty file

Selection validation errors on saving an empty file. Until someone requests support for this I'll leave it as is, since one usually doesn't open a text editor to save an empty file (the touch command does it well enough) and it can prevent accidents.

cant build local fork

in hired, trying to reference a local clone of add-ed results in there being no feature named vecbuffer.

steps to reproduce error:

  1. clone hired
  2. clone add-ed
  3. set add-ed in hired's Cargo.toml to local add-ed e.g.: path="../add-ed"
  4. cargo build

I tried removing the feature from hired in Cargo.toml and explicitly setting it in add-ed but still cant find VecBuffer in hired. patch notes suggest feature is implicit but it cannot be found when removing the feature flag despite versioning being the same in remote and local add-ed.

`i` to start inserting

When I use /bin/ed comes with macOS Ventura (which I'm not sure how standard this is), I can do such thing as below.

ed
i
insert these
lines
.
,p
insert these
lines

and i allows me to insert right away.

But hired complains with No prior selection exists. when I wish it just works.


(as a side note)
On the other hand, ed doesn't print whole body with just , - as it require it to be ,p - but hired does print all lines which is very convenient ๐Ÿ‘๐Ÿผ.

Adding inserting variants for 'm', 't', 'r',etc.

There is some groundwork done and could be nice to add inserting/prepending variant commands for the commands that append. On the other hand there is support for basic arithmetic in all index parsing, so the functionality would be heavily redundant.

My current plan is to leave the variants out of the coming release but leave the internal code for their implementation (unreachable), unless someone expresses opinions for or against them.

Undo messages

The History struct should add support for having a message describing the action that creates a snapshot. This would enable undoing/redoing to return a string similar to "Undid ,a" or "Redid ,a", which would greatly help navigating the undo/redo history.

Undo behaviour

There is some debate over undo behaviours. The options (I currently know of) are:

  • "simple" undo, where all redo potential is lost when you perform an action
  • "tree" redo, where every action after you have undone creates a new branch
  • "revert" undo, where the undo is an undoable action (see here)

Aside from simple (which is currently imlemented) the behaviours enable accessing every state the application has been in during this session.

I don't have strong opinions, if someone is gifted with such please opine and/or share PRs here.

'g', 'G', 'v', 'V' commands behave unpredictably when nested

Due to History using a single matched field per line, nested interactions that affect that field cause unpredictable behaviour.

Potential fixes are either blocking nested interaction, making the matched flag a list of bools pushed and popped by operations on it, or backing to use find_matching to just find nearest line matching after index each execution (not dealing with any changed selections or moves by commands).

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.