Skip to content

Conversation

liushapku
Copy link

These commits introduce a new setup method which can handle more than one github accounts hosted by different github api url. The new method will have no effect for existing users unless they explicitly set some global variables (listed below, see :help gist-vim-setup-profile for details)

let g:gist_profiles = {
    \ 'github'     : ['', 'username'],
    \ 'enterprise' : ['https://mycompany.com/api/v3', 'employeeid']
}

let g:gist_token_dir = '~/.config/gist-vim/'   (default value)

let g:gist_default_profile = 'enterprise'      (no default value)

Two equivalent commands are introduced to switch between profiles. The second one has completefunc defined

  :Gist --profile [profilename]
  :GistProfile [profilename]

Any comment is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant