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 support for vim #86

Merged
merged 2 commits into from
Dec 12, 2024
Merged

Add support for vim #86

merged 2 commits into from
Dec 12, 2024

Conversation

ianthomas23
Copy link
Member

Add support for vim editor. This is the first wasm command that uses the whole terminal and performs complex input-output whilst it is running.

Here are some screenshots showing coloured syntax highlighting and spell checking (using set: spell):

Screenshot 2024-12-12 at 12 58 15 Screenshot 2024-12-12 at 12 58 37 Screenshot 2024-12-12 at 12 59 32 Screenshot 2024-12-12 at 13 00 24

Key implementation changes are handling of a few more termios settings, and monkey patching a new poll function into loaded wasm modules so that they can poll to see if input is ready to read.

Limitations:

  • It doesn't include docs and tutorial which is by design to reduce the size of the compiled package. But there are still links to the docs which will error out if accessed.
  • Does not respond to resizing the terminal whilst vim is running.
  • It is not possible yet to use a bespoke vimrc file.

@ianthomas23 ianthomas23 added the enhancement New feature or request label Dec 12, 2024
@ianthomas23 ianthomas23 merged commit fdd61f1 into main Dec 12, 2024
6 checks passed
@ianthomas23 ianthomas23 deleted the vim branch December 12, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant