Skip to content

Commit dd27480

Browse files
committed
docs: add a Tip&Tricks page
1 parent 1e601e3 commit dd27480

File tree

5 files changed

+129
-3
lines changed

5 files changed

+129
-3
lines changed

docs/02_get_started/faq.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/04_tip_and_tricks/index.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Tips and Tricks
2+
3+
Here are some tips and tricks that you might find useful when working with RobotCode.
4+
5+
## Customization
6+
7+
### Editor Style
8+
9+
You can change some stylings for RobotFramework files in VSCode editor, independently of the current theme. (see [Customizing a Color Theme](https://code.visualstudio.com/docs/getstarted/themes#_customizing-a-color-theme))
10+
11+
See the difference:
12+
13+
| Before | After |
14+
| ----------------------------------------------------------------- | ----------------------------------------------------------- |
15+
| ![Without customization](./images/without_customization.gif) | ![With customization](./images/with_customization.gif) |
16+
17+
18+
As a template you can put the following code to your user settings of VSCode.
19+
20+
Open the user `settings.json` like this:
21+
22+
<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> or <kbd>CMD</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>
23+
24+
and then type:
25+
26+
`Preferences: Open Settings (JSON)`
27+
28+
put this to the `settings.json`
29+
30+
```jsonc
31+
"editor.tokenColorCustomizations": {
32+
"textMateRules": [
33+
{
34+
"scope": "variable.function.keyword-call.inner.robotframework",
35+
"settings": {
36+
"fontStyle": "italic"
37+
}
38+
},
39+
{
40+
"scope": "variable.function.keyword-call.robotframework",
41+
"settings": {
42+
//"fontStyle": "bold"
43+
}
44+
},
45+
{
46+
"scope": "string.unquoted.embeddedArgument.robotframework",
47+
"settings": {
48+
"fontStyle": "italic"
49+
}
50+
},
51+
{
52+
"scope": "entity.name.function.testcase.name.robotframework",
53+
"settings": {
54+
"fontStyle": "bold underline"
55+
}
56+
},
57+
{
58+
"scope": "entity.name.function.keyword.name.robotframework",
59+
"settings": {
60+
"fontStyle": "bold italic"
61+
}
62+
},
63+
{
64+
"scope": "variable.name.readwrite.robotframework",
65+
"settings": {
66+
//"fontStyle": "italic",
67+
}
68+
},
69+
{
70+
"scope": "keyword.control.import.robotframework",
71+
"settings": {
72+
"fontStyle": "italic"
73+
}
74+
},
75+
{
76+
"scope": "keyword.other.header.setting.robotframework",
77+
"settings": {
78+
"fontStyle": "bold underline"
79+
}
80+
},
81+
{
82+
"scope": "keyword.other.header.variable.robotframework",
83+
"settings": {
84+
"fontStyle": "bold underline"
85+
}
86+
},
87+
{
88+
"scope": "keyword.other.header.testcase.robotframework",
89+
"settings": {
90+
"fontStyle": "bold underline"
91+
}
92+
},
93+
{
94+
"scope": "keyword.other.header.keyword.robotframework",
95+
"settings": {
96+
"fontStyle": "bold underline"
97+
}
98+
},
99+
{
100+
"scope": "keyword.other.header.setting.robotframework",
101+
"settings": {
102+
"fontStyle": "bold underline"
103+
}
104+
},
105+
{
106+
"scope": "keyword.other.header.comment.robotframework",
107+
"settings": {
108+
"fontStyle": "bold italic underline"
109+
}
110+
},
111+
{
112+
"scope": "string.unquoted.escape.robotframework",
113+
"settings": {
114+
//"foreground": "#FF0000",
115+
}
116+
}
117+
]
118+
},
119+
120+
"editor.semanticTokenColorCustomizations": {
121+
"rules": {
122+
"*.documentation:robotframework": {
123+
"fontStyle": "italic",
124+
//"foreground": "#aaaaaa"
125+
}
126+
}
127+
}
128+
129+
```

0 commit comments

Comments
 (0)