Browse Source

Emacs: Fix YASnippet expansion in insert mode

master
Riyyi 12 months ago
parent
commit
50d8e3f455
  1. 2
      .config/emacs/site-lisp/dot-development.el
  2. 4
      .config/emacs/site-lisp/dot-evil.el

2
.config/emacs/site-lisp/dot-development.el

@ -463,7 +463,7 @@
;;; YASnippet ;;; YASnippet
(elpaca-setup yasnippet (elpaca-setup yasnippet
(:autoload yas-insert-snippet) (:autoload yas-expand yas-insert-snippet)
(setq yas-snippet-dirs (list (expand-file-name "snippets" dot-emacs-dir))) (setq yas-snippet-dirs (list (expand-file-name "snippets" dot-emacs-dir)))
(setq yas-prompt-functions '(yas-completing-prompt)) (setq yas-prompt-functions '(yas-completing-prompt))
(:when-loaded (:when-loaded

4
.config/emacs/site-lisp/dot-evil.el

@ -59,7 +59,9 @@ Vim equivalence: <C-D>"
"Shift line right, retains cursor position. "Shift line right, retains cursor position.
Vim equivalence: <Tab>" Vim equivalence: <Tab>"
(interactive) (interactive)
(insert "\t")) (when (not (yas-expand))
(insert "\t")))
(defun dot/evil-visual-shift-left () (defun dot/evil-visual-shift-left ()
"Shift visual selection left, retains the selection. "Shift visual selection left, retains the selection.

Loading…
Cancel
Save