Skip to content

Commit 579e728

Browse files
committed
docs: rewrite index of tips&tricks
1 parent 87bd175 commit 579e728

File tree

3 files changed

+134
-119
lines changed

3 files changed

+134
-119
lines changed

docs/04_tip_and_tricks/index.md

Lines changed: 12 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,25 @@
11
# Tips and Tricks
22

3-
Here are some tips and tricks that you might find useful when working with RobotCode.
3+
Welcome to the RobotCode Tips and Tricks section! This part of the documentation is designed to help you optimize your workflow, solve common problems, and discover useful techniques that may not be immediately obvious.
44

5-
## Customization
5+
## Introduction
66

7-
### Editor Style
7+
Whether you're a beginner or an experienced robot programmer, this collection of tips and tricks aims to enhance your productivity and help you get the most out of RobotCode. The suggestions here come from real-world experience and community contributions.
88

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))
9+
## Contents
1010

11-
See the difference:
11+
- [Avoiding a Global Resource File](./avoiding_a_global_resource_file.md)
1212

13-
| Before | After |
14-
| ----------------------------------------------------------------- | ----------------------------------------------------------- |
15-
| ![Without customization](./images/without_customization.gif) | ![With customization](./images/with_customization.gif) |
13+
While global resource files might seem convenient initially, they lead to circular dependencies, keyword ambiguities, performance issues, and maintenance challenges. This guide explains the problems of this approach and offers a modular alternative that improves code organization, maintainability, and performance.
1614

15+
- [Customizing Visual Studio Code for using RobotCode](./vscode_customizations.md)
1716

18-
As a template you can put the following code to your user settings of VSCode.
17+
This guide helps you customize VSCode to improve your experience when working with RobotCode.
1918

20-
Open the user `settings.json` like this:
19+
## Contributing
2120

22-
<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> or <kbd>CMD</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>
21+
Have a useful tip or trick? Consider contributing to this section! Your experience might help other members of the RobotCode community.
2322

24-
and then type:
23+
---
2524

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-
```
25+
*Note: This documentation is continuously evolving. Check back regularly for new tips and tricks.*

docs/04_tip_and_tricks/troubleshooting.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Customizing Visual Studio Code for using RobotCode
2+
3+
This guide helps you customize VSCode to improve your experience when working with RobotCode.
4+
5+
## Editor Style
6+
7+
You can change how Robot Framework files appear in the VSCode editor, independently of your current theme. These customizations can make your code more readable by highlighting different elements.
8+
9+
See the difference:
10+
11+
| Before | After |
12+
| ----------------------------------------------------------------- | ----------------------------------------------------------- |
13+
| ![Without customization](./images/without_customization.gif) | ![With customization](./images/with_customization.gif) |
14+
15+
### How to Apply Customizations
16+
17+
1. Open your VSCode user settings:
18+
- Press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Windows/Linux) or <kbd>CMD</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Mac)
19+
- Type: `Preferences: Open Settings (JSON)`
20+
21+
2. Add the following code to your `settings.json` file:
22+
23+
```jsonc
24+
"editor.tokenColorCustomizations": {
25+
"textMateRules": [
26+
{
27+
"scope": "variable.function.keyword-call.inner.robotframework",
28+
"settings": {
29+
"fontStyle": "italic"
30+
}
31+
},
32+
{
33+
"scope": "variable.function.keyword-call.robotframework",
34+
"settings": {
35+
//"fontStyle": "bold"
36+
}
37+
},
38+
{
39+
"scope": "string.unquoted.embeddedArgument.robotframework",
40+
"settings": {
41+
"fontStyle": "italic"
42+
}
43+
},
44+
{
45+
"scope": "entity.name.function.testcase.name.robotframework",
46+
"settings": {
47+
"fontStyle": "bold underline"
48+
}
49+
},
50+
{
51+
"scope": "entity.name.function.keyword.name.robotframework",
52+
"settings": {
53+
"fontStyle": "bold italic"
54+
}
55+
},
56+
{
57+
"scope": "variable.name.readwrite.robotframework",
58+
"settings": {
59+
//"fontStyle": "italic",
60+
}
61+
},
62+
{
63+
"scope": "keyword.control.import.robotframework",
64+
"settings": {
65+
"fontStyle": "italic"
66+
}
67+
},
68+
{
69+
"scope": "keyword.other.header.setting.robotframework",
70+
"settings": {
71+
"fontStyle": "bold underline"
72+
}
73+
},
74+
{
75+
"scope": "keyword.other.header.variable.robotframework",
76+
"settings": {
77+
"fontStyle": "bold underline"
78+
}
79+
},
80+
{
81+
"scope": "keyword.other.header.testcase.robotframework",
82+
"settings": {
83+
"fontStyle": "bold underline"
84+
}
85+
},
86+
{
87+
"scope": "keyword.other.header.keyword.robotframework",
88+
"settings": {
89+
"fontStyle": "bold underline"
90+
}
91+
},
92+
{
93+
"scope": "keyword.other.header.setting.robotframework",
94+
"settings": {
95+
"fontStyle": "bold underline"
96+
}
97+
},
98+
{
99+
"scope": "keyword.other.header.comment.robotframework",
100+
"settings": {
101+
"fontStyle": "bold italic underline"
102+
}
103+
},
104+
{
105+
"scope": "string.unquoted.escape.robotframework",
106+
"settings": {
107+
//"foreground": "#FF0000",
108+
}
109+
}
110+
]
111+
},
112+
113+
"editor.semanticTokenColorCustomizations": {
114+
"rules": {
115+
"*.documentation:robotframework": {
116+
"fontStyle": "italic",
117+
//"foreground": "#aaaaaa"
118+
}
119+
}
120+
}
121+
122+
```

0 commit comments

Comments
 (0)