Skip to content

Commit

Permalink
Merge branch 'new_develop' (v0.4.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Nov 4, 2014
2 parents f7b128a + f4471a6 commit 6c5b0c5
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 71 deletions.
7 changes: 3 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
[submodule "spacemacs/extensions/nose"]
path = spacemacs/extensions/nose
url = http://github.com/syl20bnr/nose.el
[submodule "spacemacs/snippets"]
path = spacemacs/snippets
url = http://github.com/syl20bnr/yasnippet-snippets
ignore = dirty
[submodule "spacemacs/extensions/use-package"]
path = spacemacs/extensions/use-package
url = http://github.com/jwiegley/use-package
Expand All @@ -42,3 +38,6 @@
[submodule "contrib/syl20bnr/extensions/o-blog"]
path = contrib/syl20bnr/extensions/o-blog
url = https://github.com/renard/o-blog.git
[submodule "spacemacs/extensions/yasnippet-snippets"]
path = spacemacs/extensions/yasnippet-snippets
url = http://github.com/AndreaCrotti/yasnippet-snippets.git
43 changes: 43 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contribute to Spacemacs

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**

- [Contribute to Spacemacs](#contribute-to-spacemacs)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Submitting a contribution layer upstream](#submitting-a-contribution-layer-upstream)

<!-- markdown-toc end -->

## Pull Request Guidelines

`Spacemacs` uses the `git-flow` model, so you'll have to submit your
contributions and fixes within a pull-request to apply against the `develop`
branch.

_PR = pull request_

**Guidelines:**
- branch from `develop` only
- one topic per PR
- one commit per PR
- if you have several commits on different topics, close the PR and create
one PR per topic
- if you still have several commits, squash them into only one commit
- rebase your PR branch on top of upstream `develop` before submitting the PR

**Getting Help:**
If you have any question on this process, join the [gitter chatroom][gitter]
and ask your questions there. Do not hesitate to ask your questions even the
simplest one, it will be a pleasure to help you to contribute!

## Submitting a contribution layer upstream

It is recommended to join a `README.md` file with your layer, ideally this file
should document the packages of your layer as well as the key bindings
associated with them.

To submit your contribution layer follow the above
[guidelines](#pull-request-guidelines) for pull requests.

**Note:** by submitting a configuration layer you become the maintainer of it.
81 changes: 34 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

git clone --recursive http://github.com/syl20bnr/spacemacs .emacs.d

_Jump to [Install](#install) for more info and [here](#pull-request-guidelines)
_Jump to [Install](#install) for more info and [here][CONTRIBUTE.md-PR]
for contribution guidelines_

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
Expand Down Expand Up @@ -72,6 +72,7 @@ for contribution guidelines_
- [Vim motions with ace-jump mode](#vim-motions-with-ace-jump-mode)
- [Buffers and Files](#buffers-and-files)
- [Ido](#ido)
- [NeoTree file tree](#neotree-file-tree)
- [Bookmarks](#bookmarks)
- [Symbols](#symbols)
- [Listing symbols by semantic](#listing-symbols-by-semantic)
Expand Down Expand Up @@ -390,14 +391,7 @@ layer).

### Submitting a contribution layer upstream

It is recommended to join a `README.md` file with your layer, ideally this file
should document the packages of your layer as well as the key bindings
associated with them.

To submit your contribution layer follow the [guidelines](#pull-request-guidelines)
for pull requests.

_Note: by submitting a configuration layer you become the maintainer of it._
See the [CONTRIBUTE.md-CL][] file.

### Themes Megapack example

Expand All @@ -409,34 +403,7 @@ installed around 100 themes you are free to try with `<SPC> h t` (helm-themes).

## Pull Request Guidelines

`Spacemacs` uses the `git-flow` model, so you'll have to submit your
contributions and fixes within a pull-request to apply against the `develop`
branch.

_Guidelines:_
- always create a branch for your pull request.
- branch from develop for new features or fixes.
- branch from `master` for hot fixes.
- if you don't know if you must branch from `master` or `develop` then branch
from `develop`.
- commit often in your pull request branch with a concise and clear commit
message. The first line of a commit message should be short, you can explain
in details what you did in a paragraph by skipping a line after the first line.
`often` is subtle, see `Notes` below.
- it is recommended to rebase your pull request branch on top of `master` or
`develop` (depending on your base branch) before submitting.

If you have any question on this process, join the [gitter chatroom][gitter]
and ask your questions there. Do not hesitate to ask your questions even the
simplest one, it will be a pleasure to help you in your desire to contribute!

_Notes:_
I encourage you to not squash too much your commits. Good candidates for squash
are commits which contain reverted modifications. For instance when you was
experimenting on a feature and performed a lot of refactoring in the process,
you can squash the intermediary refactoring commits. Typo commits are also good
candidates for squashing. Anyway, just try to find a good balance between one
huge commit and lot of small commits.
See the [CONTRIBUTE.md-PR][] file.

## Dotfile Configuration

Expand Down Expand Up @@ -763,6 +730,7 @@ They are both extended with various packages to build on their foundations.
[evil-exchange][] | port of [vim-exchange][]
[evil-surround][] | port of [vim-surround][]
[evil-nerd-commenter][] | port of [nerdcommenter][]
[NeoTree][neotree] | mimic [NERD Tree][nerdtree]

### Helm extensions

Expand Down Expand Up @@ -883,7 +851,7 @@ Key Binding | Description
`<SPC> f i` | open your `init.el` file
`<SPC> f s` | save a file
`<SPC> f S` | save all files
`<SPC> f t` | toggle file tree side bar using [neotree][neotree]
`<SPC> f t` | toggle file tree side bar using [NeoTree][neotree]
`<SPC> f y` | show current file absolute path in the minibuffer

#### Ido
Expand All @@ -904,6 +872,30 @@ Key Binding | Description
`C-S-j` | go to next directory
`C-S-k` | go to previous directory


#### NeoTree file tree

`Spacemacs` provides a quick and simple way to navigate in an unknown project
file tree with [NeoTree][neotree].

To toggle the `NeoTree` buffer press:

<SPC> f t

In the `NeoTree` buffer:

Key Binding | Description
---------------|----------------------------------------------------------------
`TAB` or `RET` | expand/open
`a` | toggle stretch the buffer
`c` | create a node
`d` | delete a node
`g` | refresh
`H` | toggle hidden files
`K` | kill corresponding buffer
`q` or `fd` | hide `NeoTree` buffer
`r` | rename a node

#### Bookmarks

Bookmarks can be set anywhere in a file. Bookmarks are persistent. They are very
Expand Down Expand Up @@ -1644,14 +1636,6 @@ your `~/.spacemacs` the following snippet:
(add-hook 'emacs-lisp-mode-hook 'evil-lisp-state))
```

2) Do not use popwin for `helm` buffers:

```elisp
(defun dotspacemacs/config ()
(spacemacs/remove-popwin-display-config "helm")
```


## TODO list

- Add support for [multiple-cursors][multiple-cursors] mode.
Expand Down Expand Up @@ -1717,7 +1701,6 @@ Thank you to the whole Emacs community from core developers to elisp hackers!
[smeargle]: https://github.com/syohex/emacs-smeargle
[git-timemachine]: https://github.com/pidu/git-timemachine
[git-messenger]: https://github.com/syohex/emacs-git-messenger
[neotree]: http://www.emacswiki.org/emacs/NeoTree
[evil-lisp-state]: https://github.com/syl20bnr/evil-lisp-state
[ido-vertical-mode]: https://github.com/gempesaw/ido-vertical-mode.el
[emacs_live]: https://github.com/overtone/emacs-live
Expand All @@ -1731,3 +1714,7 @@ Thank you to the whole Emacs community from core developers to elisp hackers!
[guide-key]: https://github.com/kai2nenobu/guide-key
[guide-key-tip]: https://github.com/aki2o/guide-key-tip
[gitter]: https://gitter.im/syl20bnr/spacemacs
[CONTRIBUTE.md-PR]: https://github.com/syl20bnr/spacemacs/blob/master/CONTRIBUTE.md#pull-request-guidelines
[CONTRIBUTE.md-CL]: https://github.com/syl20bnr/spacemacs/blob/master/CONTRIBUTE.md#submitting-a-contribution-layer-upstream
[neotree]: https://github.com/jaypei/emacs-neotree
[nerdtree]: https://github.com/scrooloose/nerdtree
2 changes: 1 addition & 1 deletion contrib/ranger-control/config.el
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
(evil-leader/set-key
"pc" 'ranger-control/projectile-cd)
"oc" 'ranger-control/projectile-cd)
8 changes: 8 additions & 0 deletions contrib/trishume/config.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(dolist (mode '(c++
json
racket
elisp
LaTeX
yaml))
(add-hook (intern (concat (symbol-name mode) "-mode-hook"))
'flycheck-mode))
19 changes: 19 additions & 0 deletions contrib/trishume/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
julia-mode
helm-ag
lua-mode
racket-mode
go-mode
yaml-mode
ag
))

Expand Down Expand Up @@ -86,3 +89,19 @@
(defun trishume/init-lua-mode ()
(use-package lua-mode
:defer t))

(defun trishume/init-go-mode ()
(use-package go-mode
:defer t))

(defun trishume/init-yaml-mode ()
(use-package yaml-mode
:defer t))

(defun trishume/init-racket-mode ()
(use-package racket-mode
:defer t
:config
(add-hook 'racket-mode-hook
'(lambda ()
(define-key racket-mode-map (kbd "H-r") 'racket-run)))))
5 changes: 4 additions & 1 deletion core/spacemacs-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
(setq truncate-lines t)
(setq cursor-type nil)
;; no welcome buffer
(setq inhibit-startup-screen t))
(setq inhibit-startup-screen t)
;; motion state since this is a special mode
(eval-after-load 'evil
'(add-to-list 'evil-motion-state-modes 'spacemacs-mode)))

(defun spacemacs/emacs-version-ok ()
(not (version< emacs-version spacemacs-min-version)))
Expand Down
1 change: 1 addition & 0 deletions spacemacs/extensions/yasnippet-snippets
Submodule yasnippet-snippets added at 32bbd3
43 changes: 26 additions & 17 deletions spacemacs/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,6 @@ DELETE-FUNC when calling CALLBACK.
(if shadowed (call-interactively shadowed)))))))
;; easier toggle for emacs-state
(evil-set-toggle-key "s-`")
;; moves `evil-insert-digraph' to C-i in order to free up C-k for
;; candidate selection in auto-complete.
(define-key evil-insert-state-map (kbd "C-k") nil)
(define-key evil-insert-state-map (kbd "C-i") 'evil-insert-digraph)
;; escape state with a better key sequence than ESC
(let* ((seq spacemacs-normal-state-sequence)
(key (char-to-string (car spacemacs-normal-state-sequence)))
Expand Down Expand Up @@ -628,9 +624,9 @@ DELETE-FUNC when calling CALLBACK.
(ac-config-default)
(add-to-list 'completion-styles 'initials t)
(evil-leader/set-key "ta" 'auto-complete-mode)
(define-key ac-mode-map (kbd "C-j") 'ac-next)
(define-key ac-mode-map (kbd "C-k") 'ac-previous)
(define-key ac-mode-map (kbd "<S-tab>") 'ac-previous)
(define-key ac-completing-map (kbd "C-j") 'ac-next)
(define-key ac-completing-map (kbd "C-k") 'ac-previous)
(define-key ac-completing-map (kbd "<S-tab>") 'ac-previous)
;; customization
(setq ac-auto-start 2
ac-delay 0.
Expand Down Expand Up @@ -1549,16 +1545,16 @@ DELETE-FUNC when calling CALLBACK.
(lambda ()
(define-key evil-motion-state-local-map (kbd "TAB") 'neotree-enter)
(define-key evil-motion-state-local-map (kbd "RET") 'neotree-enter)
(define-key evil-motion-state-local-map (kbd "D") 'neotree-delete-node)
(define-key evil-motion-state-local-map (kbd "H") 'neotree-hidden-file-toggle)
(define-key evil-motion-state-local-map (kbd "?") 'evil-search-backward)
(define-key evil-motion-state-local-map (kbd "a") 'neotree-stretch-toggle)
(define-key evil-motion-state-local-map (kbd "A") 'neotree-stretch-toggle)
(define-key evil-motion-state-local-map (kbd "R") 'neotree-rename-node)
(define-key evil-motion-state-local-map (kbd "C") 'neotree-create-node)
(define-key evil-motion-state-local-map (kbd "c") 'neotree-create-node)
(define-key evil-motion-state-local-map (kbd "d") 'neotree-delete-node)
(define-key evil-motion-state-local-map (kbd "g") 'neotree-refresh)
(define-key evil-motion-state-local-map (kbd "H") 'neotree-hidden-file-toggle)
(define-key evil-motion-state-local-map (kbd "K") 'kill-this-buffer)
(define-key evil-motion-state-local-map (kbd "q") 'neotree-hide)
(define-key evil-motion-state-local-map (kbd "?") 'evil-search-backward)
(define-key evil-motion-state-local-map (kbd "Q") 'kill-this-buffer)))
(define-key evil-motion-state-local-map (kbd "r") 'neotree-rename-node)
))
))

(defun spacemacs/init-org ()
Expand Down Expand Up @@ -1828,6 +1824,19 @@ DELETE-FUNC when calling CALLBACK.
(spacemacs//diminish smartparens-mode " (Ⓢ)"))
:config
(progn
(defun spacemacs/smartparens-pair-newline (id action context)
(save-excursion
(newline)
(indent-according-to-mode)))

(defun spacemacs/smartparens-pair-newline-and-indent (id action context)
(spacemacs/smartparens-pair-newline id action context)
(indent-according-to-mode))

(sp-pair "{" nil :post-handlers
'(:add (spacemacs/smartparens-pair-newline-and-indent "RET")))
(sp-pair "[" nil :post-handlers
'(:add (spacemacs/smartparens-pair-newline-and-indent "RET")))
(sp-local-pair 'emacs-lisp-mode "'" nil :actions nil))))

(defun spacemacs/init-smeargle ()
Expand Down Expand Up @@ -1926,8 +1935,8 @@ DELETE-FUNC when calling CALLBACK.
(defun spacemacs/load-yasnippet ()
(if (not (boundp 'yas-minor-mode))
(progn
(let* ((dir (contribsys/get-layer-property 'spacemacs :dir))
(yas-dir (list (concat dir "snippets"))))
(let* ((dir (contribsys/get-layer-property 'spacemacs :ext-dir))
(yas-dir (list (concat dir "yasnippet-snippets"))))
(setq yas-snippet-dirs yas-dir)
(yas-global-mode 1)))))
(add-to-hooks 'spacemacs/load-yasnippet '(prog-mode-hook
Expand All @@ -1937,7 +1946,7 @@ DELETE-FUNC when calling CALLBACK.
(progn
(spacemacs//diminish yas-minor-mode "")
(require 'helm-c-yasnippet)
(evil-leader/set-key "hy" 'helm-yas-complete)
(evil-leader/set-key "is" 'helm-yas-complete)
(setq helm-c-yas-space-match-any-greedy t))))

(defun spacemacs/init-zenburn-theme ()
Expand Down
1 change: 0 additions & 1 deletion spacemacs/snippets
Submodule snippets deleted from 60dd93

0 comments on commit 6c5b0c5

Please sign in to comment.