aboutsummaryrefslogtreecommitdiffstats
path: root/oni-yasnippet.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-06-30 15:17:55 -0700
committerGravatar Tom Willemse2021-06-30 15:18:11 -0700
commitf57409a57f321dbf19baa1bda18e13b940a5ff22 (patch)
tree180f4c63f3db5e0b9b77d364dff6d30a72f15da7 /oni-yasnippet.el
parente50eef726815feeb41aaabc3e9d783596c3b9d7e (diff)
downloademacs-config-f57409a57f321dbf19baa1bda18e13b940a5ff22.tar.gz
emacs-config-f57409a57f321dbf19baa1bda18e13b940a5ff22.zip
[oni-yasnippet] Try expanding snippets when ‘SPC’ is pressed
This hopefully makes it easier for me to use snippets. I always forget about them.
Diffstat (limited to 'oni-yasnippet.el')
-rw-r--r--oni-yasnippet.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/oni-yasnippet.el b/oni-yasnippet.el
index b6b8755..253e407 100644
--- a/oni-yasnippet.el
+++ b/oni-yasnippet.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2020.0408.105714
+;; Version: 2021.0630.150352
;; Package-Requires: (yasnippet yasnippet-snippets diminish)
;; This program is free software; you can redistribute it and/or modify
@@ -31,9 +31,10 @@
(with-eval-after-load 'yasnippet (diminish 'yas-minor-mode))
+(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 "SPC") yas-maybe-expand)
(define-key yas-minor-mode-map (kbd "TAB") nil)
-(define-key yas-minor-mode-map (kbd "<tab>") nil)
;;;###autoload(with-eval-after-load 'yasnippet (require 'oni-yasnippet))
;;;###autoload