创建了以下YASnippet(在Org模式下自动创建标题):
# key: org
# name: org
# --
#+TITLE: ${1:`(capitalize (file-name-nondirectory (file-name-sans-extension
(buffer-file-name))))`}
#+Time-stamp: <2013-10-08 Tue 21:32>
#+INCLUDE: "preamble.org"
$0
在大多数情况下,一切都是正确的,除非我在标题中输入“t”字符...
它适用于其他字母,而不适用于那些字母。找不到原因。有什么想法吗?
答案 0 :(得分:0)
问题出现在以下代码中:
;; allow YASnippet to do its thing in Org files
(add-hook 'org-mode-hook
(lambda ()
;; YASnippet (using the new org-cycle hooks)
(add-to-list 'org-tab-first-hook
'yas/org-very-safe-expand)
;; When enabled, problem with inserting letter `t' in YASnippet fields
;; (define-key yas/keymap
;; (kbd "tab") 'yas/next-field) ; `yas/next-field-or-maybe-expand'?
))