Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a line mode to the editor #660

Merged
merged 17 commits into from
Sep 19, 2024
Merged

Add a line mode to the editor #660

merged 17 commits into from
Sep 19, 2024

Conversation

vinc
Copy link
Owner

@vinc vinc commented Sep 17, 2024

This PR is a test to see how useful it would be to have a tiny subset of ed/vi commands in the editor.

@vinc
Copy link
Owner Author

vinc commented Sep 17, 2024

Testing a substitute command:

edit-line

@vinc
Copy link
Owner Author

vinc commented Sep 17, 2024

Now with regex support for the substitute command:

edit-line-regex

(note that the g flag is gone, we need to also add Regex#replace_all for it)

@vinc
Copy link
Owner Author

vinc commented Sep 17, 2024

The --command transform the editor into a kind of "stream editor" like sed and it would be easy to do alias sed "editor --command".

edit-line-arg

@vinc vinc marked this pull request as ready for review September 19, 2024 21:32
@vinc vinc merged commit ef24145 into trunk Sep 19, 2024
1 check passed
@vinc vinc deleted the feature/line-editor branch September 19, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant