mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(emacs): Better vanilla emacs
This commit is contained in:
parent
6d9140dc52
commit
cfc5fc14af
10 changed files with 209 additions and 76 deletions
|
|
@ -60,9 +60,25 @@
|
|||
|
||||
;; Avy - act like Vim Easymotion
|
||||
(use-package avy
|
||||
:ensure t
|
||||
:config
|
||||
(evil-define-key '(normal) 'global (kbd "T") 'avy-goto-char)
|
||||
(evil-define-key '(normal) 'global (kbd "s") 'avy-goto-char-2)
|
||||
(evil-define-key '(normal) 'global (kbd "s") 'avy-goto-char-2-above))
|
||||
|
||||
(use-package yasnippet
|
||||
:ensure t
|
||||
:defer t
|
||||
:commands yas-minor-mode
|
||||
:hook ((prog-mode . yas-minor-mode)
|
||||
(org-mode . yas-minor-mode))
|
||||
:config
|
||||
(setq yas-indent-line 'fixed) ;; 让 snippet 展开时不影响缩进
|
||||
(setq yas-wrap-around-region nil) ;; 关闭自动包裹选中区域
|
||||
(advice-add 'yas-expand-snippet :around
|
||||
(lambda (orig-fn &rest args)
|
||||
(let ((inhibit-field-text-motion t)) ;; 禁止字段自动换行
|
||||
(apply orig-fn args))))
|
||||
(yas-reload-all))
|
||||
|
||||
(provide 'init-edit)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue