ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Sublim​Erl

by ostinelli ST2

An Erlang Plugin for Sublime Text 2, which enables code completion and allows you to run tests within the editor itself.

Details

  • 2013.03.22.23.34.21
  • github.​com
  • github.​com
  • 11 years ago
  • 22 minutes ago
  • 12 years ago

Installs

  • Total 6K
  • Win 3K
  • Mac 2K
  • Linux 1K
Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

SublimErl (Erlang Tests & Code Completion)

Overview

SublimErl is a plugin for the text editor Sublime Text 2. It allows you to:

  • Benefit from Code Completion ( all Erlang libs + your current project )
  • Allows you to Auto-Indent your Erlang code
  • Run Eunit tests ( all tests for module / single test )
  • Run Common Tests ( all tests for module )
  • Run Dialyzer tests ( single module )
  • Goto any exported function of your project easily
  • Access man pages from the text editor

All within your test editor.

A brief feature introduction video can be seen here:

SublimErl screenshot

Screenshots

Here's a screenshot of SublimErl's Code Completion feature:

SublimErl screenshot

Here's a screenshot of SublimErl's Auto-Indenting feature:

SublimErl screenshot

Here's a screenshot of SublimErl running an Eunit specific test in file.

SublimErl screenshot

Usage

  • Code Completion: Just type and select available options
  • Auto-Indenting: hit Command-Option-L to auto-intent an entire file
  • Run single Eunit: position your cursor anywhere within your test function and hit Command-Shift-F8
  • Run all Eunit tests in file: position your cursor outside any test function and hit Command-Shift-F8
  • Run all CT tests in file: view the file and hit Command-Shift-F8
  • Run Dialyzer on file: view the file and hit Command-Shift-F9
  • Re-Run the previous test: hit Command-F8 ( you do not need to be viewing the test to launch it )
  • View Common Tests results in browser: hit Command-Option-F8 (OSX) | Command-Alt-F8 (Linux/Win)
  • Goto any exported function of your project easily: hit Command-Option-p (OSX) | Command-Alt-p (Linux/Win) and select a function
  • To access man pages: hit Command-Option-i (OSX) | Command-Alt-i (Linux/Win) and select a module

Installation

SublimErl currently supports only on OSX and Linux. There are 3 ways to install it.

1. Sublime Package Control

Download and install the Sublime Package Control. This package controller allows you to easily manage your Sublime Text 2 plugins (installs / removals / upgrades).

SublimErl's latest stable versions are pushed automatically to the package control. However, if you want the latest and greatest, you'll have to use one of the other following options.

2. Git Clone

Go to your Sublime Text 2 Packages directory:

  • OS X: ~/Library/Application Support/Sublime Text 2/Packages
  • Linux: ~/.Sublime Text 2/Packages/

and clone the repository using the command below:

git clone https://github.com/ostinelli/SublimErl.git
3. File Download

Head to the downloads section and unzipping the downloaded file into the Sublime Text 2 Packages directory.

Configuration

SublimErl needs and will try to detect the paths of the following executables: rebar, erl, escript and dialyzer. If it doesn't succeed to find those, or if you prefer to manually configure these path, you can set them in the SublimErl.sublime-settings file, located in the SublimErl plugin directory.

Dependencies

To use SublimErl, you need to have:

To unleash the full power of the plugin, you will also need to comply to:

TL;DR: it basically means to organize your project structure using:

-- myproject
   |-- ebin
   |-- src
       |-- myproject.app.src
   |-- test
   |-- ...

or, for example, a more complex project structure defined in rebar.conf:

-- myproject
   rebar.config
   |-- apps
       |-- app1
       |-- app2
   |-- deps
       |-- dep1
       |-- dep2
   |-- ...

Known issues

We have had reports that some plugin functionalities experience unwanted behaviour (freezing) with the Erlang precompiled package provided by Erlang Solutions, see issue #56. We're looking into this.