Skip to content

My emacs configuration (evil mode is disabled)

Notifications You must be signed in to change notification settings

IMDagger/dot-emacs

 
 

Repository files navigation

Dot-Emacs

Description

This is my personal Emacs configuration. It is obviously very personalised and you’d be crazy to use it as-is.

Installation

Requires GNU Make, curl and Git.

cd
mv .emacs.d .emacs.d.backup
git clone git@github.com:chrisbarrett/dot-emacs.git .emacs.d
cd .emacs.d
make

Additional features can be installed using make all, or using the individual tasks in the makefile (e.g. make ruby). I pretty much only test on my machine, so YMMV.

The load sequence will search for a file called personal-config.el, which is a good place to put things like your gnus server configuration, email address, etc.

(setq user-full-name    "Jane Coder"
      user-mail-address "foo@bar.com")

;; SMTP

(setq smtpmail-mail-address user-mail-address
      smtpmail-smtp-server "smtp.foo.bar.com")

(provide 'personal-config)

Features

Evilness

I use Evil-mode so I can have vim in my Emacs so I can edit while I edit. You can restore Emacs’ normal key bindings by setting cb:use-vim-keybindings? to nil in init.el. I try to remember to make my bindings test for that so people testing this config out aren’t completely stuffed.

Custom mode-line

The mode-line is set up to remove clutter.

If you set user-mail-directory to point to your maildir the modeline will display an unread mail count.

Modal buffers

Certain commands display buffers in a modal manner; they expand to fill the frame and restore the previous state when killed. This behaviour is provided for most magit commands, ansi-term, org-agenda and others. Check the implementation of declare-modal-view and declare-modal-executor to see how this works.

Git commands

git-gutter+-mode is enabled for files in git repositories. This allows you to see modified hunks and stage them individually while you’re editing.

Common git commands are available under the g prefix key in Evil’s normal state, allowing you perform most git actions directly on the buffer you’re editing.

g b
branch manager
g c
commit
g D
diff
g l
log
g n
next change
g p
previous change
g P
push
g r
reflog
g s
stage hunk
g x
reset hunk

Org

Common org commands are accessible with a picker widget bound to <f8>.

I use a Rube Goldberg machine, implemented in Elisp, to capture links, todos, notes and other information by sending myself emails.

I use my own customised fork of org-pomodoro for clocking.

Language Support

I have sane configurations for several languages and environments:

  • Clojure
  • Elisp
  • Haskell
  • Idris
  • OCaml
  • Python
  • Ruby/Rails
  • Scala
  • Scheme

Key bindings

Since Evil frees up the Meta key, I use M-/key/ to display modal views such as terminals, w3m and dired.

C-SPC
helm-mini
S-SPC
execute-extended-command (i.e. M-x)
M-r
interactively edit symbol at point (iedit)
C-M-RET
refactoring commands
C-t
helm-imenu
M-b
buffers list with helm
M-d
show current file in dired
M-G
magit status
M-s
Search manpage, Google, YouTube, Wikipedia etc.
M-W
w3m
F1
eshell
F5
start pomodoro
F6
capture todo
F7
org-capture
F8
org commands
F9
show org-agenda in fullscreen
F10
print/scan options
F12
clock in/out of work

OS X-specific

  • org-mode and pomodoro notifications are displayed using Growl where available
  • cmd-shift-return runs OS X’s open command.
    • URL at point will open in the default browser
    • Files will open with the default application for their type

About

My emacs configuration (evil mode is disabled)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 99.5%
  • Makefile 0.4%
  • Ruby 0.1%
  • Shell 0.0%
  • Haskell 0.0%
  • Bison 0.0%