Skip to content

Commit 1bba163

Browse files
committed
add section about customization to README
1 parent 91e242f commit 1bba163

File tree

3 files changed

+114
-5
lines changed

3 files changed

+114
-5
lines changed

README.md

Lines changed: 114 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TODO
5656

5757
## Quick start
5858

59-
1. [Install a supported version of Python on your system](https://code.visualstudio.com/docs/python/python-tutorial#_prerequisites)
59+
1. [Install a supported version of Python on your system](https://code.visualstudio.com/docs/python/python-tutorial#_prerequisites)
6060
(note: only Python 3.8 and above are supported)
6161

6262
2. [Install a supported version of RobotFramwork on your system](https://github.com/robotframework/robotframework/blob/master/INSTALL.rst) (note: only RobotFramework 4.0 and above are supported)
@@ -76,7 +76,7 @@ This is the simpliest way to create an running environment.
7676
- As a prerequisite you need to install [pipenv](https://pipenv.pypa.io/) like this:
7777

7878
```bash
79-
python -m pip install pipenv
79+
python -m pip install pipenv
8080
```
8181

8282

@@ -90,6 +90,115 @@ This is the simpliest way to create an running environment.
9090
python -m pipenv install robotframework
9191
```
9292
- Open project in VSCode
93-
- Set the python interpreter to the created virtual environment
94-
95-
93+
- Set the python interpreter to the created virtual environment
94+
95+
96+
## Customization
97+
98+
### Editor Style
99+
100+
You can change some stylings for RobotFramework files in VSCode editor (see [Customizing a Color Theme](https://code.visualstudio.com/docs/getstarted/themes#_customizing-a-color-theme))
101+
102+
See the difference:
103+
104+
| before | after |
105+
| ---------------------------------------------------------------------------- | ----------------------------------------------------------------- |
106+
| ![Without customization](./doc/images/without-token-color-customization.png) | ![With customization](./doc/images/token-color-customization.png) |
107+
108+
109+
As a template you can put the following code to your user settings of VSCode.
110+
111+
Open the user `settings.json` like this:
112+
113+
<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> or <kbd>CMD</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>
114+
115+
and then type:
116+
117+
`Preferences: Open Settings (JSON)`
118+
119+
put this to the `settings.json`
120+
121+
```json
122+
"editor.tokenColorCustomizations": {
123+
"textMateRules": [
124+
{
125+
"scope": "variable.function.keyword-call.inner.robotframework",
126+
"settings": {
127+
"fontStyle": "italic"
128+
}
129+
},
130+
{
131+
"scope": "variable.function.keyword-call.robotframework",
132+
"settings": {
133+
//"fontStyle": "bold"
134+
}
135+
},
136+
{
137+
"scope": "entity.name.function.testcase.name.robotframework",
138+
"settings": {
139+
"fontStyle": "bold underline"
140+
}
141+
},
142+
{
143+
"scope": "entity.name.function.keyword.name.robotframework",
144+
"settings": {
145+
"fontStyle": "bold italic"
146+
}
147+
},
148+
{
149+
"scope": "variable.other.readwrite.robotframework",
150+
"settings": {
151+
//"fontStyle": "italic",
152+
}
153+
},
154+
{
155+
"scope": "keyword.control.import.robotframework",
156+
"settings": {
157+
"fontStyle": "italic"
158+
}
159+
},
160+
{
161+
"scope": "keyword.other.header.setting.robotframework",
162+
"settings": {
163+
"fontStyle": "bold underline"
164+
}
165+
},
166+
{
167+
"scope": "keyword.other.header.variable.robotframework",
168+
"settings": {
169+
"fontStyle": "bold underline"
170+
}
171+
},
172+
{
173+
"scope": "keyword.other.header.testcase.robotframework",
174+
"settings": {
175+
"fontStyle": "bold underline"
176+
}
177+
},
178+
{
179+
"scope": "keyword.other.header.keyword.robotframework",
180+
"settings": {
181+
"fontStyle": "bold underline"
182+
}
183+
},
184+
{
185+
"scope": "keyword.other.header.setting.robotframework",
186+
"settings": {
187+
"fontStyle": "bold underline"
188+
}
189+
},
190+
{
191+
"scope": "keyword.other.header.comment.robotframework",
192+
"settings": {
193+
"fontStyle": "bold italic underline"
194+
}
195+
},
196+
{
197+
"scope": "constant.character.escape.robotframework",
198+
"settings": {
199+
//"foreground": "#FF0000",
200+
}
201+
}
202+
]
203+
}
204+
```
76.4 KB
Loading
69.8 KB
Loading

0 commit comments

Comments
 (0)