summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/init.el19
1 files changed, 18 insertions, 1 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index a8a8a8f..5cdbf2f 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -78,6 +78,13 @@
(mapcar 'car smart-tabs-insinuate-alist))))
(use-package editorconfig
:config (editorconfig-mode 1))
+(use-package outline-magic
+ :commands (outline-cycle
+ outline-next-line
+ outline-move-subtree-up
+ outline-move-subtree-down
+ outline-promote
+ outline-demote))
;; Major modes (non-HTML-related)
(use-package bats-mode :mode "\\.bats\\'")
(use-package bison-mode
@@ -96,7 +103,13 @@
(use-package markdown-mode :mode ("\\.markdown\\'" "\\.md\\'" "\\.ronn\\'"))
(use-package meson-mode :mode "/meson\\(\\.build\\|_options\\.txt\\)\\'")
(use-package nginx-mode :mode ("nginx\\.conf\\'" "/nginx/.+\\.conf\\'"))
-(use-package yaml-mode :mode "\\.\\(e?ya?\\|ra\\)ml\\'")
+(use-package yaml-mode
+ :mode "\\.\\(e?ya?\\|ra\\)ml\\'"
+ :config (add-hook 'yaml-mode-hook
+ (lambda ()
+ (outline-minor-mode t)
+ (set (make-local-variable 'outline-regexp) "[ \t]*[A-Za-z-]")
+ )))
;; Major modes (HTML-related)
(use-package coffee-mode
:mode ("\\.coffee\\'"
@@ -337,6 +350,10 @@ sh-script.el is broken."
(local-set-key [C-tab] 'hs-toggle-hiding)
))
+(add-hook 'outline-minor-mode-hook
+ (lambda ()
+ (define-key outline-minor-mode-map [C-tab] 'outline-cycle)))
+
(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode))
(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode))
(add-to-list 'auto-mode-alist '("\\.mak\\'" . makefile-gmake-mode))