You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/spacemacs-basics/evil-g-menu.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,8 @@
1
1
# Evil G menu
2
+
2
3
`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.
3
4
4
-
[](/images/spacemacs-vim-normal-g-menu.png)
5
+

5
6
6
7
7
8
## Comment lines and regions
@@ -11,7 +12,7 @@
11
12
12
13
13
14
## 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
15
16
16
17
`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.
17
18
@@ -29,11 +30,11 @@
29
30
30
31
31
32
## 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.
33
34
34
35
35
36
## Changing text case
36
37
`g u` to change the current character or selection to lowercase, `g U` for uppercase.
37
38
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.
> [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.
Copy file name to clipboardExpand all lines: docs/spacemacs-basics/evil-tools/iedit-in-action.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ Once editing the selections, use `n` to jump to next word/region and `N` to the
26
26
27
27
!!! HINT "iedit and narrowing"
28
28
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.
Copy file name to clipboardExpand all lines: docs/spacemacs-basics/evil-tools/iedit.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@
2
2
3
3
Make multiple matching edits within a buffer
4
4
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).
6
8
7
9
`e` within visual state and symbol highlight transient state also enables iedit.
8
10
@@ -57,10 +59,10 @@ Narrowing, `SPC n`, limits the scope of iedit so only the relevant occurrences a
57
59
|`C-U`| down-case the occurrences |
58
60
59
61
!!! 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`.
Copy file name to clipboardExpand all lines: docs/spacemacs-basics/evil-tools/multiple-cursors.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,11 @@ Multiple cursors is especially useful where lines are not entirely identical, i.
6
6
7
7
Multiple cursors allows you to call all Emacs named functions and have the results output to each cursor you have created.
8
8
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
+
13
14
14
15
## Common usage
15
16
@@ -21,12 +22,14 @@ Multiple cursors allows you to call all Emacs named functions and have the resul
21
22
22
23
`g r I` adds cursors to visual selection lines, `S-v` and arrow keys, or `v 20 j` to select the next 24 lines
23
24
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
+
30
33
31
34
## Keybindings
32
35
@@ -46,9 +49,11 @@ The most commonly used key bindings for multiple cursors
46
49
47
50
`g r` shows the full menu
48
51
49
-

52
+

53
+
54
+
55
+
!!! TODO "Add video of most commonly used features"
50
56
51
-
> #### TODO::Add video of most commonly used features
52
57
53
58
## Known issues
54
59
@@ -59,6 +64,6 @@ The most commonly used key bindings for multiple cursors
Typical uses are to select a region or a function definition to narrow on.
9
9
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.
11
13
12
14
13
15
## Example: Narrowing and multiple replace
14
16
15
17
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.
16
18
17
-
{% youtube %}
18
-
https://www.youtube.com/watch?v=4bVMXXxPiQs
19
-
{% endyoutube %}
19
+
20
+
<pstyle="text-align:center">
21
+
<iframewidth="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>
Copy file name to clipboardExpand all lines: docs/spacemacs-basics/evil-tools/replacing-text-across-projects.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,8 @@
1
1
# Replacing text across projects
2
2
3
3
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
+
5
6
6
7
## Example
7
8
@@ -18,9 +19,7 @@ To replace all `foo` occurrences by `bar` in your current project:
18
19
`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.
19
20
20
21
21
-
> #### TODO::Add animated gif / video example
22
+
!!! TODO "Add animated gif / video example"
22
23
23
-
---
24
24
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"
Copy file name to clipboardExpand all lines: docs/spacemacs-basics/evil-z-menu.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
# Evil Z menu
2
+
2
3
`z` in normal mode opens a menu of convenient utilities
3
4
4
-
[](/images/spacemacs-vim-normal-zoom-menu.png)
5
+

5
6
6
7
7
8
## Folding code, comments and other content
9
+
8
10
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.
9
11
10
12
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
17
19
|`z O`| open fold recursive (capital o) |
18
20
|`z r`| open folds |
19
21
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.
21
23
22
24
23
25
## Scrolling
26
+
24
27
Jump the current line to the center, top or bottom of the buffer. Evil equivalents of the Emacs `C-l` key bindings.
0 commit comments