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

Support for multiline editing #1

Closed
digikar99 opened this issue Jul 15, 2023 · 1 comment
Closed

Support for multiline editing #1

digikar99 opened this issue Jul 15, 2023 · 1 comment

Comments

@digikar99
Copy link
Collaborator

Currently, multiline editing support seems poor. This can be improved by taking inspiration from SLIME.

This probably requires modifying how the history is saved and loaded, because the default way stores history line by line which interferes with multiline inputs.

rlwrap provides a multiline mode; however this ties into an external editor which is what we want to avoid if we want to provide a ipython-like featureful REPL.

digikar99 added a commit that referenced this issue Jul 18, 2023
…iro#56)

This commit includes a number of inter-related changes:

- A history file is introduced that stores entries in a string-by-string manner,
similar to SLIME. This easily takes care of inputs containing multiple lines.
- To be able to edit a multiline input, the #\newline and #\return signals are
mapped to MAY-BE-INSERT-NEWLINE, which either inserts a newline character, or
completes the command using rl_newline.
- For correct keyboard navigation in the presence of color codes, prompt ignore
codes defined by libreadline are used.
- Some common keys are bound to commands for visiting previous/next line, and
for previous/next input.
@digikar99
Copy link
Collaborator Author

Done.

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

No branches or pull requests

1 participant