Last active
November 4, 2016 21:39
-
-
Save tbonza2/20757551443a61254aa6 to your computer and use it in GitHub Desktop.
Revisions
-
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -62,6 +62,7 @@ Back to emacs `M-x package-install`, `Install package: mmm-mako`. Once mmm-mako 'auto-mode-alist '("\\.sls\\'" . yaml-mode)) (mmm-add-mode-ext-class 'html-mode "\\.sls\\'" 'mako) ``` My full .emacs file can be viewed [here](https://github.com/tbonza/emacs-config/blob/master/.emacs). Also, I want to say thank you to [Zach](http://zwass.com/2011/07/01/installing-emacs-mmm-mako-mode/) for putting together the post about Mako/HTML. This approach is a work in progress and I'll update as I find bugs/improvements. -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -54,9 +54,7 @@ Placed the following in my .emacs file (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) ``` Back to emacs `M-x package-install`, `Install package: mmm-mako`. Once mmm-mako is installed then just finish configuring your .emacs ```elisp (add-to-list -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,7 +56,7 @@ Placed the following in my .emacs file ``` Back to emacs `M-x package-install`, `Install package: mmm-mako` Once mmm-mako is installed then just finish configuring your .emacs ```elisp (add-to-list -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 27 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,4 +40,30 @@ My elisp files were installed to /usr/local/share/emacs/site-lisp. You may need (require 'mmm-auto) (setq mmm-global-mode 'maybe) ```` Make sure it's installed correctly by opening emacs `M-x mmm-mode` to enable MMM-mode. 3. Next up, installing MMM-Mako. If I can install something with the package manager then I'll do it. Let's first make sure the package will be available by adding melpa to our .emacs ```bash $ emacs -nw ~/.emacs ``` Placed the following in my .emacs file ```elisp (require 'package) ;; You might already have this line (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) ``` Back to emacs `M-x package-install`, `Install package: mmm-mako` Once mmm-mako is installed then just finish configuring your .emacs: ```elisp (add-to-list ;; Saltstack config 'auto-mode-alist '("\\.sls\\'" . yaml-mode)) (mmm-add-mode-ext-class 'html-mode "\\.sls\\'" 'mako) ``` My full .emacs file can be viewed [here](https://github.com/tbonza/emacs-config/blob/master/.emacs). Also, I want to say thank you to [Zach](http://zwass.com/2011/07/01/installing-emacs-mmm-mako-mode/) for putting together the post about Mako/HTML. This approach is a work in progress and I'll update as I find bugs/improvements. -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 12 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,18 +16,28 @@ Setup [Multiple Major (MMM) Mode](http://mmm-mode.sourceforge.net/) allows Emacs major modes to be combined. [MMM-Mako Mode](https://bitbucket.org/pjenvey/mmm-mako/overview) provides support for Mako files using MMM. Configuring the setup can be a pain so I wanted to document it: 1. Download & untar MMM mode from http://sourceforge.net/projects/mmm-mode/files ```bash mv ~/Downloads/mmm-mode-0.5.1.tar.gz ~/InstalledPrograms/ tar -xvf mmm-mode-0.5.1.tar.gz && cd mmm-mode-0.5.1/ whereis emacs ``` 2. Make & install MMM mode but first specify where your Emacs is installed. I'm using [Emacs 24](http://www.gnu.org/software/emacs/) installed in `/usr/bin/emacs`. ```bash EMACS="/usr/bin/emacs" ./configure make sudo make install ``` My elisp files were installed to /usr/local/share/emacs/site-lisp. You may need to add this directory to the Emacs load path. You will also need to tell Emacs to load the module. Here's what I added to my .emacs configuration. ````elisp (add-to-list ;; Adding mmm-mode 'load-path "/usr/local/share/emacs/site-lisp") (require 'mmm-auto) (setq mmm-global-mode 'maybe) ```` Make sure it's installed correctly by opening emacs `M-x mmm-mode` to enable MMM-mode. -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,13 +16,18 @@ Setup [Multiple Major (MMM) Mode](http://mmm-mode.sourceforge.net/) allows Emacs major modes to be combined. [MMM-Mako Mode](https://bitbucket.org/pjenvey/mmm-mako/overview) provides support for Mako files using MMM. Configuring the setup can be a pain so I wanted to document it: 1. Download & untar MMM mode from http://sourceforge.net/projects/mmm-mode/files ```bash mv ~/Downloads/mmm-mode-0.5.1.tar.gz ~/InstalledPrograms/ tar -xvf mmm-mode-0.5.1.tar.gz && cd mmm-mode-0.5.1/ whereis emacs ``` 2. Make & install MMM mode but first specify where your Emacs is installed. I'm using [Emacs 24](http://www.gnu.org/software/emacs/) installed in `/usr/bin/emacs`. ```bash EMACS="/usr/bin/emacs" ./configure make sudo make install ``` and then -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,10 +18,11 @@ Setup 1. Download & untar MMM mode from http://sourceforge.net/projects/mmm-mode/files 2. Make & install MMM mode but first specify where your Emacs is installed. I'm using [Emacs 24](http://www.gnu.org/software/emacs/) installed in `/usr/bin/emacs`. ```bash EMACS="/usr/bin/emacs"` ./configure' make' sudo make install` ``` and then -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,13 @@ Setup [Multiple Major (MMM) Mode](http://mmm-mode.sourceforge.net/) allows Emacs major modes to be combined. [MMM-Mako Mode](https://bitbucket.org/pjenvey/mmm-mako/overview) provides support for Mako files using MMM. Configuring the setup can be a pain so I wanted to document it: 1. Download & untar MMM mode from http://sourceforge.net/projects/mmm-mode/files 2. Make & install MMM mode but first specify where your Emacs is installed. I'm using [Emacs 24](http://www.gnu.org/software/emacs/) installed in `/usr/bin/emacs`. `EMACS="/usr/bin/emacs"` `./configure' `make' `sudo make install` and then -
tbonza2 renamed this gist
Jan 3, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
tbonza2 renamed this gist
Jan 3, 2015 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,19 @@ Saltstack mode for emacs Earlier today I was looking for a Saltstack mode for emacs. Couldn't find one, so I posted the [question](http://stackoverflow.com/questions/27737557) on Stack overflow. Somebody had a good suggestion about using yaml-mode because a Sublime Text [implementation](https://github.com/saltstack/sublime-text/blob/master/YAML.sublime-settings) appeared to be taking this approach.Another person thought that Saltstack's use of jinja templates would make an emacs mode easy enough to configure. These were both helpful ideas so I wanted to implement parts of each. Reasoning ---------- After looking around, I found that [someone](http://zwass.com/2011/07/01/installing-emacs-mmm-mako-mode/) had configured an emacs mode for a similar situation. They needed to combine HTML and Python to use [Mako](http://www.makotemplates.org/) templates for a project not involving Saltstack. Since Edx [uses](https://groups.google.com/forum/#!msg/edx-code/qlMvLjsqVaw/EeU7gh5hcfIJ) Mako templates instead of [jinja](http://jinja.pocoo.org/) in their [Django](https://www.djangoproject.com/) [site](https://github.com/edx/edx-platform), Mako seemed like a good alternative to Jinja templates. Since someone previously combined HTML and Python modes it seemed reasonable to combine Mako and Yaml modes in Emacs. Setup ----- [Multiple Major (MMM) Mode](http://mmm-mode.sourceforge.net/) allows Emacs major modes to be combined. [MMM-Mako Mode](https://bitbucket.org/pjenvey/mmm-mako/overview) provides support for Mako files using MMM. Configuring the setup can be a pain so I wanted to document it: 1) Download & untar MMM mode from http://sourceforge.net/projects/mmm-mode/files 2) Make & install MMM mode but first specify where your Emacs is installed. I'm using [Emacs 24](http://www.gnu.org/software/emacs/) installed in `/usr/bin/emacs`. -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 2 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,9 @@ Saltstack mode for emacs ========================= Earlier today I was looking for a Saltstack mode for emacs. Couldn't find one, so I posted the [question](http://stackoverflow.com/questions/27737557) on Stack overflow. Somebody had a good suggestion about using yaml-mode because a Sublime Text [implementation](https://github.com/saltstack/sublime-text/blob/master/YAML.sublime-settings) appeared to be taking this approach.Another person thought that Saltstack's use of jinja templates would make an emacs mode easy enough to configure. These were both helpful ideas so I wanted to implement parts of each. Setup ----- After looking around, I found that [someone](http://zwass.com/2011/07/01/installing-emacs-mmm-mako-mode/) had configured an emacs mode for a similar situation. They needed to combine HTML and Python to use [Mako](http://www.makotemplates.org/) templates for a project not involving Saltstack. Since Edx [uses](https://groups.google.com/forum/#!msg/edx-code/qlMvLjsqVaw/EeU7gh5hcfIJ) Mako templates instead of [jinja](http://jinja.pocoo.org/) in their [Django](https://www.djangoproject.com/) [site](https://github.com/edx/edx-platform), Mako seemed like a good alternative to Jinja templates. -
tbonza2 revised this gist
Jan 3, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,14 @@ Saltstack mode for emacs ========================= Earlier today I was looking for a Saltstack mode for emacs. Couldn't find one, so I posted the [question](http://stackoverflow.com/questions/27737557) on Stack overflow. Somebody had a good suggestion about using yaml-mode because a Sublime Text `implementation`_ appeared to be taking this approach.Another person thought that Saltstack's use of jinja templates would make an emacs mode easy enough to configure. These were both helpful ideas so I wanted to implement parts of each. Setup ----- After looking around, I found that `someone`_ had configured an emacs mode for a similar situation. They needed to combine HTML and Python to use `Mako`_ templates for a project not involving Saltstack. Since Edx `uses`_ Mako templates instead of `jinja`_ in their `Django`_ `site`_, Mako seemed like a good alternative to Jinja templates. .. _question: .. _implementation: https://github.com/saltstack/sublime-text/blob/master/YAML.sublime-settings .. _someone: http://zwass.com/2011/07/01/installing-emacs-mmm-mako-mode/ .. _Mako: http://www.makotemplates.org/ -
tbonza2 created this gist
Jan 3, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ Saltstack mode for emacs ========================= Earlier today I was looking for a Saltstack mode for emacs. Couldn't find one, so I posted the `question`_ on Stack overflow. Somebody had a good suggestion about using yaml-mode because a Sublime Text `implementation`_ appeared to be taking this approach.Another person thought that Saltstack's use of jinja templates would make an emacs mode easy enough to configure. These were both helpful ideas so I wanted to implement parts of each. Setup ----- After looking around, I found that `someone`_ had configured an emacs mode for a similar situation. They needed to combine HTML and Python to use `Mako`_ templates for a project not involving Saltstack. Since Edx `uses`_ Mako templates instead of `jinja`_ in their `Django`_ `site`_, Mako seemed like a good alternative to Jinja templates. .. _question: http://stackoverflow.com/questions/27737557 .. _implementation: https://github.com/saltstack/sublime-text/blob/master/YAML.sublime-settings .. _someone: http://zwass.com/2011/07/01/installing-emacs-mmm-mako-mode/ .. _Mako: http://www.makotemplates.org/ .. _uses: https://groups.google.com/forum/#!msg/edx-code/qlMvLjsqVaw/EeU7gh5hcfIJ .. _jinja: http://jinja.pocoo.org/ .. _Django: https://www.djangoproject.com/ .. _site: https://github.com/edx/edx-platform