Skip to content

Commit 11524f2

Browse files
evil-basics: update for mkdocs
resolve: #333
1 parent a4a4e59 commit 11524f2

File tree

13 files changed

+154
-135
lines changed

13 files changed

+154
-135
lines changed

docs/spacemacs-basics/evil-g-menu.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Evil G menu
2+
23
`g` in normal mode opens a menu of convenient utilities. Practicalli uses this menu to comment existing lines, edit with multiple cursors, jumping to top or bottom of the buffer and joining lines together.
34

4-
[![Spacemacs Vim Normal - g menu](/images/spacemacs-vim-normal-g-menu.png)](/images/spacemacs-vim-normal-g-menu.png)
5+
![Spacemacs Vim Normal - g menu](https://github.com/practicalli/graphic-design/blob/live/editors/spacemacs/screenshots/spacemacs-vim-normal-g-menu.png?raw=true)
56

67

78
## Comment lines and regions
@@ -11,7 +12,7 @@
1112

1213

1314
## Multiple cursors
14-
`g r` is the menu for [multiple cursors](/spacemacs-basics/evil-tools/multiple-cursors.md), allowing simultaneous editing at multiple points
15+
`g r` is the menu for [:fontawesome-solid-book-open: multiple cursors](/spacemacs/spacemacs-basics/evil-tools/multiple-cursors/), allowing simultaneous editing at multiple points
1516

1617
`12 gr j` will add a cursor to the 12 lines below the current cursor, using the same position in the line. Any edits are applied to all cursors.
1718

@@ -29,11 +30,11 @@
2930

3031

3132
## Workspaces
32-
`g t` to switch to next [workspace](working-with-projects/layouts.md), `g T` to switch to previous.
33+
`g t` to switch to next [:fontawesome-solid-book-open: workspace](/spacemacs-basics/working-with-projects/layouts/), `g T` to switch to previous.
3334

3435

3536
## Changing text case
3637
`g u` to change the current character or selection to lowercase, `g U` for uppercase.
3738

38-
> #### Hint::Toggle case with `~`
39-
> `~` will toggle the case of the current character or selected region.
39+
!!! HINT "Toggle case with `~`"
40+
`~` will toggle the case of the current character or selected region.

docs/spacemacs-basics/evil-tools/helm-swoop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Search a buffer (Clojure namespace) or project and use the results to navigate t
88

99
`SPC s S` assumes word under cursor is the symbol you wish to search for.
1010

11-
helm-swoop is also available in the [symbol highlight transient menu](/navigating-code/names-symbols.md).
11+
helm-swoop is also available in the [:fontawesome-solid-book-open: symbol highlight transient menu](/spacemacs/navigating-code/names-symbols/).
1212

1313

1414
| Keybindings | Description |
@@ -22,5 +22,5 @@ For example, navigate to a function definition and all the places that function
2222

2323
![Helm multi-swoop](https://raw.githubusercontent.com/ShingoFukuyama/spacemacs/images/master/helm-multi-swoop.gif)
2424

25-
> #### Hint::Refactor code
26-
> [Refactor section](/refactor/) provides examples of using helm-ag, helm-swoop, iedit, narrowing and clj-refactor.
25+
!!! HINT "Refactor code"
26+
[:fontawesome-solid-book-open: Refactor section](/spacemacs/refactor/) provides examples of using helm-ag, helm-swoop, iedit, narrowing and clj-refactor.

docs/spacemacs-basics/evil-tools/iedit-in-action.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Once editing the selections, use `n` to jump to next word/region and `N` to the
2626

2727
!!! HINT "iedit and narrowing"
2828
iedit selects all occurrences in a buffer. If you only want to change one part of the text (or a specific function), then you can narrow to just edit that specific region.
29+
2930
See [narrow](narrowing.md) for more details
3031

3132

docs/spacemacs-basics/evil-tools/iedit.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
Make multiple matching edits within a buffer
44

5-
`SPC s e` to start [`evil-iedit-state`](https://github.com/syl20bnr/evil-iedit-state){target=_blank} to quickly edit multiple occurrences of a symbol within a buffer or selection. Use iedit with helm-ag to [make multiple matching edits across a project](replacing-text-across-projects.md).
5+
`SPC s e` to start [:globe_with_meridians: `evil-iedit-state`](https://github.com/syl20bnr/evil-iedit-state){target=_blank} to quickly edit multiple occurrences of a symbol within a buffer or selection.
6+
7+
Use iedit with helm-ag to [:fontawesome-solid-book-open: make multiple matching edits across a project](replacing-text-across-projects.md).
68

79
`e` within visual state and symbol highlight transient state also enables iedit.
810

@@ -57,10 +59,10 @@ Narrowing, `SPC n`, limits the scope of iedit so only the relevant occurrences a
5759
| `C-U` | down-case the occurrences |
5860

5961
!!! Hint
60-
> `0`, `$`, `A` and `I` have the default Vim behavior when used outside of an `occurrence`.
62+
`0`, `$`, `A` and `I` have the default Vim behavior when used outside of an `occurrence`.
6163

6264

6365
## Reference
6466

65-
* [iedit GitHub project](https://github.com/victorhge/iedit){target=_blank}
66-
* [evil-iedit-state](https://github.com/syl20bnr/evil-iedit-state){target=_blank}
67+
- [iedit GitHub project](https://github.com/victorhge/iedit){target=_blank}
68+
- [evil-iedit-state](https://github.com/syl20bnr/evil-iedit-state){target=_blank}

docs/spacemacs-basics/evil-tools/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Evil tools
22

3-
> #### TODO::Expand on overview, provide video overview
3+
!!! TODO "TODO: Expand on overview, provide video overview"
44

55

66
There are several Evil tools that add text manipulation features to your [Vim style editing](/editing/vim-style/).

docs/spacemacs-basics/evil-tools/multiple-cursors.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ Multiple cursors is especially useful where lines are not entirely identical, i.
66

77
Multiple cursors allows you to call all Emacs named functions and have the results output to each cursor you have created.
88

9-
> #### Hint::iedit or multiple cursors
10-
> iedit is excellent for all kinds of search and replace actions where the text to change is the same. iedit finds all matches in a buffer or the scope created by [narrowing](narrowing.md).
11-
>
12-
> Where text lines do not match but have a similar form, multiple cursors allow for more irregular changes
9+
!!! HINT "iedit or multiple cursors"
10+
iedit is excellent for all kinds of search and replace actions where the text to change is the same. iedit finds all matches in a buffer or the scope created by [:fontawesome-solid-book-open: narrowing](narrowing.md).
11+
12+
Where text lines do not match but have a similar form, multiple cursors allow for more irregular changes
13+
1314

1415
## Common usage
1516

@@ -21,12 +22,14 @@ Multiple cursors allows you to call all Emacs named functions and have the resul
2122

2223
`g r I` adds cursors to visual selection lines, `S-v` and arrow keys, or `v 20 j` to select the next 24 lines
2324

24-
> #### Hint::Using Narrowing to constrain where cursors are created
25-
> `SPC n` menu allows you to narrow the view on the current buffer
26-
> `SPC n f` narrows to the current function definition
27-
> `SPC n r` narrows to a selected range of text
28-
>
29-
> See the section on [Spacemacs - Narrowing](narrowing.md)
25+
26+
!!! HINT "Using Narrowing to constrain where cursors are created"
27+
`SPC n` menu allows you to narrow the view on the current buffer
28+
`SPC n f` narrows to the current function definition
29+
`SPC n r` narrows to a selected range of text
30+
31+
See the section on [:fontawesome-solid-book-open: Narrowing](narrowing.md)
32+
3033

3134
## Keybindings
3235

@@ -46,9 +49,11 @@ The most commonly used key bindings for multiple cursors
4649

4750
`g r` shows the full menu
4851

49-
![Spacemacs G menu multiple cursor commands](https://raw.githubusercontent.com/practicalli/graphic-design/live/spacemacs/screenshots/menus/spacemacs-g-menu-multiple-cursors.png)
52+
![Spacemacs G menu multiple cursor commands](https://github.com/practicalli/graphic-design/blob/live/editors/spacemacs/screenshots/spacemacs-vim-normal-g-menu.png?raw=true)
53+
54+
55+
!!! TODO "Add video of most commonly used features"
5056

51-
> #### TODO::Add video of most commonly used features
5257

5358
## Known issues
5459

@@ -59,6 +64,6 @@ The most commonly used key bindings for multiple cursors
5964

6065
## Reference
6166

62-
* [multiple cursors layer - Spacemacs develop documentation](http://develop.spacemacs.org/layers/+misc/multiple-cursors/README.html)
63-
* [evil-mc](https://github.com/gabesoft/evil-mc) - default backend for multiple cursors layer
64-
* [evil-multiedit](https://github.com/hlissner/evil-multiedit) - used in Doom Emacs
67+
- [:globe_with_meridians: multiple cursors layer - Spacemacs develop documentation](http://spacemacs.org/layers/+misc/multiple-cursors/README.html)
68+
- [:fontawesome-brands-github: evil-mc](https://github.com/gabesoft/evil-mc) - default backend for multiple cursors layer
69+
- [:fontawesome-brands-github: evil-multiedit](https://github.com/hlissner/evil-multiedit) - used in Doom Emacs

docs/spacemacs-basics/evil-tools/narrowing.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22

33
Narrowing displays just a part of the current buffer you are working with, allowing you to carry out some very specific editing.
44

5-
[![Spacemacs](/images/spacemacs-narrow-numbers-menu.png)](/images/spacemacs-narrow-numbers-menu.png)
5+
![Spacemacs](https://github.com/practicalli/graphic-design/blob/live/editors/spacemacs/screenshots/spacemacs-narrow-numbers-menu.png?raw=true)
66

77

88
Typical uses are to select a region or a function definition to narrow on.
99

10-
For example, you may have two Clojure functions that use the same local name in a `let` statement. The local name is used a number of times and you want to rename it. By narrowing on to just that function, you can change the local names all at once without affecting the other function definition.
10+
For example, you may have two Clojure functions that use the same local name in a `let` statement. The local name is used a number of times and you want to rename it.
11+
12+
By narrowing on to just that function, you can change the local names all at once without affecting the other function definition.
1113

1214

1315
## Example: Narrowing and multiple replace
1416

1517
In this example I narrow my 100-days-of-code log to just edit a single day of the log and use iedit to manage a multiple replace on just the text for that day.
1618

17-
{% youtube %}
18-
https://www.youtube.com/watch?v=4bVMXXxPiQs
19-
{% endyoutube %}
19+
20+
<p style="text-align:center">
21+
<iframe width="560" height="315" src="https://www.youtube.com/embed/4bVMXXxPiQs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
22+
</p>

docs/spacemacs-basics/evil-tools/replacing-text-across-projects.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Replacing text across projects
22

33
If you have `ripgrep`, `ag` (silver searcher), `pt` or `ack` installed, replacing an occurrence of text in
4-
several files can be performed via [helm-ag](https://github.com/syohex/emacs-helm-ag).
4+
several files can be performed via [:fontawesome-brands-github: helm-ag](https://github.com/syohex/emacs-helm-ag).
5+
56

67
## Example
78

@@ -18,9 +19,7 @@ To replace all `foo` occurrences by `bar` in your current project:
1819
`C-c C-c` to commit the changes you have just made, which will automatically update all the files in your project with these changes. `C-c C-k` if you want to cancel your changes instead.
1920

2021

21-
> #### TODO::Add animated gif / video example
22+
!!! TODO "Add animated gif / video example"
2223

23-
---
2424

25-
> #### Hint::
26-
> `helm-ag` despite its name works with all the search tools, except for `grep`
25+
!!! INFO "`helm-ag` works with all search tools, except grep"

docs/spacemacs-basics/evil-z-menu.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Evil Z menu
2+
23
`z` in normal mode opens a menu of convenient utilities
34

4-
[![Spacemacs Vim Normal - zoom menu](/images/spacemacs-vim-normal-zoom-menu.png)](/images/spacemacs-vim-normal-zoom-menu.png)
5+
![Spacemacs Vim Normal - zoom menu](https://github.com/practicalli/graphic-design/blob/live/editors/spacemacs/screenshots/spacemacs-vim-normal-z-menu.png?raw=true)
56

67

78
## Folding code, comments and other content
9+
810
Code folding is very useful for hiding different levels of detail, for example you could hide everything but the function names in a namespace, showing just the API for that namespace.
911

1012
Comments and documentation can be folded to help you focus on a specific part of the content.
@@ -17,10 +19,11 @@ Comments and documentation can be folded to help you focus on a specific part of
1719
| `z O` | open fold recursive (capital o) |
1820
| `z r` | open folds |
1921

20-
See [narrowing](/spacemacs-basics/evil-tools/narrowing.md) for a focused approach to editing.
22+
See [:fontawesome-solid-book-open: narrowing](/spacemacs/spacemacs-basics/evil-tools/narrowing.md) for a focused approach to editing.
2123

2224

2325
## Scrolling
26+
2427
Jump the current line to the center, top or bottom of the buffer. Evil equivalents of the Emacs `C-l` key bindings.
2528

2629
| Keybinding | Description |
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Evil editing states
22

3-
![Spacemacs States](/images/spacemacs-states-vim.png)
3+
![Spacemacs - Evil states](https://github.com/practicalli/graphic-design/blob/live/editors/spacemacs/concepts/spacemacs-states-evil.png?raw=true)
44

55
Each states allows keys to have different behaviour, helping minimise the cognitive load and quickly building muscle memory for very powerful actions.
66

@@ -14,22 +14,24 @@ Each states allows keys to have different behaviour, helping minimise the cognit
1414

1515
First get familiar with **normal**, **insert** and **visual** states. Then when you are comfortable, move on to **iedit** and **lisp** states.
1616

17-
> #### Hint::Normal state by default
18-
> Evil normal state should be used most of the time, unless you are writing code or creating lots of text.
17+
!!! TIP "Normal state by default"
18+
Evil normal state should be used most of the time, unless you are writing code or creating lots of text.
1919

2020

2121
## Important key bindings
2222

23-
`,` menu contains the major mode (e.g. Clojure) specific commands, organised mnemonically
23+
++"v"++ opens the visual state and allows you to selects text
2424

25-
`v` opens the visual state and allows you to selects text
25+
++"i"++, ++"I"++, ++"a"++, ++"A"++, ++"o"++ , ++"O"++ all open insert state and allows you to type new text
2626

27-
`i`, `a`, `o`, `O` opens insert state and allows you to create type text
27+
++esc++ or ++"f"++ ++"d"++ returns to Normal mode for text manipulation and leader / local leader commands
2828

29-
`SPC s e` opens iedit and selects all matching instances of the highlighted text for editing
29+
++coma++ menu contains the major mode (e.g. Clojure) specific commands, organised mnemonically
3030

31-
`SPC k` opens Lisp state, allowing you to do [structural editing](structural-editing/)
31+
++spc++ ++"s"++ ++"e"++ opens iedit and selects all matching instances of the highlighted text for editing
3232

33+
++spc++ ++"k"++ opens Lisp state, allowing you to do [:fontawesome-solid-book-open: structural editing](/spacemacs/structural-editing/)
3334

34-
> #### Hint::Refactor code tools
35-
> The [Refactor section](/refactor/) has further editing techniques and Clojure specific refactoring tools.
35+
36+
!!! TIP "Refactor code tools"
37+
The [:fontawesome-solid-book-open: Refactor section](/spacemacs/refactor/) has further editing techniques and Clojure specific refactoring tools.

0 commit comments

Comments
 (0)