Skip to content

Commit

Permalink
Merge branch 'develop' (v0.65.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Mar 9, 2015
2 parents 7c85db3 + c5c861b commit 2d28e53
Show file tree
Hide file tree
Showing 28 changed files with 568 additions and 169 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,12 @@ Details can be found on the emacs-mac-port [README][emacs-mac-port-server].

3. Launch Emacs. Spacemacs will automatically install the packages it requires.

4. Restart Emacs to complete the installation.

See the [troubleshooting][troubleshoot] guide if you have any issues.
4. Restart Emacs to complete the installation. If you see something like this:
```
Loading............................................................Ready!
[121 packages loaded in 3.208s]
```
You should be good to go! Otherwise, see the [troubleshooting][troubleshoot] guide.

# Update

Expand Down
34 changes: 0 additions & 34 deletions contrib/ace-window/README.md

This file was deleted.

39 changes: 0 additions & 39 deletions contrib/ace-window/packages.el

This file was deleted.

46 changes: 43 additions & 3 deletions contrib/evil-snipe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ The package [evil-snipe](https://github.com/hlissner/evil-snipe)
- enables more efficient searches with `f/F/t/T`.
- adds a new, more precise search with `s/S`

Evil-snipe allows you to search more quickly and precisely in the buffer.
It does so by improving on the built in `f`/`F`/`t`/`T` searches and
adding another search command, namely `s`/`S`.

`evil-snipe` changes `s/S` behavior in order to search forward/backwards in the
buffer with two chars.

Expand All @@ -32,7 +36,12 @@ To use this contribution add it to your `~/.spacemacs`
(setq-default dotspacemacs-configuration-layers '(evil-snipe))
```

### Alternate behavior for `f/F` and `t/T`
### Improved f and t search behavior

With evil-snipe you can define your own search scope for `f` and `t` searches
which means that you won't have to jump to the correct line before searching
with `f`/`t`/`F`/`T`. And after you have found a match, you can just press `f`
or `t` again afterwards to continue the search. No need to use `;`/`,`.

This alternate behavior is disabled by default, to enable it set the
layer variable `evil-snipe-enable-alternate-f-and-t-behaviors` to `t`:
Expand All @@ -42,8 +51,16 @@ layer variable `evil-snipe-enable-alternate-f-and-t-behaviors` to `t`:
'(evil-snipe :variables evil-snipe-enable-alternate-f-and-t-behaviors t ))
```

Instead of repeating searches with `,/;` you can just press `f/t` again to
continue the search (`F/T` to go the opposite direction).
### Two-character search with s

With the `s`/`S` keys you can do a simple search like `f`/`t`, but instead
of searching for one character, you search for two. This makes the search a lot
more precise than regular `f`/`t` searches. While you can search
forward or backwards in the buffer with `/` and `?`, `s`/`S` are much easier
to reach, don't require you to press enter and they are precise enough for
many common purposes.

### More scopes

Evil-snipe also adds several scope options for searches (set
`evil-snipe-scope` and `evil-snipe-repeat-scope` to one of these, the default
Expand All @@ -62,6 +79,29 @@ If you do not want to replace the regular `f/F/t/T` behavior, just
remove this line from `evil-snipe/packages.el`:
`(evil-snipe-replace-evil)`

### Symbol groups

With symbol groups you can let a character stand for a regex, for example a
group of characters. By adding a pair of `'(CHAR REGEX)` to the list
`'evil-snipe-symbol-groups` you can search for a regex very simply:

- Here we set the `[` character to mean `all characters "[({"` so a search
with `sa[` would find `a[`, `a{` or `a(`.

```elisp
;; Alias [ and ] to all types of brackets
(add-to-list 'evil-snipe-symbol-groups '(?\\[ \"[[{(]\"))
```

- Here we set the char `:` to mean `a regex matching python function
definitions` so by searching with `f:fff` you can quickly cycle through
all function definitions in a buffer!

```elisp
;; For python style functions
(add-to-list 'evil-snipe-symbol-groups '(?\\: \"def .+:\"\))
```

## Key bindings

TODO
6 changes: 3 additions & 3 deletions contrib/evil-snipe/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ which require an initialization must be listed explicitly in the list.")
evil-snipe-show-prompt nil
evil-snipe-smart-case t)

(when evil-snipe-enable-alternate-f-and-t-behaviors
(evil-snipe-replace-evil)
(setq evil-snipe-repeat-scope 'whole-buffer)))
(when evil-snipe-enable-alternate-f-and-t-behaviors
(evil-snipe-override-mode t)
(setq evil-snipe-repeat-scope 'whole-buffer)))
7 changes: 4 additions & 3 deletions contrib/fasd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ $ brew install fasd

## Keybindings

Key Binding | Description
--------------------|------------------------------------------------------------------
<kbd>SPC f z</kbd> | find a file with fasd
Key Binding | Description
--------------------------|------------------------------------------------------------------
<kbd>SPC f z</kbd> | find a file or directory with fasd
<kbd>SPC u SPC f z</kbd> | find a directory with fasd

[fasd]: https://github.com/clvv/fasd
[fasd-install]: https://github.com/clvv/fasd#install
Expand Down
3 changes: 2 additions & 1 deletion contrib/lang/clojure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Or set this variable when loading the configuration layer:

```clj
{:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"]
[refactor-nrepl "0.3.0-SNAPSHOT"]]}}
[refactor-nrepl "0.3.0-SNAPSHOT"]]
:dependencies [[alembic "0.3.2"]]}}
```

#### More details
Expand Down
6 changes: 4 additions & 2 deletions contrib/lang/clojure/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ which require an initialization must be listed explicitly in the list.")
cider-prompt-save-file-on-load nil
cider-repl-use-clojure-font-lock t)
(add-hook 'clojure-mode-hook 'cider-mode)
(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode))
(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
(if dotspacemacs-smartparens-strict-mode
(add-hook 'cider-repl-mode-hook #'smartparens-strict-mode)))
:config
(progn
;; add support for golden-ratio
Expand Down Expand Up @@ -154,7 +156,7 @@ the focus."
"mss" 'cider-switch-to-repl-buffer

"mtt" 'cider-test-run-tests)
(when clojure-enable-fancify-symbols
(when clojure-enable-fancify-symbols
(clojure/fancify-symbols 'cider-repl-mode)))))

(defun clojure/init-clj-refactor ()
Expand Down
41 changes: 39 additions & 2 deletions contrib/lang/html/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- [Description](#description)
- [Install](#install)
- [Key Bindings](#key-bindings)
- [Web mode](#web-mode)
- [CSS/Scss](#cssscss)

<!-- markdown-toc end -->

Expand All @@ -32,11 +34,46 @@ To use this contribution add it to your `~/.spacemacs`

## Key Bindings

### commands
### Web mode

Key Binding | Description
---------------------|------------------------------------------------------------
<kbd>SPC m h</kbd> | quick navigate CSS rules using helm
<kbd>SPC m g p</kbd> | quickly navigate CSS rules using `helm`
<kbd>SPC m e h</kbd> | highlight DOM errors
<kbd>SPC m g b</kbd> | go to the beginning of current element
<kbd>SPC m g c</kbd> | go to the first child element
<kbd>SPC m g p</kbd> | go to the parent element
<kbd>SPC m g s</kbd> | go to next sibling
<kbd>SPC m h p</kbd> | show xpath of the current element
<kbd>SPC m r c</kbd> | clone the current element
<kbd>SPC m r d</kbd> | delete the current element (does not delete the children)
<kbd>SPC m r r</kbd> | rename current element
<kbd>SPC m r w</kbd> | wrap current element
<kbd>SPC m z</kbd> | fold/unfold current element

A micro-state is also defined, start it with <kbd>SPC m .</kbd> or
<kbd>, .</kbd>

Key Binding | Description
---------------------|------------------------------------------------------------
<kbd>?</kbd> | Toggle full help
<kbd>c</kbd> | clone current element
<kbd>d</kbd> | delete (vanish) current element (does not delete the children)
<kbd>h</kbd> | previous element
<kbd>l</kbd> | next element
<kbd>L</kbd> | next sibling element
<kbd>k</kbd> | parent element
<kbd>j</kbd> | first child element
<kbd>p</kbd> | show xpath of current element
<kbd>r</kbd> | rename current element
<kbd>q</kbd> | leave the micro-state
<kbd>w</kbd> | wrap current element

### CSS/Scss

Key Binding | Description
---------------------|------------------------------------------------------------
<kbd>SPC m g h</kbd> | quickly navigate CSS rules using `helm`

[web-mode]: http://web-mode.org/
[emmet-mode]: https://github.com/smihica/emmet-mode
Expand Down
77 changes: 66 additions & 11 deletions contrib/lang/html/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,72 @@ which require an initialization must be listed explicitly in the list.")
(defun html/init-web-mode ()
(use-package web-mode
:defer t
:mode (("\\.phtml\\'" . web-mode)
("\\.tpl\\.php\\'" . web-mode)
("\\.html\\'" . web-mode)
("\\.htm\\'" . web-mode)
("\\.[gj]sp\\'" . web-mode)
("\\.as[cp]x\\'" . web-mode)
("\\.erb\\'" . web-mode)
("\\.mustache\\'" . web-mode)
("\\.handlebars\\'" . web-mode)
("\\.hbs\\'" . web-mode)
("\\.djhtml\\'" . web-mode))))
:config
(progn

(evil-leader/set-key-for-mode 'web-mode
"meh" 'web-mode-dom-errors-show
"mgb" 'web-mode-element-beginning
"mgc" 'web-mode-element-child
"mgp" 'web-mode-element-parent
"mgs" 'web-mode-element-sibling-next
"mhp" 'web-mode-dom-xpath
"mrc" 'web-mode-element-clone
"mrd" 'web-mode-element-vanish
"mrr" 'web-mode-element-rename
"mrw" 'web-mode-element-wrap
"mz" 'web-mode-fold-or-unfold
;; TODO element close would be nice but broken with evil.
)

(defvar spacemacs--web-mode-ms-doc-toggle 0
"Display a short doc when nil, full doc otherwise.")

(defun spacemacs//web-mode-ms-doc ()
(if (equal 0 spacemacs--web-mode-ms-doc-toggle)
"[?] for help"
"
[?] display this help
[h] previous [l] next [L] sibling [k] parent [j] child
[c] clone [d] delete [r] rename [w] wrap [p] xpath
[q] quit"))

(defun spacemacs//web-mode-ms-toggle-doc ()
(interactive)
(setq spacemacs--web-mode-ms-doc-toggle
(logxor spacemacs--web-mode-ms-doc-toggle 1)))

(spacemacs|define-micro-state web-mode
:doc (spacemacs//web-mode-ms-doc)
:persistent t
:evil-leader-for-mode (web-mode . "m.")
:bindings
("<escape>" nil :exit t)
("?" spacemacs//web-mode-ms-toggle-doc)
("c" web-mode-element-clone)
("d" web-mode-element-vanish)
("h" web-mode-element-previous)
("l" web-mode-element-next)
("L" web-mode-element-sibling-next)
("k" web-mode-element-parent)
("j" web-mode-element-child)
("p" web-mode-dom-xpath)
("r" web-mode-element-rename)
("q" nil :exit t)
("w" web-mode-element-wrap)))

:mode
(("\\.phtml\\'" . web-mode)
("\\.tpl\\.php\\'" . web-mode)
("\\.html\\'" . web-mode)
("\\.htm\\'" . web-mode)
("\\.[gj]sp\\'" . web-mode)
("\\.as[cp]x\\'" . web-mode)
("\\.erb\\'" . web-mode)
("\\.mustache\\'" . web-mode)
("\\.handlebars\\'" . web-mode)
("\\.hbs\\'" . web-mode)
("\\.djhtml\\'" . web-mode))))

(defun html/init-emmet-mode ()
(use-package emmet-mode
Expand Down
8 changes: 6 additions & 2 deletions contrib/lang/ruby/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,9 @@
(use-package ruby-test-mode
:defer t
:init (add-hook 'ruby-mode-hook 'ruby-test-mode)
:config (progn (evil-leader/set-key "mtb" 'ruby-test-run)
(evil-leader/set-key "mtt" 'ruby-test-run-at-point))))
:config
(progn
(spacemacs|hide-lighter ruby-test-mode)
(evil-leader/set-key
"mtb" 'ruby-test-run
"mtt" 'ruby-test-run-at-point))))
Loading

0 comments on commit 2d28e53

Please sign in to comment.