2020-02-17 21:29:30 +08:00
|
|
|
---
|
|
|
|
title: "SpaceVim lang#zig layer"
|
2021-06-21 20:39:29 +08:00
|
|
|
description: "This layer is for zig development, provides code runner support for zig files."
|
2020-02-17 21:29:30 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
# [Available Layers](../../) >> lang#zig
|
|
|
|
|
|
|
|
<!-- vim-markdown-toc GFM -->
|
|
|
|
|
|
|
|
- [Description](#description)
|
|
|
|
- [Install](#install)
|
2020-02-18 12:29:10 +08:00
|
|
|
- [Options](#options)
|
2020-02-17 21:29:30 +08:00
|
|
|
- [Key bindings](#key-bindings)
|
2021-06-21 20:39:29 +08:00
|
|
|
- [Run current file](#run-current-file)
|
|
|
|
- [Test current file](#test-current-file)
|
2020-02-17 21:29:30 +08:00
|
|
|
|
|
|
|
<!-- vim-markdown-toc -->
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
|
|
This layer is for [zig](https://ziglang.org/) development.
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
2021-06-21 20:39:29 +08:00
|
|
|
To use this configuration layer, update your custom configuration file with:
|
2020-02-17 21:29:30 +08:00
|
|
|
|
|
|
|
```toml
|
|
|
|
[[layers]]
|
|
|
|
name = "lang#zig"
|
|
|
|
```
|
|
|
|
|
2020-02-18 12:29:10 +08:00
|
|
|
## Options
|
|
|
|
|
2021-06-21 20:39:29 +08:00
|
|
|
- `ztagsbin`: The path of ztags.
|
2020-02-18 12:29:10 +08:00
|
|
|
|
2020-02-17 21:29:30 +08:00
|
|
|
## Key bindings
|
|
|
|
|
2020-11-20 23:16:41 +08:00
|
|
|
### Run current file
|
|
|
|
|
|
|
|
| Mode | Key Bindings | Description |
|
|
|
|
| ------ | ------------ | ------------------------------ |
|
|
|
|
| normal | `SPC l r` | build and run the current file |
|
|
|
|
|
|
|
|
### Test current file
|
|
|
|
|
|
|
|
| Mode | Key Bindings | Description |
|
|
|
|
| ------ | ------------ | ------------------------------ |
|
|
|
|
| normal | `SPC l t` | run all tests in current file |
|
|
|
|
|
2020-02-17 21:29:30 +08:00
|
|
|
|