(kbd-map (:mode in-math?) ("1 var" (insert `(rsub "1"))))The above code snippet works fine with either "1 var" or "1 tab".---- On Fri, 20 Sep 2019 23:11:41 +0800 Zhuyang Wang <address@hidden> wrote ----Hi,I am wondering if there is a convenient way to turn the numbers after a symbol into a subscript. For example, now I have the following keybinding in my config:("a 1" (insert '(concat "a" (rsub "1"))))And then copy and paste for other characters and subscripts. I hope there is a better solution than copy/paste. My current idea is to set up a keybinding for "1 tab", "2 tab", etc, so that the tab will turn the number into a subscript of the previous symbol. But I don't quite know how to move in the document tree (or directly manipulate it). I read the document "Programming routines for editing documents" but still have no idea, like how can I get the tree representing the symbol before the cursor.Thanks!Zhuyang
Archive powered by MHonArc 2.6.19.