all repos — nixfiles @ 19e0b7925af4551e71a5664d23b72efd7c6a3d53

System and user configuration, managed by nix and home-manager

Emacs: Create basic ansible major mode
Alan Pearce alan@alanpearce.co.uk
Thu, 07 Aug 2014 19:52:21 +0100
commit

19e0b7925af4551e71a5664d23b72efd7c6a3d53

parent

7931b7e3816cf4307a69737aeb1ea8c3727c3f62

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -688,6 +688,9 @@ :mode (("/group_vars/.*" . yaml-mode)          ("/host_vars/.*" . yaml-mode)
          ("\\.sls\\'" . yaml-mode)))
 
+(define-derived-mode ansible-mode yaml-mode "Ansible")
+(add-to-list 'auto-mode-alist '("\\(?:ansible.+\\|roles/.+/\\(?:tasks\\|handlers\\)\\)/.+\\.yml\\'" . ansible-mode))
+
 ;;;; Planning
 
 (req-package org