-
Notifications
You must be signed in to change notification settings - Fork 0
/
ascii-art-to-unicode-readme.txt
73 lines (62 loc) · 2.45 KB
/
ascii-art-to-unicode-readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
The command ‘aa2u’ converts simple ASCII art line drawings in
the {active,accessible} region of the current buffer to Unicode.
Command ‘aa2u-rectangle’ is like ‘aa2u’, but works on rectangles.
Example use case:
- M-x artist-mode RET
- C-c C-a r ; artist-select-op-rectangle
- (draw two rectangles)
+---------------+
| |
| +-------+--+
| | | |
| | | |
| | | |
+-------+-------+ |
| |
| |
| |
+----------+
- C-c C-c ; artist-mode-off (optional)
- C-x n n ; narrow-to-region
- M-x aa2u RET
┌───────────────┐
│ │
│ ┌───────┼──┐
│ │ │ │
│ │ │ │
│ │ │ │
└───────┼───────┘ │
│ │
│ │
│ │
└──────────┘
Much easier on the eyes now!
Normally, lines are drawn with the ‘LIGHT’ weight. If you set var
‘aa2u-uniform-weight’ to symbol ‘HEAVY’, you will see, instead:
┏━━━━━━━━━━━━━━━┓
┃ ┃
┃ ┏━━━━━━━╋━━┓
┃ ┃ ┃ ┃
┃ ┃ ┃ ┃
┃ ┃ ┃ ┃
┗━━━━━━━╋━━━━━━━┛ ┃
┃ ┃
┃ ┃
┃ ┃
┗━━━━━━━━━━┛
To protect particular ‘|’, ‘-’ or ‘+’ characters from conversion,
you can set the property ‘aa2u-text’ on that text with command
‘aa2u-mark-as-text’. A prefix arg clears the property, instead.
(You can use ‘describe-text-properties’ to check.) For example:
┌───────────────────┐
│ │
│ |\/| │
│ ‘Oo’ --Oop Ack! │
│ ^&-MM. │
│ │
└─────────┬─────────┘
│
"""""""""
Command ‘aa2u-mark-rectangle-as-text’ is similar, for rectangles.
Tip: For best results, you should make sure all the tab characaters
are converted to spaces. See: ‘untabify’, ‘indent-tabs-mode’.