Emacs Erlang Snippets
Continuing with my previous yasnippet for Ruby, here are some snippets for Erlang mode.
Installation Create an erlang-mode directory under text-mode and save the following code in a file name mod.
#name : -module(). #contributor : hitesh <hitesh.jasani gmail.com> # – -module(${1:$(file-name-nondirectory (file-name-sans-extension (buffer-file-name)))}). $0 Save the following code in a file named exp.
#name : -export([]). #contributor : hitesh <hitesh.jasani gmail.com> # – -export([${1:start/0}]). $0 Save the following code in a file named imp.
Textmate Ruby Snippet to yasnippet
Dr. Nic recently put together a screencast of adding a Ruby snippet to TextMate. This particular snippet makes a class definition using the filename as the default classname. I always enjoy listening to Dr. Nic, so definitely check out the ‘cast.
I used to love TextMate, but I can’t use it anymore since I’m working on multiple platforms. Emacs is my editor of choice now and I can’t say that I’m missing anything.
Summing a Column of Numbers in Emacs
Emacs continues to amaze me every single day. It’s getting near tax time and today I was summarizing various expenses in an ascii file. Why ascii and not Excel or some other spreadsheet? Well, for one they are overkill when all you want is a simple column of numbers and a sum. Secondly, my summary as an ascii file will be viewable ten years from now without me having to get the latest version of MS Office or whatever and worrying about data migration.