diff options
author | Aleksey Kladov <[email protected]> | 2019-10-26 19:17:39 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-26 19:22:40 +0100 |
commit | cf4720ffd5524f1ddda411e4810da8d97a0c593f (patch) | |
tree | 0c7309c896b50663418f6b45a0df36336d92fc43 /docs/user | |
parent | 106004139375b64817145d8279cd7904a477c637 (diff) |
use unicode bar for drawing the cursor
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/assists.md | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md index 182f07e98..ee1cfa142 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md | |||
@@ -1,5 +1,8 @@ | |||
1 | # Assists | 1 | # Assists |
2 | 2 | ||
3 | Cursor position or selection is signified by `┃` character. | ||
4 | |||
5 | |||
3 | ## `add_derive` | 6 | ## `add_derive` |
4 | 7 | ||
5 | Adds a new `#[derive()]` clause to a struct or enum. | 8 | Adds a new `#[derive()]` clause to a struct or enum. |
@@ -8,7 +11,7 @@ Adds a new `#[derive()]` clause to a struct or enum. | |||
8 | // BEFORE | 11 | // BEFORE |
9 | struct Point { | 12 | struct Point { |
10 | x: u32, | 13 | x: u32, |
11 | y: u32,<|> | 14 | y: u32,┃ |
12 | } | 15 | } |
13 | 16 | ||
14 | // AFTER | 17 | // AFTER |
@@ -26,7 +29,7 @@ Specify type for a let binding. | |||
26 | ```rust | 29 | ```rust |
27 | // BEFORE | 30 | // BEFORE |
28 | fn main() { | 31 | fn main() { |
29 | let x<|> = 92; | 32 | let x┃ = 92; |
30 | } | 33 | } |
31 | 34 | ||
32 | // AFTER | 35 | // AFTER |
@@ -42,7 +45,7 @@ Adds a new inherent impl for a type. | |||
42 | ```rust | 45 | ```rust |
43 | // BEFORE | 46 | // BEFORE |
44 | struct Ctx<T: Clone> { | 47 | struct Ctx<T: Clone> { |
45 | data: T,<|> | 48 | data: T,┃ |
46 | } | 49 | } |
47 | 50 | ||
48 | // AFTER | 51 | // AFTER |
@@ -69,7 +72,7 @@ trait T { | |||
69 | 72 | ||
70 | impl T for () { | 73 | impl T for () { |
71 | Type X = (); | 74 | Type X = (); |
72 | fn foo(&self) {}<|> | 75 | fn foo(&self) {}┃ |
73 | 76 | ||
74 | } | 77 | } |
75 | 78 | ||
@@ -100,7 +103,7 @@ trait T { | |||
100 | fn bar(&self) {} | 103 | fn bar(&self) {} |
101 | } | 104 | } |
102 | 105 | ||
103 | impl T for () {<|> | 106 | impl T for () {┃ |
104 | 107 | ||
105 | } | 108 | } |
106 | 109 | ||
@@ -128,7 +131,7 @@ This means something of the form `!x` or `x != y`. | |||
128 | ```rust | 131 | ```rust |
129 | // BEFORE | 132 | // BEFORE |
130 | fn main() { | 133 | fn main() { |
131 | if x != 4 ||<|> !y {} | 134 | if x != 4 ||┃ !y {} |
132 | } | 135 | } |
133 | 136 | ||
134 | // AFTER | 137 | // AFTER |
@@ -143,7 +146,7 @@ Adds or changes existing visibility specifier. | |||
143 | 146 | ||
144 | ```rust | 147 | ```rust |
145 | // BEFORE | 148 | // BEFORE |
146 | fn<|> frobnicate() {} | 149 | ┃fn frobnicate() {} |
147 | 150 | ||
148 | // AFTER | 151 | // AFTER |
149 | pub(crate) fn frobnicate() {} | 152 | pub(crate) fn frobnicate() {} |
@@ -156,7 +159,7 @@ Replace a large conditional with a guarded return. | |||
156 | ```rust | 159 | ```rust |
157 | // BEFORE | 160 | // BEFORE |
158 | fn main() { | 161 | fn main() { |
159 | <|>if cond { | 162 | ┃if cond { |
160 | foo(); | 163 | foo(); |
161 | bar(); | 164 | bar(); |
162 | } | 165 | } |
@@ -182,7 +185,7 @@ enum Action { Move { distance: u32 }, Stop } | |||
182 | 185 | ||
183 | fn handle(action: Action) { | 186 | fn handle(action: Action) { |
184 | match action { | 187 | match action { |
185 | <|> | 188 | ┃ |
186 | } | 189 | } |
187 | } | 190 | } |
188 | 191 | ||
@@ -204,7 +207,7 @@ Flips operands of a binary expression. | |||
204 | ```rust | 207 | ```rust |
205 | // BEFORE | 208 | // BEFORE |
206 | fn main() { | 209 | fn main() { |
207 | let _ = 90 +<|> 2; | 210 | let _ = 90 +┃ 2; |
208 | } | 211 | } |
209 | 212 | ||
210 | // AFTER | 213 | // AFTER |
@@ -220,7 +223,7 @@ Flips two comma-separated items. | |||
220 | ```rust | 223 | ```rust |
221 | // BEFORE | 224 | // BEFORE |
222 | fn main() { | 225 | fn main() { |
223 | ((1, 2),<|> (3, 4)); | 226 | ((1, 2),┃ (3, 4)); |
224 | } | 227 | } |
225 | 228 | ||
226 | // AFTER | 229 | // AFTER |
@@ -236,7 +239,7 @@ Inlines local variable. | |||
236 | ```rust | 239 | ```rust |
237 | // BEFORE | 240 | // BEFORE |
238 | fn main() { | 241 | fn main() { |
239 | let x<|> = 1 + 2; | 242 | let x┃ = 1 + 2; |
240 | x * 4; | 243 | x * 4; |
241 | } | 244 | } |
242 | 245 | ||
@@ -253,7 +256,7 @@ Extracts subexpression into a variable. | |||
253 | ```rust | 256 | ```rust |
254 | // BEFORE | 257 | // BEFORE |
255 | fn main() { | 258 | fn main() { |
256 | <|>(1 + 2)<|> * 4; | 259 | ┃(1 + 2)┃ * 4; |
257 | } | 260 | } |
258 | 261 | ||
259 | // AFTER | 262 | // AFTER |