Back to Spacevim

SpaceVim git layer

docs/layers/git.md

2.4.01.9 KB
Original Source

Available Layers >> git

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

Description

This layer adds extensive support for git.

Install

To use this configuration layer, add the following snippet to your custom configuration file (SPC f v d).

toml
[[layers]]
  name = "git"

Layer options

  • git_plugin: default value is git, available values include: gina, fugitive, gita (obsolete), git.

if you want to use fugitive instead:

toml
[[layers]]
  name = "git"
  git_plugin = 'fugitive'

Key bindings

Key BindingDescription
SPC g sview git status
SPC g Sstage current file
SPC g Uunstage current file
SPC g cedit git commit
SPC g pgit push
SPC g mgit branch manager
SPC g rgit remote manager
SPC g dview git diff
SPC g Astage all files
SPC g bopen git blame windows
SPC g h astage current hunk
SPC g h rundo cursor hunk
SPC g h vpreview cursor hunk

Key bindings in Git branch manager:

Key BindingDescription
vview log of branch
Entercheckout branch
dddelete branch

Omnifunc of commit message

This layer also provides omnifunc of commit message. The key binding is ctrl-x_ctrl-o in insert mode.

  1. complete commit title prefix, fix:, doc: etc.
  2. complete github issue list
  3. complete co-author info