Add Twig configuration
This commit is contained in:
parent
7dbde2b56d
commit
cd286eb7ee
1 changed files with 26 additions and 0 deletions
|
@ -1305,6 +1305,32 @@
|
||||||
|
|
||||||
#+INCLUDE: init-circe.org :minlevel 3
|
#+INCLUDE: init-circe.org :minlevel 3
|
||||||
|
|
||||||
|
** Twig
|
||||||
|
|
||||||
|
Since twig is essentially a HTML template language, many tags must
|
||||||
|
be edited. Tagedit is good for restructuring existing tag
|
||||||
|
structures and adding single tags, whereas emmet mode is good when
|
||||||
|
you know more about the HTML hierarchy you're going to add.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(add-hook 'twig-mode-hook 'tagedit-mode)
|
||||||
|
(add-hook 'twig-mode-hook 'emmet-mode)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Since Twig is a /template/ language, and thus not just HTML, electric
|
||||||
|
pairing is a blessing.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(add-hook 'twig-mode-hook 'electric-pair-local-mode)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Both HTML and Twig mode aren't traditional text modes, so
|
||||||
|
=auto-fill-mode= doesn't make sense.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(add-hook 'twig-mode-hook (turn-off auto-fill-mode))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
* Minor mode customization
|
* Minor mode customization
|
||||||
|
|
||||||
Many minor modes also offer a bit of customization possibilities.
|
Many minor modes also offer a bit of customization possibilities.
|
||||||
|
|
Loading…
Reference in a new issue