Hello all,
I’ve been watching the Nyxt project for a few years now, and have decided to take the plunge. I’ve spent several hours reading the Nyxt documentation, reading up on Common Lisp, hacking with Portacle, and experimenting with Nyxt. Though I haven’t quite found my feet, I’m starting off small and trying to unset some bindings in emacs mode using my ~/.local/nyxt/init.lisp
file.
I’ve noticed that M-f and M-b default to navigate forwards and backwards. I’d like to remove those bindings, just to see what happens, but the Nyxt manual only shows how to add new bindings using a custom my-keymap global list. Here’s part of a snippet to add custom bindings that I found in the manual:
(define-key *my-keymap*
"C-f" 'nyxt/web-mode:history-forwards
"C-b" 'nyxt/web-mode:history-backwards)
I got that working; next step is to try unsetting some of the default bindings.
Thinking it through, I’d imagine that the default bindings are stored in a global list. To remove a binding, would I just put some Common Lisp to remove an item from a list into my init.lisp file? Something like this pseudo-code?
;; LOL, I'm just making it up because I don't know much yet
(remove-item-from-a-list *global-keymap* "M-f")
(remove-item-from-a-list *global-keymap* "M-b")
How could I figure out where the key bindings are kept? I’m not at the point yet where I can get Slime to do anything useful, and I’m still having trouble finding things with C-h c|f|h|C
. Does anyone have a suggestion about how to find things like a list inside a Lisp machine when you don’t know its name?
Once I know where the bindings are kept, should I just add my own Lisp code to edit the bindings list in init.lisp, or is there a better way to remove bindings? Looking forward to reading others’ thoughts on Nyxt and Lisp hacking. Thanks!