From fe1378bc2908850c6fee11414c0d467e6cda98a7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 9 Aug 2020 17:27:37 +0100 Subject: +html/css/js configuration for Emacs Use web mode for as much stuff as possible, also setup emmet for ease of use in html --- Emacs/.config/emacs/config.org | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Emacs/.config/emacs/config.org') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 166a247..1b67d6d 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1011,6 +1011,27 @@ use-package clang-format for ease of use formatting, binding to "C-c '" for both (bind-key "C-c '" #'clang-format-region c-mode-map) (bind-key "C-c '" #'clang-format-region c++-mode-map)) #+END_SRC +** HTML/CSS/JS +Firstly, web mode for consistent colouring of syntax. +#+BEGIN_SRC emacs-lisp +(use-package web-mode + :mode ("\\.html" . web-mode) + :mode ("\\.js" . web-mode) + :mode ("\\.css" . web-mode)) +#+END_SRC + +Then emmet for super speed +#+BEGIN_SRC emacs-lisp +(use-package emmet-mode + :hook (web-mode . emmet-mode) + :general + (general-def + :states 'insert + :keymaps 'emmet-mode-keymap + "TAB" #'emmet-expand-line + "M-j" #'emmet-next-edit-point + "M-k" #'emmet-prev-edit-point)) +#+END_SRC ** Emacs lisp #+BEGIN_SRC emacs-lisp (with-eval-after-load "lisp-mode" -- cgit v1.2.3-13-gbd6f