• Stars
    star
    260
  • Rank 157,189 (Top 4 %)
  • Language
    Emacs Lisp
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

emacs configuration for vim users

dotemacs

This is my personal KISS Emacs config.

intro

There are many emacs configs, what makes this one different?

kiss

This is a keep it simple stupid config. It is built with 3 simple building blocks; small enough that it is white magic instead of black magic.

simple building block 1

(defun require-package (package)
  "Ensures that PACKAGE is installed."
  (unless (or (package-installed-p package)
              (require package nil 'noerror))
    (unless (assoc package package-archive-contents)
      (package-refresh-contents))
    (package-install package)))

The code here is self-explanatory. This is how you declare what packages you want to install and use. This was taken from Purcell's config.

simple building block 2

with-eval-after-load lets you defer execution of code until after a feature has been loaded. This is used extensively throughout the config, so wrapping macro has been written for ease of use. This is what keeps the config loading fast.

Another useful feature is that it can also be used to run code if a package has been installed by using -autoloads; e.g.

(after 'magit
  ;; execute after magit has been loaded
  )
(after "magit-autoloads"
  ;; execute if magit is installed/available
  )
(after [evil magit]
  ;; execute after evil and magit have been loaded
  )

This was taken from milkypostman.

simple building block 3

At the bottom of the init.el is the following gem:

(cl-loop for file in (reverse (directory-files-recursively config-directory "\\.el$"))
  do (load file)))

Basically, it recursively finds anything in config/ and loads it. If you want to add additional configuration for a new language, simply create new-language.el in config/ and it will automatically be loaded. Files are loaded in reverse order so that any functions defined will be available in child nodes.

other building blocks

bindings in one place

Another decision is to keep all keybindings in one place: /bindings/**/*.el. Because of this, things like use-package aren't particularly useful here because it doesn't add much value over (require-package) and after.

Keybindings are the single most differentiating factor between configs. By defining them in one place, if you want to use/fork this config, you can simply change the bindings to your liking and still use all the other preconfigured packages as is. If you're not an Evil user, delete config-evil.el and you will get a pure Emacs experience.

lazy installation of major mode packages

By combining after, require-package, and auto-mode-alist, packages are installed only when necessary. If you never open a Javascript file, none of those packages will be installed.

install

git clone https://github.com/bling/dotemacs.git ~/.emacs.d

disclaimer

here be dragons.

license

MIT

More Repositories

1

vim-bufferline

super simple vim plugin to show the list of buffers in the command bar
Vim Script
490
star
2

dotvim

lean & mean vim distribution
Vim Script
429
star
3

fzf.el

A front-end for fzf
Emacs Lisp
328
star
4

minivimrc

a tiny vimrc to be used primarily for troubleshooting plugins
Vim Script
147
star
5

evil-visualstar

Start a * or # search from the visual selection
Emacs Lisp
74
star
6

evil-jumper

jump like vimmers do!
Emacs Lisp
55
star
7

emacs-evil-bootstrap

the quickest way to trying out vim in emacs
Emacs Lisp
52
star
8

pt.el

An emacs front-end for Pt, the Platinum Searcher
Emacs Lisp
40
star
9

dotfiles

here be dragons
Shell
10
star
10

dependencypropertyweaver

An MSBuild task that leverages Mono.Cecil to use post-build IL weaving to automatically convert auto-properties to dependency properties.
C#
7
star
11

Ping.Pong

A fast and lean Twitter client written Silverlight, For Developers, By Developers
C#
5
star
12

AdvancedIocTechniques

The code/slides that I used for my presentation about advanced IoC techniques at Code Camp NYC 2012.
C#
3
star
13

MessageQueuePerfTest

Simple test project for measuring roundtrip performance for sending durable messages with miscellaneous message queuing systems.
C#
3
star
14

pingpong.js

JavaScript
3
star
15

AspectCastle

A lightweight AOP framework built on top of Castle DynamicProxy.
C#
3
star
16

FontSampler

2
star
17

XmlCommentShrink

Shrink those XML comment headers on class, methods, properties, etc.
C#
2
star
18

msbuild-demo

2
star
19

reduxify

JavaScript
2
star
20

AOPDemo

C#
2
star
21

moneynode

JavaScript
2
star
22

.spacemacs.d

Emacs Lisp
2
star
23

ResharperStaticResource

A sample test project where Resharper's code analysis incorrectly flags XAML resources as missing when they are defined using a derived ResourceDictionary.
C#
2
star
24

bling.github.io

HTML
1
star
25

colorknit

JavaScript
1
star
26

moolah

Ruby
1
star