Quick Elixir Tip

I use Samuel Tonini’s Alchemist (and Elixir mode) to make myself much more productive with Elixir and Emacs.  But one thing that I’ve found to be a minor annoyance is that whenever I start up Emacs I have to set the scratch buffer to be in Elixir mode and I then need to change the comment characters.

Thanks to this excellent tip I no longer have to do this.  I’ve modified my ~/.emacs to add these lines to the bottom:


(setq initial-major-mode 'elixir-mode)

(setq initial-scratch-message "\
# This buffer is for notes you don't want to save, and for Elixir code.
# If you want to create a file, visit that file with C-x C-f,
# then enter the text in that file's own buffer.")

And when I get a scratch buffer I’m all good to go with Elixir!

One response

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: