Skip to content

Commit

Permalink
Merge magnars/master
Browse files Browse the repository at this point in the history
  • Loading branch information
cjohansen committed Jul 14, 2013
2 parents ad64dfa + 91ba3ce commit 8a1f149
Show file tree
Hide file tree
Showing 122 changed files with 5,459 additions and 694 deletions.
61 changes: 35 additions & 26 deletions .gitmodules
Expand Up @@ -7,12 +7,6 @@
[submodule "site-lisp/jade-mode"]
path = site-lisp/jade-mode
url = https://github.com/brianc/jade-mode
[submodule "site-lisp/coffee-mode"]
path = site-lisp/coffee-mode
url = https://github.com/defunkt/coffee-mode
[submodule "site-lisp/mark-multiple"]
path = site-lisp/mark-multiple
url = https://github.com/magnars/mark-multiple.el.git
[submodule "site-lisp/ace-jump-mode"]
path = site-lisp/ace-jump-mode
url = https://github.com/winterTTr/ace-jump-mode.git
Expand Down Expand Up @@ -82,33 +76,48 @@
[submodule "site-lisp/buster-mode"]
path = site-lisp/buster-mode
url = https://github.com/magnars/buster-mode.git
[submodule "site-lisp/ruby-end"]
path = site-lisp/ruby-end
url = https://github.com/rejeep/ruby-end.git
[submodule "site-lisp/zencoding"]
path = site-lisp/zencoding
url = https://github.com/rooney/zencoding.git
[submodule "site-lisp/change-inner"]
path = site-lisp/change-inner
url = https://github.com/magnars/change-inner.el.git
[submodule "site-lisp/crappy-jsp-mode"]
path = site-lisp/crappy-jsp-mode
url = git://github.com/magnars/crappy-jsp-mode.git
path = site-lisp/crappy-jsp-mode
url = git://github.com/magnars/crappy-jsp-mode.git
[submodule "site-lisp/s"]
path = site-lisp/s
url = https://github.com/magnars/s.el.git
path = site-lisp/s
url = https://github.com/magnars/s.el.git
[submodule "site-lisp/dash"]
path = site-lisp/dash
url = https://github.com/magnars/dash.el.git
path = site-lisp/dash
url = https://github.com/magnars/dash.el.git
[submodule "site-lisp/multifiles"]
path = site-lisp/multifiles
url = https://github.com/magnars/multifiles.el.git
path = site-lisp/multifiles
url = https://github.com/magnars/multifiles.el.git
[submodule "site-lisp/tagedit"]
path = site-lisp/tagedit
url = https://github.com/magnars/tagedit.git
path = site-lisp/tagedit
url = https://github.com/magnars/tagedit.git
[submodule "site-lisp/fold-this"]
path = site-lisp/fold-this
url = https://github.com/magnars/fold-this.el.git
path = site-lisp/fold-this
url = https://github.com/magnars/fold-this.el.git
[submodule "site-lisp/revealjs-mode"]
path = site-lisp/revealjs-mode
url = https://github.com/cjohansen/revealjs-mode.git
path = site-lisp/revealjs-mode
url = https://github.com/cjohansen/revealjs-mode.git
[submodule "site-lisp/clj-refactor"]
path = site-lisp/clj-refactor
url = https://github.com/magnars/clj-refactor.el.git
[submodule "site-lisp/tern"]
path = site-lisp/tern
url = https://github.com/marijnh/tern.git
[submodule "site-lisp/simplezen"]
path = site-lisp/simplezen
url = https://github.com/magnars/simplezen.el.git
[submodule "site-lisp/angular-snippets"]
path = site-lisp/angular-snippets
url = https://github.com/magnars/angular-snippets.el.git
[submodule "site-lisp/flx"]
path = site-lisp/flx
url = https://github.com/lewang/flx.git
[submodule "site-lisp/flycheck"]
path = site-lisp/flycheck
url = https://github.com/lunaryorn/flycheck.git
[submodule "site-lisp/datomic-snippets"]
path = site-lisp/datomic-snippets
url = https://github.com/magnars/datomic-snippets.git
96 changes: 93 additions & 3 deletions .mc-lists.el
Expand Up @@ -4,12 +4,20 @@
(setq mc/cmds-to-run-for-all
'(
ac-complete
adv-dash
adv-dot
adv-enter
adv-gt
adv-open-curly
adv-tab
back-to-indentation-or-beginning
backward-sexp
c-electric-backspace
c-electric-delete-forward
c-electric-paren
c-electric-semi&comma
c-electric-slash
c-electric-star
change-inner
change-number-at-point
change-outer
Expand All @@ -18,53 +26,135 @@
delete-blank-lines
dired-back-to-start-of-files
duplicate-current-line-or-region
end-of-buffer
eval-and-replace
eval-last-sexp
fold-this
forward-paragraph
forward-sentence
forward-sexp
hippie-expand-no-case-fold
html-wrap-in-tag
isearch-forward-use-region
js2-beginning-of-line
js2-end-of-line
js2-insert-and-indent
js2r-inline-var
js2r-move-line-up
js2r-split-string
js2r-var-to-this
kill-and-retry-line
kill-region-or-backward-word
kill-sexp
magit-stage-item
markdown-enter-key
move-line-down
move-line-up
move-text-down
move-text-up
move-to-window-line-top-bottom
new-line-above
open-line-above
open-line-below
org-beginning-of-line
org-delete-backward-char
org-delete-char
org-end-of-line
org-metaleft
org-metaright
org-return-indent
org-self-insert-command
org-shiftright
org-yank
orgtbl-self-insert-command
paredit-backslash
paredit-backward
paredit-backward-up
paredit-close-round
paredit-close-square
paredit-comment-dwim
paredit-doublequote
paredit-forward
paredit-forward-delete
paredit-forward-down
paredit-forward-kill-word
paredit-forward-slurp-sexp
paredit-forward-up
paredit-join-sexps
paredit-kill
paredit-kill-region-or-backward-word
paredit-newline
paredit-open-curly
paredit-open-round
paredit-open-square
paredit-raise-sexp
paredit-reindent-defun
paredit-semicolon
paredit-splice-sexp
paredit-split-sexp
paredit-wrap-round
paredit-wrap-round-from-behind
paredit-wrap-square
quoted-insert
ruby-electric-brace
save-region-or-current-line
sgml-delete-tag
sgml-slash
skeleton-pair-insert-maybe
slime-space
sp--self-insert-command
sp-remove-active-pair-overlay
sp-self-insert-command
subtract-number-at-point
tagedit-forward-slurp-tag
tagedit-insert-dot
tagedit-insert-equal
tagedit-insert-exclamation-mark
tagedit-insert-gt
tagedit-insert-hash
tagedit-insert-lt
tagedit-insert-quote
tagedit-kill
tagedit-kill-attribute
tagedit-maybe-insert-slash
tagedit-raise-tag
tagedit-splice-tag
tern-ac-dot-complete
toggle-assert-refute
toggle-quotes
touch-buffer-file
transpose-params
transpose-sexps
wrap-region-trigger
yank-indented
yas/expand
zap-up-to-char
))

