diff --git a/docs/cn/layers.md b/docs/cn/layers.md index d6aa45add..21b8f65c4 100644 --- a/docs/cn/layers.md +++ b/docs/cn/layers.md @@ -101,7 +101,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管 | [lang#haskell](lang/haskell/) | 这一模块为 SpaceVim 提供了 Haskell 的开发支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#html](lang/html/) | 这一模块为 SpaceVim 提供了 HTML 的开发支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#hy](lang/hy/) | 这一模块为 hy 开发提供支持,包括交互式编程、一键运行等特性。 | -| [lang#ipynb](lang/ipynb/) | 该模块为 SpaceVim 添加了 Jupyter Notebook 支持,包括语法高亮、代码折叠等特点。 | +| [lang#ipynb](lang/ipynb/) | 该模块为SpaceVim添加了 Jupyter Notebook 支持,包括语法高亮、代码折叠等特点。 | | [lang#java](lang/java/) | 这一模块为 Java 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#javascript](lang/javascript/) | 这一模块为 JavaScript 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#julia](lang/julia/) | 这一模块为 Julia 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | @@ -118,6 +118,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管 | [lang#perl](lang/perl/) | 这一模块为 Perl 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#php](lang/php/) | 这一模块为 SpaceVim 提供了 PHP 的开发支持,包括代码补全、语法检查、代码格式化等特性。 | | [lang#plantuml](lang/plantuml/) | 这一模块为 SpaceVim 提供了 PlantUML 的开发支持,包括语法高亮、实时预览等特性。 | +| [lang#powershell](lang/powershell/) | 这一模块为 powershell 开发提供支持,包括交互式编程、一键运行等特性。 | | [lang#prolog](lang/prolog/) | 这一模块为 Prolog 开发提供支持,包括交互式编程、一键运行等特性。 | | [lang#puppet](lang/puppet/) | 这一模块为 SpaceVim 提供了 Puppet 的开发支持,包括语法高亮、语言服务器支持。 | | [lang#purescript](lang/purescript/) | 这一模块为 SpaceVim 提供了 PureScript 的开发支持,包括代码补全、语法检查、代码格式化等特性。 | diff --git a/docs/cn/layers/lang/powershell.md b/docs/cn/layers/lang/powershell.md new file mode 100644 index 000000000..344c9c427 --- /dev/null +++ b/docs/cn/layers/lang/powershell.md @@ -0,0 +1,50 @@ +--- +title: "SpaceVim lang#powershell 模块" +description: "这一模块为 powershell 开发提供支持,包括交互式编程、一键运行等特性。" +lang: cn +--- + +# [可用模块](../../) >> lang#powershell + + + +- [模块简介](#模块简介) +- [启用模块](#启用模块) +- [快捷键](#快捷键) + - [交互式编程](#交互式编程) + - [运行当前脚本](#运行当前脚本) + + + +## 模块简介 + +这一模块为在 SpaceVim 中进行 powershell 开发提供了支持。 + +## 启用模块 + +可通过在配置文件内加入如下配置来启用该模块: + +```toml +[[layers]] + name = "lang#powershell" +``` + +## 快捷键 + +### 交互式编程 + +启动 `powershell` 交互进程,快捷键为: `SPC l s i`。 + +将代码传输给 REPL 进程执行: + +| 快捷键 | 功能描述 | +| ----------- | ----------------------- | +| `SPC l s b` | 发送整个文件内容至 REPL | +| `SPC l s l` | 发送当前行内容至 REPL | +| `SPC l s s` | 发送已选中的内容至 REPL | + +### 运行当前脚本 + +在编辑 powershell 文件时,可通过快捷键 `SPC l r` 快速异步运行当前文件,运行结果会展示在一个独立的执行窗口内。 + + diff --git a/docs/layers.md b/docs/layers.md index c77713062..c14e03c79 100644 --- a/docs/layers.md +++ b/docs/layers.md @@ -126,6 +126,7 @@ Some layers are enabled by default. The following example shows how to disable ` | [lang#perl](lang/perl/) | This layer is for Perl development, provide autocompletion, syntax checking, code format for Perl file. | | [lang#php](lang/php/) | PHP language support, including code completion, syntax lint and code runner | | [lang#plantuml](lang/plantuml/) | This layer is for PlantUML development, syntax highlighting for PlantUML file. | +| [lang#powershell](lang/powershell/) | This layer is for powershell development, provide syntax checking, code runner and repl support for powershell file. | | [lang#processing](lang/processing/) | This layer is for working on Processing sketches. It provides sytnax checking and an app runner | | [lang#prolog](lang/prolog/) | This layer is for Prolog development, provide syntax checking, code runner and repl support for prolog file. | | [lang#puppet](lang/puppet/) | This layer adds Puppet language support to SpaceVim | diff --git a/docs/layers/lang/powershell.md b/docs/layers/lang/powershell.md new file mode 100644 index 000000000..d52175127 --- /dev/null +++ b/docs/layers/lang/powershell.md @@ -0,0 +1,54 @@ +--- +title: "SpaceVim lang#powershell layer" +description: "This layer is for powershell development, provide syntax checking, code runner and repl support for powershell file." +--- + +# [Available Layers](../../) >> lang#powershell + + + +- [Description](#description) +- [Install](#install) +- [Features](#features) +- [Key bindings](#key-bindings) + - [Running current script](#running-current-script) + - [Inferior REPL process](#inferior-repl-process) + + + +## Description + +This layer is for powershell development. + +## Install + +To use this configuration layer, update custom configuration file with: + +```toml +[[layers]] + name = "lang#powershell" +``` +## Features + +- repl support +- code runner + +## Key bindings + +### Running current script + +To running a powershell file, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer. + +### Inferior REPL process + +Start a `powershell` inferior REPL process with `SPC l s i`. + +Send code to inferior process commands: + +| Key Bindings | Descriptions | +| ------------ | ------------------------------------------------ | +| `SPC l s b` | send buffer and keep code buffer focused | +| `SPC l s l` | send line and keep code buffer focused | +| `SPC l s s` | send selection text and keep code buffer focused | + +