.emacs Setup Guide for Erlang and Elixir

This setup guide is a collection of suggestions to turn Emacs into a (sort of) complete development environment for Erlang and Elixir.

It is not a complete solution like Spacemacs, but instead it shows various options for setting up Your environment.

The only prerequisites are that the following components are installed on Your system:

Note

This setup guide is currently developped and tested only on a Ubuntu 14.04 64 bit system. It has to be tested and verified on other systems as well!!!

Features

  • basic things
    • setup git user information
  • basic emacs stuff
    • user setup
    • neotree
    • projectile
    • helm
    • help-projectile
    • projective (optional)
    • magit
    • company
    • powerline
    • markdown-mode+
  • VI for Emacs
    • EVIL (optional)
    • powerline-evil
  • Erlang/OTP related
    • erlang-mode
    • alchemist
  • Elixir related
    • elixir-mode
    • alchemist

Prerequisite steps...

Before You clone this repository, You should check Your environment:

  • Can You start Erlang's shell erl? Hint: To terminate erl enter q(). followed by RETURN.
  • Can You start Elixir's shell iex? Hint: To terminate iex enter CTRL+c followed by 'a'.
  • Can You start Emacs? Hint: To exit emacs with only keystrokes enter CTRL+x followed by CTRL+c.
  • Do You know where Your .emacs file is?
  • Do You know where Your .gitconfig file is?

Files include

There are three example files:

  • dot-emacs-example: an emacs configuration file .emacs
  • dot-gitconfig-example: a git configuration file .gitconfig
  • dot-gitignore_global-example: an additional file for git with default excludes .gitignore_global

TBD: There are files in an unixish environment, like Linux, Ubuntu, and should be the same for Mac OS X. Are they also valid for Windows systems?

Getting started...

Check You personal git configuration (optional)

This is an optional step, but You should really do this. If You don't use git, but another source control management system, check with it manuals for similar steps.

Username and E-Mail

Check if Your Name and E-Mail address is correct. This is information is located in Your .gitconfig file:

[user]
        name = Firstname Lastname
        email = emailname@example.com

Global Exclude Patterns

Having global exclude patterns, so You don't have to include them in every project as well, is a two part process:

First check You .gitconfig file:

[core]
        excludesfile = ~/.gitignore_global

And afterwards have a look at .gitignore_global:

# editor files
*~
.*.swp
.~lock.*.od*#
core
# erlang related
*.beam
erl_crash.dump

There are just some example patterns.

Careful with the patterns used... Just don't forget about the .gitignore_global file.

Compatibility

  • Ubuntu 14.04, but it should run on 12.x and more recent systems as well