(setq mc/cmds-to-run-once
'(
ace-jump-mode
adv-insert-new-number
cleanup-buffer
describe-key
dired-toggle-read-only
edebug-next-mode
eval-expression
goto-line-with-feedback
handle-switch-frame
ido-switch-buffer
js2r-extract-var
js2r-rename-var
quit-window
sgml-maybe-name-self
jump-between-source-and-test-files
magit-status
mc/add-cursor-on-click
mc/add-cursors-to-all-matches
multiple-cursors-mode
persp-switch
shell
smex
toggle-read-only
view-echo-area-messages
wgrep-change-to-wgrep-mode
wgrep-finish-edit
wgrep-save-all-buffers
))
53 changes: 28 additions & 25 deletions README.md
Expand Up @@ -6,14 +6,7 @@ You can also see some thoughts behind the settings on my [What the .emacs.d!?](h

## Setup

To grab all the dependencies, either:

git clone git://github.com/magnars/.emacs.d.git
cd .emacs.d
git submodule init
git submodule update

or on git v1.6.5 or later:
To grab all the dependencies:

git clone --recursive git://github.com/magnars/.emacs.d.git

Expand All @@ -22,21 +15,16 @@ that are best handled by the package manager.

## Install emacs on mac

I use Cocoa Emacs, installed like this:

brew install emacs --cocoa

You can also get the very latest Emacs:

brew install emacs --cocoa --use-git-head --HEAD

To open it with Alfred or Quicksilver, you have to copy `Emacs.app` into
`/Applications` instead of the symlink that brew places there.
I use [Emacs For Mac OS X](http://emacsformacosx.com).

## Tips for using these emacs settings

If you want to use my settings straight out of the box, here are some things to note:

* I recommend starting with a blank emacs +
[Technomancy's better-defaults package](https://github.com/technomancy/better-defaults),
and then dig through this repo for useful nuggets.

* The key bindings are optimized for a norwegian keyboard layout.

* Start by reading up on all the cool stuff in key-bindings.el.
Expand All @@ -49,18 +37,13 @@ If you want to use my settings straight out of the box, here are some things to

* `C-h` is rebound to backspace, like in the shell. Get help on `F1` instead.

* Autocomplete with `C-.`
* Autocomplete with `C-.` (autocomplete entire lines with `C-:`)

* expand-region is your friend. Find its bound key by doing `F1 f er/expand-region`

* annoying-arrows suggests alternative ways of moving around if you use the
arrow keys excessively.

* Undo with `C-_` and redo with `M-_`. Watch the undo-tree with `C-x u`

* Easily add functions to the F-keys with `M-: (f5 <sexps here>)`, example `(f5 (flush-lines "console.log"))`

* Quickly jump anywhere in the buffer by pressing `fn` plus the starting letter of a word.
* Quickly jump anywhere in the buffer with `C-ø` then the starting letter of a word.

* Indent and clean up white space in the entire buffer with `C-c n`

Expand All @@ -70,6 +53,26 @@ If you want to use my settings straight out of the box, here are some things to

* Watch [emacsrocks.com](http://emacsrocks.com)

### Additional setup

#### tern.js

If you want [tern](http://ternjs.net/) in your javascript, you need to
install [node](http://nodejs.org) and run `npm install` in the
`.emacs/site-lisp/tern` directory.

#### nrepl-inspect

If you want [nrepl-inspect](https://github.com/vitalreactor/nrepl-inspect)
to work, you need to:

- Go to `.emacs.d/site-lisp/nrepl-inspect` and do `lein install`
- Configure your `~/.lein/profiles.clj`:

{:user {:dependencies [[nrepl-inspect "0.3.0"]]
:repl-options {:nrepl-middleware
[inspector.middleware/wrap-inspect]}}}

## Survival guide for the first week of emacs

When you start using emacs for the first time, your habits fight you every inch
Expand Down

0 comments on commit 8a1f149

Please sign in to comment.