HTTPS SSH

Modular Emacs Configuration

It is a set of configuration "fragments" (pills) that you may use independently, but it is warrantied that all of them work well together.

To use one of these in your Emacs you must install the emacs-pills debian package adding next line to your /etc/apt/sources.list:

deb http://babel.esi.uclm.es/arco sid main

And run:

$ sudo apt-get install emacs-pills
$ sudo apt-get install emacs-pills-python

Then, write down something like that in your ~/.emacs and comment out undesired pills:

(load-file "/usr/share/emacs-pills/init.el")
(load "auto-complete.cfg")
(load "auto-create-dirs.cfg")
(load "auto-insert.cfg")
(load "compile-bookmarks.cfg")
(load "compile.cfg")
(load "docbook.cfg")
(load "elisp.cfg")
(load "flymake.cfg")
(load "flyspell.cfg")
(load "global-zoom.cfg")
(load "highlight-changes.cfg")
(load "hl.cfg")
(load "latex.cfg")
(load "markdown.cfg")
(load "maximize.cfg")
(load "minimal.cfg")
(load "move-line-or-region.cfg")
(load "package.cfg")
(load "projector.cfg")
(load "psgml.cfg")
(load "revert.cfg")
(load "rst.cfg")
(load "shut-up.cfg")
(load "slice.cfg")
(load "speedbar.cfg")
(load "strip.cfg")
(load "tabbar.cfg")
(load "toggle-id-style.cfg")
(load "toggle-split.cfg")
(load "uniquify.cfg")
(load "window-move.cfg")
(load "yaml.cfg")
(load "zoom.cfg")
(load "multiple-cursors.cfg")
(load "paren-autoclose.cfg")
(load "projectile.cfg")
(load "epy-nose.cfg")  ;requires emacs-pills-python
(load "python.cfg")  ;requires emacs-pills-python

auto-complete.cfg

Minimal configuration for auto-complete mode. This minor mode is not activated by default. You must run:

M-x auto-complete-mode

auto-create-dirs.cfg

Create intermediate directories when saving a new file in a non existing path.

auto-insert.cfg

It contains a set of templates that are automatically inserted when you create empty files. It includes default headers for Python, bash, LaTeX and others.

compile-bookmarks.cfg

store and reuse compile commands

See http://nschum.de/src/emacs/compile-bookmarks/

(new in version 0.20130327)

compile.cfg

Convenience configuration for compile command.

See the screencast:

compile-screencast

Features:

  • auto-save file before compilation, instead of asking.
  • modeline background color represents compilation process:
    • blue: compilation in progress
    • green: compilation finished successfully
    • orange: compilation finished with warnnings
    • red: compilation finished with errors

Keystrokes:

  • F5 compile (using last given compile command)
  • Super-F5 asks for a new compile command
  • C-F5 opens the compilation buffer

(new in version 0.20130327)

docbook.cfg

nxml-mode configuration for DocBook 4.5.

elisp.cfg

elisp utitlity functions

  • eval-and-replace

(new in version 0.20130619)

flymake.cfg

custom config and faces for flymake error highlight.

flyspell.cfg

Better config and colors for the flyspell minor mode. It is automatically loadad for LaTeX, resT, conf and sgml modes.

To load on other modes add something like next to your config:

(add-hook 'foo-mode-hook 'turn-on-flyspell)

global-zoom.cfg

It provides zoom on emacs in a similar way to web browsers or text processors suites.

Keystrokes:

  • C-<plus> or C-mousewheel-up: increases font size.
  • C-<minus> or C-mousewheel-down: decreases font size.
  • C-0 reverts font size to default.

In contrast to `zoom.cfg`_ this version persists across multiple areas of the document with specific minor modes (e.g. noweb documents)

highlight-changes.cfg

Activate highlight-changes minor mode and set better colors. It highlights all modifications since file was open.

Keystrokes:

  • F6: shows/hide hightlight (deactivated by default).

hl.cfg

Highlight the current line.

  • Deactivate temporally:

    M-x global-hl-line-mode
    
  • Deactivate per major-mode:

    (add-hook 'ruby-mode-hook 'local-hl-line-mode-off)
    

latex.cfg

Activates and binds RefTeX minor mode. Provides a live checker for flymake (disabled by default). To enable it:

M-x flymake-mode

markdown.cfg

enable markdown-mode for .md files

maximize.cfg

Maximize the Emacs X window.

Keystrokes:

  • F11: toggles fullscreen.
  • C-F11: toggles vertical maximization.

minimal.cfg

Basic customization useful for most of users. It does not provide new keystrokes or commands.

move-line-or-region.cfg

Move line (or current selected area) up and down.

Keystrokes:

  • M-up: move text up
  • M-down: move text down

projector.cfg

Minor mode to gain screen space when use a projector

  • Hides toolbar, menubar and scrollbar
  • Activates hl-line and linum modes

(new in version FIXME)

psgml.cfg

  • Better faces and highlight for sgml-mode
  • Automatic DTD detection and loading.

revert.cfg

revert-buffer customization: keep undo history

rst.cfg

Activate rst-mode for .rst files

shut-up.cfg

Make emacs quieter

slice.cfg

Syntax highlight (with c++-mode) for .ice files

speedbar.cfg

It provides F9 to show/hide the speedbar, and set position to right.

strip.cfg

On save, automatically:

  • remove trailing spaces at end of lines,
  • assure an empty line at end of buffer

Keystrokes: None

tabbar.cfg

A very good customization for tabbar-mode.

  • Better faces for tabs.
  • Separate buffers in three independent groups: user files, dired and messages.
http://crysol.org/files/emacs-tabbar.png

Keystrokes:

  • M-<n> to change among the first 10 tabs
  • C-S-o and C-S-p to change among tabs
  • C-S-i and C-S-j to change among groups

toggle-id-style.cfg

toggle between CamelCase and underscore_lowercase identifiers

Keystrokes:

  • C-c C toggles identifer style

(new in version 0.20130619)

toggle-split.cfg

Keystrokes:

  • C-x 4: Changes among vertical and horizontal two-window layouts.

uniquify.cfg

uniquify customization to use directory instead of a number to differentiate buffers with the same filename.

Keystrokes: None

window-move.cfg

Move among windows with keyboard

Keystrokes:

  • Control-Super-left: Move to left window
  • Control-Super-right: Move to right window
  • Control-Super-up: Move to upper window
  • Control-Super-down: Move to downer window

yaml.cfg

Basic configuration for yaml-mode

zoom.cfg

It provides zoom on emacs in a similar way to web browsers or text processors suites.

Keystrokes:

  • C-<plus> or C-mousewheel-up: increases font size.
  • C-<minus> or C-mousewheel-down: decreases font size.
  • C-0 reverts font size to default.