Hi forum,
I am trying to bind new keys to exit from superscript like mentioned in this post:
http://forum.texmacs.cn/t/alternative-to-arrow-keys-to-exit-from-sub-superscripts/865
However, after I customized the my-init-texmcs.scm file, only part of my commands work.
(menu-bind insert-menu
(former)
---
("Dear Sir" (insert "Dear Sir,")))
(kbd-map
(:require (inside? 'equation*))
("space" (structured-exit-right)))
(kbd-map
(:require (inside? 'equation))
("space" (structured-exit-right)))
(kbd-map
(:require (inside? 'eqnarray*))
("space" (structured-exit-right)))
(kbd-map
(:require (or (inside? 'equation*) (inside? 'equation) (inside? 'eqnarray*)))
("space" (structured-exit-right)))
(kbd-map
("C-space" (structured-exit-right)))
(kbd-map
("D e f ." (make 'definition))
("L e m ." (make 'lemma))
("P r o p ." (make 'proposition))
("T h ." (make 'theorem)))
(kbd-map
("P r o o f ." (make 'proof)))
The last line serves as a sanity check. When I type “P r o o f .”, TexMacs does insert a proof block. This indicates the program did load the scheme file.
However, the key binding to the function (structured-exit-right) doesn’t work. For example, if I type “$ x ^ 2 space”, I expect the cursor moves from the superscript to the place after the superscript so that I can continue to type my equation without moving my hand to the arrow keys. But TexMacs doesn’t register this behavior. Instead, if I keep pressing space button, it inserts spaces.
In addition, I could not find the expected menu option “Dear Sir”, which is defined in the first block of my file.
As a new user, I am trying to learn the basic customization but got really confused. I would appreciate any insights on where the problem is. Many thanks!