diff --git a/autoload/SpaceVim/layers/core/statusline.vim b/autoload/SpaceVim/layers/core/statusline.vim index 7a1cd5848..344d1051b 100644 --- a/autoload/SpaceVim/layers/core/statusline.vim +++ b/autoload/SpaceVim/layers/core/statusline.vim @@ -39,7 +39,7 @@ let s:separators = { \ } let s:i_separators = { \ 'arrow' : ["\ue0b1", "\ue0b3"], - \ 'bar' : ["|", "|"], + \ 'bar' : ['|', '|'], \ 'nil' : ['', ''], \ } let s:loaded_modes = [] @@ -331,6 +331,9 @@ function! SpaceVim#layers#core#statusline#get(...) abort if &filetype ==# 'vimfiler' return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep \ . '%#SpaceVim_statusline_b# vimfiler %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' ' + elseif &filetype ==# 'gista-list' + return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep + \ . '%#SpaceVim_statusline_b# Gista %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' ' elseif &filetype ==# 'startify' try call fugitive#detect(getcwd()) diff --git a/autoload/SpaceVim/layers/github.vim b/autoload/SpaceVim/layers/github.vim index 8673506c3..0783b154c 100644 --- a/autoload/SpaceVim/layers/github.vim +++ b/autoload/SpaceVim/layers/github.vim @@ -34,6 +34,7 @@ function! SpaceVim#layers#github#plugins() abort \ 'on_cmd': ['OpenGithubFile', 'OpenGithubIssue', 'OpenGithubPullReq'], \ }], \ ['wsdjeg/GitHub-api.vim', {'merged' : 0}], + \ ['lambdalisue/vim-gista', {'merged' : 0}], \ ] endfunction @@ -43,6 +44,13 @@ function! SpaceVim#layers#github#config() abort \ 'name' : '+VersionControl/git', \ }) let g:_spacevim_mappings_space.g.h = { 'name': '+GitHub' } + let g:_spacevim_mappings_space.g.g = { 'name': '+Gist' } + + " @todo remove the username + call SpaceVim#mapping#space#def('nnoremap', ['g', 'g', 'l'], 'Gista list -u wsdjeg', + \ 'list gist', 1) + call SpaceVim#mapping#space#def('nnoremap', ['g', 'g', 'p'], 'Gista post', + \ 'post selection or current file', 1, 1) "" jaxbot/github-issues.vim {{{ " Disable completion by github-issues.vim. Because github-complete.vim diff --git a/docs/layers/github.md b/docs/layers/github.md index 0a60fc82c..e360d0778 100644 --- a/docs/layers/github.md +++ b/docs/layers/github.md @@ -28,12 +28,13 @@ To use this configuration layer, add following snippet to your custom configurat ## Key bindings -| Key Binding | Description | -| ----------- | ------------------------------------ | -| `SPC g h i` | show issues | -| `SPC g h a` | show activities | -| `SPC g h d` | show dashboard | -| `SPC g h f` | show current file in browser | -| `SPC g h I` | show issues in browser | -| `SPC g h p` | show PRs in browser | - +| Key Binding | Description | +| ----------- | ---------------------------- | +| `SPC g h i` | show issues | +| `SPC g h a` | show activities | +| `SPC g h d` | show dashboard | +| `SPC g h f` | show current file in browser | +| `SPC g h I` | show issues in browser | +| `SPC g h p` | show PRs in browser | +| `SPC g g l` | list all gist | +| `SPC g g p` | post gist | diff --git a/wiki/en/Following-HEAD.md b/wiki/en/Following-HEAD.md index 9cb7a7ad4..9e47b9029 100644 --- a/wiki/en/Following-HEAD.md +++ b/wiki/en/Following-HEAD.md @@ -14,6 +14,7 @@ The next release is v0.9.0. - Add lsp support for typescript ([#1870](https://github.com/SpaceVim/SpaceVim/pull/1870)) - Add option for disabling parentheses autocompletion ([#1920](https://github.com/SpaceVim/SpaceVim/pull/1920)) - Add Docker build of Neovim and SpaceVim ([#1923](https://github.com/SpaceVim/SpaceVim/pull/1923)) +- Add gist manager vim-gista ([#1936](https://github.com/SpaceVim/SpaceVim/pull/1936)) ### Improvement