Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A set of defaults for Emacs, for refugees from GUI text editors.

branch: master

0.5.0

latest commit 6bd9886412
Robert Dallas Gray authored
Octocat-spinner-32 el.mk @ da704df Flatten directory structure October 30, 2013
Octocat-spinner-32 lib 0.5.0 December 03, 2013
Octocat-spinner-32 test Using el.mk. March 31, 2013
Octocat-spinner-32 .gitignore Added smartparens-config. March 05, 2013
Octocat-spinner-32 .gitmodules Comment @COMMENTARY placeholder; remove commented sp-config code; use… September 26, 2013
Octocat-spinner-32 Cask Add flycheck to Cask dependencies November 30, 2013
Octocat-spinner-32 Makefile Using el.mk. March 31, 2013
Octocat-spinner-32 README.md Correct README typos November 29, 2013
Octocat-spinner-32 graphene-editing.el Use uniquify/forward; don't blink cursor; use spaces instead of tabs November 27, 2013
Octocat-spinner-32 graphene-env.el Use uniquify/forward; don't blink cursor; use spaces instead of tabs November 27, 2013
Octocat-spinner-32 graphene-helper-functions.el Add speedbar truncation behaviour, general tidying November 17, 2013
Octocat-spinner-32 graphene-keys.el Remove some keybindings November 27, 2013
Octocat-spinner-32 graphene-linux-defaults.el Add speedbar truncation behaviour, general tidying November 17, 2013
Octocat-spinner-32 graphene-look.el Use uniquify/forward; don't blink cursor; use spaces instead of tabs November 27, 2013
Octocat-spinner-32 graphene-osx-defaults.el Add speedbar truncation behaviour, general tidying November 17, 2013
Octocat-spinner-32 graphene-other-defaults.el Flatten directory structure October 30, 2013
Octocat-spinner-32 graphene-pkg.el Update package file November 30, 2013
Octocat-spinner-32 graphene-projects.el Add speedbar truncation behaviour, general tidying November 17, 2013
Octocat-spinner-32 graphene-smartparens-config.el Remove unused sp config December 03, 2013
Octocat-spinner-32 graphene-speedbar.el Autoload sr-speedbar-open November 27, 2013
Octocat-spinner-32 graphene-theme.el Improve visual-regexp group faces November 06, 2013
Octocat-spinner-32 graphene-windows-defaults.el Flatten directory structure October 30, 2013
Octocat-spinner-32 graphene.el Add speedbar truncation behaviour, general tidying November 17, 2013
README.md

Graphene

Graphene is a 'starter kit' for Emacs, in the vein of Prelude or emacs-starter-kit.

Graphene screenshot

It provides:

  • Some sensible defaults
  • A clean look
  • The basics you need to make Emacs functionality discoverable
  • A set of third-party packages that set the standard for the essential functionality they provide
  • Some plumbing to make the above 'just work', seamlessly and silently

Although Graphene is intended to help users of GUI editors such as Textmate or Sublime Text find their feet quickly, it is not an attempt to turn Emacs into a sparkly GUI editor or IDE. It is minimal, lightweight, and respectful of the history and character of Emacs.

Sensible defaults

Among many other things, Graphene turns off the ugly Emacs startup screen, turns on line wrapping, turns off the scroll bars and tool bar (and menu bar on non-OS X systems), moves automatic backups into the temp directory -- generally clears the way of small annoyances and makes things look and work the way you'd expect.

A clean look

Graphene includes its own 'meta-theme' which works hard to unify the look of the editor across a range of packages. This theme loads on top of any 'normal' theme you want to load, so you can still choose exactly how you want your Emacs to look.

It also sets more pleasant and modern default fonts appropriate to the host platform (which can be overridden), and maintains window size and position across sessions.

Discoverability

At first Emacs can appear a little opaque; it is in fact a very discoverable environment, and Graphene tries to turn this up to maximum, by using Ido everywhere, the Ido-like Smex for running extended commands, and Auto Complete for in-editor completion. These allow gradual discovery of Emacs' functionality, and gradual building of speed and fluidity.

Essential packages

The collection of packages Graphene includes prevents you having to research and discover on your own what the Emacs community has largely decided on as best-in-class packages.

  • project-persist Disclaimer: this is my own project, and is perhaps the exception to the above rule. It provides simple project loading and saving; Graphene adds a project 'drawer' using Sr-Speedbar
  • Smartparens For auto-pairing
  • Auto Complete For code completion
  • Web-mode For mixed-mode editing
  • Smex For command completion
  • Ido For general completion
  • Flycheck For error checking

And some modes which should probably be built-in:

Installation

Graphene is available on Melpa.

If you don't already have your Emacs set up to use the package installation system, let me gently point you to Pallet.

Anyway -- your default initialisation file is in (old-school) ~/.emacs or (new-school, and where it should be) ~/.emacs.d/init.el. First, you need to set up the Emacs package system and tell it about Melpa, so create one of those files if it doesn't already exist, and add these lines to the file:

;; Require Emacs' package functionality
(require 'package)

;; Add the Melpa repository to the list of package sources
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)

;; Initialise the package system.
(package-initialize)

Then either select those lines and do M-x eval-region, or restart Emacs. After that, do M-x list-packages, search for 'graphene' (either manually or using C-s), mark it for installation by pressing 'i', and install it by pressing 'x'.

It will take a while to install itself and its various dependencies, and will probably raise a few compilation issues. You can probably safely ignore these. Once it's done, add this to your initialisation file:

(require 'graphene)

Restart Emacs, and away you go.

How do I ... ?

All of the packages Graphene includes are well-documented, and I'll refer you to them rather than retread that documentation here. That said, there are some Graphene-specific things you need to know.

Keybindings

Graphene creates some new keybindings, and alters some existing ones:

  • C-x k always kills the active buffer, rather than asking you which one you want to kill
  • C-x C-k kills the default buffer and closes its window
  • C-c n creates a new buffer
  • C-c N creates a new instance of Emacs
  • C-; adds a semicolon at the end of the line
  • M-RET creates a newline below the current line and moves to it
  • C-M-; comments or uncomments the current line
  • C-> increases the height of the current window
  • C-< decreases it
  • C-. increases the width of the current window
  • C-, decreases it
  • C-c s selects the Speedbar window

Graphene used to bind the standard Mac keys for various purposes (Command-n for new buffer, for instance), but no longer does.

Projects

project-persist uses the following keybindings:

  • C-c P n to create a new project
  • C-c P f to find an existing project
  • C-c P k to close the current project
  • C-c P d to delete an existing project

Customising

Try M-x customize-group and type 'graphene', for an idea of what can be customised; you may wish to set these programmatically in your init file, instead.

Contributions and feedback

Contributions to Graphene are very welcome, as are feedback and bug reports. The latter can be raised via the Issues section.

To contribute code, fork and clone the repo. If you want to be able to build the package, run git submodule update --init, which will install el.mk, then install Cask and run cask install.

When you've created your feature, make a pull request against master in this repo.

Something went wrong with that request. Please try again.