1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00

improves github layer readme (#2636)

* improves github layer readme

- fixes a few grammatical issues
- adds a link to github's personal access token page

* point folks to help doc instead of private page
This commit is contained in:
Josh Greenwood 2019-03-04 09:50:38 -05:00 committed by Wang Shidong
parent 2209ef75c3
commit e05a364225

View File

@ -20,7 +20,7 @@ This layer provides GitHub integration for SpaceVim.
## Install
To use this configuration layer, add following snippet to your custom configuration file.
To use this configuration layer, add the following snippet to your custom configuration file.
```toml
[[layers]]
@ -42,7 +42,7 @@ To use this configuration layer, add following snippet to your custom configurat
## Extra configuration for GitHub and Gist
For avoid repeating input the account name and passwrod, you need to add the belowing contennt for auto .SpaceVim.d/autoload/myspacevim.vim [Bootstrap Functions](https://spacevim.org/documentation/#bootstrap-functions).
To avoid needing to constantly input your username and password, you'll want to create the following [Bootstrap Function](https://spacevim.org/documentation/#bootstrap-functions) in a file such as .SpaceVim.d/autoload/myspacevim.vim.
```vim
func! myspacevim#before() abort
@ -51,7 +51,7 @@ func! myspacevim#before() abort
let g:gista#client#default_username = 'monkeyxite'
endf
```
Refer [github dashboard](https://github.com/junegunn/vim-github-dashboard), for security concerns you could create a Personal Access Token, export it as an environment variable and use it as a password.
We recommend generating a [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) and storing it securely in an environment variable. [Refer to github dashboard](https://github.com/junegunn/vim-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>"