Original link: https://spacevim.org/cn/layers/lang/dart/
- Module Introduction
- Functional characteristics
- dependent on installation and enabling modules
- Enable module
- Syntax checking and code formatting
- Installing DART-REPL
- Shortcut keys
- Interactive programming
- Run the current script
- Code formatting
- Related
Module Introduction
This module provides DART development support for Spacevim, including code completion, syntax checking, and code formatting.
Functional characteristics
- Code completion
- Grammar check
- Code formatting
- Interactive programming
- Asynchronous execution
Dependent installation and Enable module enable module
You can enable the module by adding the following configuration to the configuration file:
[[layers]] name = "lang#dart"
Syntax checking and code formatting
In order to enable DART syntax checking and code formatting in Spacevim, the Dart SDK needs to be installed.
Installing DART-REPL
Need to be installed through pub dart_repl
, pub is the package manager built into the DART SDK:
pub global activate dart_repl
Shortcut Keys Interactive Programming
Start dart.repl
The interactive process, the shortcut key is: SPC l s i
.
Transfer code to the REPL process execution:
shortcut Keys |
Description |
SPC l s b |
Send entire file contents to REPL |
SPC l s l |
Send current line contents to REPL |
SPC l s s |
Send the selected content to REPL |
Run the current script
When editing the Dart file, you can quickly run the current file asynchronously by using the shortcut key SPC l r
, and the results will be displayed in a separate execution window.
Code formatting
shortcut Keys |
Description |
SPC b f |
Formatting the current file |
Related
Code formatting:
Code completion:
Asynchronous execution:
Spacevim Language Module Dart