Back to Spacevim

SpaceVim github layer

docs/layers/github.md

2.4.01.8 KB
Original Source

Available Layers >> github

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

Description

This layer provides GitHub integration for SpaceVim.

Install

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

toml
[[layers]]
  name = "github"

Key bindings

Key BindingDescription
SPC g h ishow issues
SPC g h ashow activities
SPC g h dshow dashboard
SPC g h fshow current file in browser
SPC g h Ishow issues in browser
SPC g h pshow PRs in browser
SPC g g llist all gists
SPC g g ppost a gist

Extra configuration for GitHub and Gist

To avoid needing to constantly input your username and password, you'll want to create the following Bootstrap Function in a file such as .SpaceVim.d/autoload/myspacevim.vim.

vim
func! myspacevim#before() abort
  "other configs
  let g:github_dashboard = { 'username': 'yourgithubuser', 'password': $GITHUB_TOKEN }
  let g:gista#client#default_username = 'monkeyxite'
endf

We recommend generating a personal access token and storing it securely in an environment variable. Refer to github dashboard for more information.

shell
# in some secure file sourced in your .bashrc, .bash_profile, .zshrc, etc.
export GITHUB_TOKEN="<your 40 char token>"