Files
tldr/pages.zh/common/v.md

36 lines
643 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# v
> 一个用于管理 V 源代码的工具。
> 更多信息:<https://docs.vlang.io/getting-started.html>。
- 编译一个文件并输出其可执行文件:
`v {{path/to/file.v}}`
- 编译当前项目或目录:
`v .`
- 编译一个文件并运行它:
`v run {{path/to/file.v}}`
- 编译一个文件并运行它,输出其可执行文件:
`v crun {{path/to/file.v}}`
- 在每次修改文件时重新编译:
`v watch {{path/to/file.v}}`
- 在每次修改文件时重新运行:
`v watch run {{path/to/file.v}}`
- 打开 v repl
`v repl`
- 格式化一个文件并[w]写入它:
`v fmt -w {{path/to/file.v}}`