Back to Spacevim

SpaceVim lang#sh layer

docs/layers/lang/sh.md

2.4.01.5 KB
Original Source

Available Layers >> lang#sh

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

Description

This layer is for shell script development. Shell script includes bash, zsh and fish scripts.

Features

  • Code completion
  • Syntax highlighting and indent
  • Syntax checking
  • Code formatting
  • Jump to declaration

SpaceVim also provides language server protocol support for bash script. To enable language server protocol for bash script, you need to load lsp layer for bash.

Install

Layer

To use this configuration layer, update your custom configuration file with:

toml
[[layers]]
  name = "lang#sh"

Layer options

  • bash_file_head: Default file head when create new sh file.

    By default, when create a new sh file, SpaceVim will insert file head automatically. to change the file head, use bash_file_head option:

    toml
    [[layers]]
      name = "lang#sh"
      bash_file_head = [
          '#!/usr/bin/env bash',
          '',
          ''
      ]
    

Key bindings

Language specific key bindings

Key BindingsDescriptions
SPC l d / KShow doc of the symbol under the cursor
g dJump to definition