Giter Site home page Giter Site logo

Keys missing in Emacs key mode about nyxt HOT 1 OPEN

impaktor avatar impaktor commented on June 20, 2024
Keys missing in Emacs key mode

from nyxt.

Comments (1)

aadcg avatar aadcg commented on June 20, 2024

@impaktor thank you for taking the time sharing your experience.

  • PgUp -> BKSPC (symmetric with SPC for PgDn). I.e. not just C-v / M-v for PgDn/PgUp in input buffers. In Emacs buffers like Info-pages (any many other places, one would expect SPC & BKSPC to also navigate).

I doubt it would be a good default. Note that SPC and Shift+SPC correspond to PgDn (C-v) and PgUp (M-v), respectively. Backspace is often used as a "Back" command in most web browsers.

  • C-h i -> index / table of content of manual if possible (C-h t, and C-h k in Nyxt already mirror Emacs behavior)

Note that C-h r in Nyxt is bound to bringing up the manual (just like in Emacs); and there's no analog of Emacs' C-h i in Nyxt. So it seems we're being consistent.

  • ESC (abort) -> C-g This was a major pain point for me, and I tried to figure out how to re-bind it, but interestingly, to see what is bound to ESC: "C-h k ESC" does not work, nor C-h b and searching for "esc", "escape", "abort" in list of all bound keys)

It seems that you may have missed something here. We have the nothing command and it is bound to C-g by default. For instance, if you invoke the prompt buffer (via M-x) followed by C-g, it will abort it.

C-h k ESC won't show anything because the Escape key isn't bound to any command (in the context of document-mode), meaning that it is being forwarded directly to the renderer. I believe that the overall UI/UX of C-h k is very poor, and there are other issues related to it too (see #2997). Patches are welcome :)

  • F5 (reload buffer) -> g (like many popular Emacs major modes like magit, notmuch, elfeed)

The command reload-current-buffer is bound to C-r when emacs-mode is enabled. F5 is enabled when the default CUA keybindings are enabled.

We could bind it to g. Historically, however, we have always avoided binding keys that are inherently modal in emacs-mode (in other words, keys without modifier keys as prefixes). g would then mean "insert the g character" or reload-current-buffer depending on what kind of HTML element has the focus. Personally, I disagree with the chosen path since navigating the web is inherently modal. In other words, emacs-mode should be populated with keybindings that don't have modifier keys as prefixes.

To sum up, while this change won't probably happen, it would easy for the user to add this keybinding in their config.

  • Possibly remove C-SPC all together (I see there's code in the manual for doing this on per-config basis, I'm merely suggesting having it removed by default in "Emacs mode" of Nyxt.)

I can't think of any good reason that would prompt for such a change.

  • "C-x b RET" would switch to penultimate visited buffer,

I agree 100%. The reason why it doesn't exhibit that behavior is because the current buffer suggestion at the prompt buffer sets the main buffer. In other words, it would be jarring for switch-buffer to immediately change the buffer view. See commit c61c17d. I find the current iteration a bit clumsy though. In my view, a better default would be to list the last visited buffer at the top of the prompt buffer; and disable having the main buffer follow the prompt buffer's current buffer suggestion. But we'd need to discuss it with @jmercouris.

which-key functionality

I think this kind of functionality doesn't belong to Nyxt's core, just like it doesn't belong to Emacs' core. I have tried which-key in Emacs and quickly realized that it doesn't provide enough value in my experience. Obviously, others may disagree. But that's precisely the point - that kind of functionality is better suited as an a Nyxt extension.

from nyxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.