Org mode 中'<'后接两个以上字符的 yas 无法通过 tab 自动扩展

已关闭 company-mode,M-/(yas-expand)正常,想知道为什么 tab 不行。

GNU Emacs 26.1
macOS 10.13.6

thx @twlz0ne 补充:tab 键在 org-mode 下绑定如下:

<tab> runs the command org-cycle, which is an interactive autoloaded compiled
Lisp function in ‘org.el’.

It is bound to <tab>, <visual-state> <tab>, <normal-state> <tab>, TAB,
<insert-state> <tab>, <menu-bar> <Tbl> <Next Field>, <menu-bar> <Org>
<Show/Hide> <Cycle Visibility>.

(org-cycle &optional ARG)

TAB-action and visibility cycling for Org mode.
1 个赞

看你的描述,你已经确认是 yas 的问题了。

而更重要的信息你没有提供:org-mode 下 tab 键绑定的是哪个函数。

这就是问题所在了,你目前能展开的例如 <s,是 org-mode 自带的,并非 yas 提供。所以 tab 要绑定到 yas-expand 函数

1 个赞

got it. thx