1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: add a Disabling the formatting locally section, about // vfmt off and // vfmt on (#17341)

This commit is contained in:
Artem Yurchenko 2023-02-18 13:26:28 +01:00 committed by GitHub
parent 2879c5110c
commit d616fb0a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4940,6 +4940,23 @@ A vfmt run is usually pretty cheap (takes <30ms).
Always run `v fmt -w file.v` before pushing your code.
#### Disabling the formatting locally
To disable formatting for a block of code, wrap it with `// vfmt off` and
`// vfmt on` comments.
```bash
// Not affected by fmt
// vfmt off
... your code here ...
// vfmt on
// Affected by fmt
... your code here ...
```
### v shader
You can use GPU shaders with V graphical apps. You write your shaders in an