This bundle provides V syntax highlighting for Sublime Text.
You can install the V package with Package Control:
For code completion you can install vlang/vls for Sublime Text 3 or 4.
Commands for building, running, testing, formatting and updating V itself:
Inline errors and warnings:
Quickly goto to any symbol:
Show assertion failures inline:
Any commands that generate output will show in a new window called "V". You may leave this tab open an any future runs will be appended.
Build the current module (directory).
Build the current file.
Format the current file.
Format the current module.
Format the current project.
Execute v run
on the current module (directory).
Execute v run
only on the current file.
Execute v test
only on the current module (directory).
Execute v test
only on the current file.
Update V to the latest version (v up
).
{
"caption": "Build Prod",
"command": "v",
"args": {
"cmd": "-prod ${module}", // required (string)
"output": true, // optional (boolean)
}
},
cmd
is required and in the example above will construct and executev -prod "some/folder/path"
.output
is optional (defaults totrue
). Iffalse
, the output is not shown in the "V" window. This is useful for commands you intend to be silent (such asv fmt
).
See Sublime Variables for full list, but some common ones are:
${file}
for the current file path.${file_path}
for the directory the current file exists in (the module).${folder}
for the project directory.
Note: Make sure you uninstall the package if it's already installed with "Package Control > Remove Package..."
Now clone the package locally:
cd ~/Library/Application\ Support/Sublime\ Text/Packages
git clone https://github.com/elliotchance/vlang-sublime.git