1
0
Fork 0

[oni-yasnippet] Change the default expand condition

By default I don’t want any snippets to be expanded in either strings or comments.
This commit is contained in:
Tom Willemse 2021-09-19 23:53:47 -07:00
parent bede6c21cf
commit f6938f85c7
Signed by: ryuslash
GPG key ID: 7D5C407B435025C1

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2021.0715.212830 ;; Version: 2021.0919.235328
;; Package-Requires: (yasnippet yasnippet-snippets diminish) ;; Package-Requires: (yasnippet yasnippet-snippets diminish)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -36,6 +36,8 @@
(with-eval-after-load 'yasnippet (diminish 'yas-minor-mode)) (with-eval-after-load 'yasnippet (diminish 'yas-minor-mode))
(setq-default yas-buffer-local-condition yas-not-string-or-comment-condition)
(define-key yas-minor-mode-map (kbd "<tab>") nil) (define-key yas-minor-mode-map (kbd "<tab>") nil)
(define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand) (define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand)
(define-key yas-minor-mode-map (kbd "SPC") yas-maybe-expand) (define-key yas-minor-mode-map (kbd "SPC") yas-maybe-expand)