This post is part of a series:
Another plugin I miss from Vim is snipMate, I use this plugin to insert snippets of code while programming. Once again Emacs has me covered, YASnippet offers the same functionality.
Setup
Create a yasnippet.el
in the .emacs.d/personal
folder.
1 2 3 4 |
|
Here I make sure the yasnippet
package is available then require the package and enable it globally.
Personal Snippets
You can create your own personal snippets in the .emas.d/snippets
folder. More details in this slightly outdated guide.
Ruby Snippets
I have also installed a set of ruby and rspecs snippets from bmaland’s repo. I simply cloned the repo into the personal snippest folder with name ruby-mode. Note the name is important it needs to match the Emacs mode where the snippets are used.
1
|
|