Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Change to xterm.js #1275

Closed
Closed

Description

@mofux

Hi, after evaluating several JS libs for terminal emulation to improve the performance of hyper, I found that https://github.com/sourcelair/xterm.js would probably better suite this project.

  • 👍 It is actively maintained.
  • 👍 Used by Visual Studio Code and maintained by @Tyriar , who would probably welcome some combined efforts on fixing bugs and improving xterm.js
  • 👍 It doesn't require to sign an NDA to contribute
  • 👍 It doesn't isolate the terminal DOM inside an iframe, which makes it much easier to hack and style
  • 👍 It has solved some of the problems we are having with hterm currently, e.g. IME and CJK character support
  • 👎 It is currently being migrated to typescript, which might not be everyone's favourite flavour
  • 👎 It feels slightly less responsive at the moment, I think this is caused by the queue mechanism that tries to schedule big ui updates and introduces some ms lag - but it can be optimized

I did some quick tests replacing hterm with xterm.js and the performance seems level. I was also able to quick and dirty put in some of the features we get from hterm, e.g. changing the cursor color on bell.

If you like I can start working on pull request that replaces the current implementation with xterm.js, but I'd like to see some thumbs up for that first :neckbeard:

Activity

  1. added
    💬 Feedback Wanted
    🎨 Type: Enhancement
    on Dec 19, 2016
  2. changed the title [-][ENHANCEMENT] Change to xterm.js[/-] [+]Change to xterm.js[/+] on Dec 19, 2016
  3. rauchg commented on Dec 19, 2016

    @rauchg
    Member

    When I first tested it it had some serious problems in terms of support of terminal features and slower performance. Would be useful to revisit this now, though

  4. mofux commented on Dec 19, 2016

    @mofux
    Author

    Agree, would actually be good to have some reproducible test cases to compare both against each other. Like the vtop or emoji test for non standard-width characters (which is broken in xterm and hterm) and locale specific tests, as well as tests for unicode, performance (seq 1000000) etc... I will try to create a couple of test files and run them to compare the output.

  5. tbodt commented on Dec 20, 2016

    @tbodt
    Contributor

    It also may fix #270.

  6. tbodt commented on Dec 20, 2016

    @tbodt
    Contributor

    Actually it won't, it has no support for cursor shapes at all. It would be a lot easier to fix #270 though.

  7. KarlAmort commented on Dec 21, 2016

    @KarlAmort

    @mofux I recently generated the stats at #687 (comment). It's a really somewhat terrible ruby script but I could put it in a gist if you're interested.

    It's actually a bit involved to measure output lag (from the outside) because the actual commands finish long before the output arrives.

  8. tbodt commented on Dec 21, 2016

    @tbodt
    Contributor

    #1286 (comment)

    There are a number of other styling things I'd like to fix, such as underline/i-beam cursors not blinking, but the root cause is hterm. SO CAN WE PLEASE FOR THE LOVE OF GOD USE A JAVASCRIPT TERMINAL LIBRARY THAT DOES NOT REQUIRE SIGNING AN NDA TO CONTRIBUTE TO!!!!!!11!!1 #1275

  9. Tyriar commented on Dec 21, 2016

    @Tyriar
    Contributor

    FYI, the main issues on xterm.js to watch regarding perf are:

    It might be worth holding out on migrating until these 2 are tackled if the laggy input is too much of a regression (likely some time in January of February).

  10. SirTimmyTimbit commented on Dec 23, 2016

    @SirTimmyTimbit

    I say we wait then. We finally have a good looking terminal on Windows, I'd be sad if it turns laggy :(

  11. mofux commented on Dec 26, 2016

    @mofux
    Author

    I agree. Thanks @Tyriar for giving us a rough roadmap. I'll follow the issues closely and catch up again once they have been resolved.

  12. dionisokan commented on Dec 29, 2016

    @dionisokan

    +1 for switching to xterm.js. As an Asian user, I would be very happy to see correctly rendered CJK characters and support for IME, as for now they mess up any other output in hyper.

  13. rauchg commented on Dec 29, 2016

    @rauchg
    Member

    @dionisokan can you describe the issues you have with the IME support in 1.0? cc @matheuss

  14. dionisokan commented on Dec 30, 2016

    @dionisokan

    @rauchg I have uploaded two GIFs (iTerm 2 & Hyper 1.0) depicting Chinese IME usage under iTerm 2 and Hyper 1.0, with the same font configuration in both terminal emulators.
    I typed zhongwenceshi in order to get 中文测试. As the GIFs show, the iTerm one is normal, and what it should be, while the Hyper one is unacceptable.
    Thanks in advance for looking into this problem. Also, this is likely the same issue as #149.

  15. 42 remaining items

  16. chabou commented on Nov 2, 2017

    @chabou
    Contributor

    You can already use it.
    Available on canary update channel.

  17. vallamost commented on Nov 6, 2017

    @vallamost
    Contributor

    @chabou when on the canary channel how do you flip hyper over to xterm?

  18. matthecarl commented on Nov 6, 2017

    @matthecarl
    Contributor

    @isseiler the canary update channel sets xterm as the default

  19. lijunle commented on Nov 6, 2017

    @lijunle

    Update your .hyper.js config file:

    image

  20. Tyriar commented on Apr 18, 2018

    @Tyriar
    Contributor

    Close me, I'm done ✨

  21. mofux commented on Apr 18, 2018

    @mofux
    Author

    A long journey finally comes to an end ♥️ -- but a new journey has just started! Now that we are on xterm.js it's in our hands to improve Hyper and xterm to build the most awesome terminal in the block 🎉 Big thanks to everybody involved making this happen 💪

  22. chabou commented on Apr 19, 2018

    @chabou
    Contributor

    @mofux Let's do this!

  23. DRSDavidSoft commented on Apr 22, 2018

    @DRSDavidSoft

    @mofux So Hyper v2.0 use xterm.js? Also, what did it use before xterm.js? Did Zeit develop the terminal ui before xterm.js?

  24. chabou commented on Apr 22, 2018

    @chabou
    Contributor

    @DRSDavidSoft before that we used hterm (Chromium embedded terminal), in a iframe, with a lot of monkey patches. Without any power to enhance it. It was backed by DOM. More pluggable but less perfmonant/robust/healthy than xtermjs, backed by a canvas render engine and an amazing community.

  25. ppot commented on Apr 22, 2018

    @ppot
    Contributor

    @DRSDavidSoft Indeed the UI is developed since the start. We where using hterm but xterm is more promising and useful since we are in contact with actives maintainers and we can reduce bugs or isolate them more easily.

  26. cgatian commented on May 10, 2018

    @cgatian

    @Tyriar does this mean it should be possible to use within VS Code ?

  27. albinekb commented on May 10, 2018

    @albinekb
    Contributor

    No @cgatian, we now use the same library as in vs code do render the terminal, VS Code already have a built in terminal 👍

  28. spyshow commented on Jun 6, 2018

    @spyshow

    how we can integrate hype with internal vs code terminal.
    as I can see in the issues it was not possible because it was not using the xterm.js but now we are on 2.0 so how can we do it?

  29. mofux commented on Jun 6, 2018

    @mofux
    Author

    Hyper and vscode both use xterm.js to render the terminal, but apart from that they are two completely separate applications with different architectural designs. Both cannot be integrated into each other. But the good news is: contributing enhancements and addons to xterm.js will allow both to use them! The xterm.js crew is currently working on a plugin architecture that once landed will make it much easier for vscode and hyper to use addons written for xterm.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🎨 Type: Enhancement💬 Feedback Wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions