2021-09-23, updated: 2024-03-12

Tags: feature.

"Why should I use Nyxt if I can use Vimium?"

"Why should I use Nyxt if I can use Vimium?"

By John Mercouris and Pedro Delfino

The infamous question

After introducing Nyxt to some people, it is frequent to hear to questions such as: Why should I use Nyxt if I can use Vimium (or 'Vimari 'Vrome 'Chromemacs 'Vimperator …) in my-favorite-popular-web-browser?

This question is reasonable. Web browsers and their extensions are part of one's daily habits. If one happens to be productive using them, it just makes sense to be really careful before trying something new.

In order to answer this frequent question, we decided to list four points that show the difference between Nyxt and popular plug-ins such as:

All of them try to bring the Vim/Emacs philosophy to mainstream web browsers. Our goal is not to demean other projects but clarify the contrast between Nyxt and those plug-ins. Each point will be illustrated by useful practical examples.

Differences

  1. Nyxt is fully customizable and extensible, plug-ins are not. Practical examples:
    • In Nyxt, users can completely customize anything. All functions are available for overwriting/modification. For example, you could decide that you want your download manager to start your coffee maker whenever a download finishes.
    • It is possible to change anything about how the browser behaves. With traditional plug-ins you are sandboxed with regards to what operations you can perform. For example, can you access and clear cookies on your disk? Can you access the network and initiate an SSH session?
    • In addition to being fully customizable, Nyxt has the capability of being modified and tweaked while it is running. You don't have to restart Nyxt to test your changes!
  2. Nyxt can perform computation in separate background threads while plug-ins cannot. Practical examples:
    • Having multiple plug-ins make regular browsers (Firefox, Chrome, Safari, etc) slower when doing the rendering. In Nyxt, adding more commands, modes, and hooks won't make it slower.
    • Plug-ins fail to work when a page context is not yet loaded. Oft one has problems using their favorite keybindings on some pages in which the context for a extension to run does not exist.
  3. Nyxt can interact and integrate with the user's operating system to run external programs or scripts while plug-ins cannot. Practical examples:
    • Nyxt connects to the user's terminal. Hence, while visiting a GitHub repository in the browser it is possible to execute a git clone command in Nyxt that has the same effect as it would be have if executed in the terminal. Nyxt asks for the destination and then runs asynchronously the process of cloning Git repositories to disk. Thus, Nyxt can easily be an interface to the host system.
    • Another example is using youtube-dl as described in this previous article. It is possible and easy to turn a command-line code into a Nyxt browser command to download videos.
  4. Nyxt is programmed in Common Lisp, plug-ins are in JavaScript. Practical examples:
    • Link hinting provides a practical illustration. In Nyxt, the contents of the link hints are collected and, after querying the page, all clickable elements are returned as a list in Common Lisp. Then, all sorts of algorithms from fuzzy matching on the URLs become possible outside of Javascript. This process has a multithreaded nature which is simply not possible strictly in Javascript.

Conclusion

Plug-ins focus on link-hinting, keybindings, and navigation. Nyxt also covers these topics but with more depth, power, and flexibility.

Although the previous topics favor Nyxt over plug-ins, it is important to highlight that plug-ins also have unique benefits. Currently, the main one is the fact that Nyxt does not support Web Extensions while plug-ins are by definition part of an ecosystem of Web Extensions.

The support of Web Extensions in Nyxt is under experimental development and we hope this difference will soon disappear. Stay tuned and may the power of Nyxt be with you :)

Credits

The idea for this article emerged after a conversation with Felipe César (felpsio). Thank you for inspiring us to write this down :)

From our community, @dtw-waleee and @edgar-vincent for their valuable feedback!


Did you enjoy this article? Register for our newsletter to receive the latest hacker news from the world of Lisp and browsers!