Back to Spacevim

SpaceVim shell layer

docs/layers/shell.md

2.4.02.3 KB
Original Source

Available Layers >> shell

<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc -->

Description

This layer provide shell support in SpaceVim.

Install

To use this configuration layer, add following snippet to your custom configuration file.

toml
[[layers]]
  name = "shell"

Configuration

Default shell

Vim supports these kinds of shells:

To define the default shell you can set the layer variable default_shell to the following variables:

  • terminal
  • VimShell

The default shell is quickly accessible via a the default shortcut key SPC '.

Default shell position and height

It is possible to choose where the shell should pop up by setting the variable default_position to either top, bottom, left, right, float, center-float or full. Default value is top. It is also possible to set the default height in percents with the variable default_height. Default value is 30.

toml
[[layers]]
  name = "shell"
  default_position = "top"
  default_height = 30

Key bindings

Key BindingDescription
SPC 'Open or switch to the terminal windows
Ctrl-dClose terminal windows in terminal mode
qHide terminal windows in Normal mode
Ctrl-`Hide terminal windows in terminal mode
Ctrl-\-Ctrl-nSwitch to Normal mode from terminal mode
Ctrl-LeftSwitch to the windows on the left
Ctrl-DownSwitch to the windows below
Ctrl-UpSwitch to the windows on the top
Ctrl-RightSwitch to the windows on the right

Additional key bindings on Windows

Key BindingDescription
Ctrl-dSends exit <CR> if at a prompt
Ctrl-uClears the line before the cursor
Ctrl-rPastes from clipboard if given +
Ctrl-wDeletes the word before the cursor