Vim plugin for upgit
- Upload File by
Upgit
command - Edit Configuration File by
UpgitConfig
command
If you don't have a preferred installation method, I recommend install vim-plug, and then add following codes.
Plug 'jiz4oh/vim-upgit', { 'do': './install' }
configure upgit properly first, call UpgitConfig
to open the Configuration file
-
upload a file
~/images/test.png
:Upgit ~/images/test.png
-
upload image from clipboard, e.g. snipping image by snipaste
:UpgitClipboard " equivalent to :Upgit :clipboard
-
upload current file
:Upgit
-
upload current file with other provider
:Upgit % --provider OTHERS
the result is stored in +
register after each upload, and you can also call upgit#results()
to get them, the upgit#last()
is the helper to access last uploaded result
The available options with their default values are:
let g:upgit_bin_path = 'CURRENT_PLUGIN_DIRECTORY/upgit' " upgit binary file
let g:upgit_opts = '' " extra options for upgit, you can set b:upgit_opts for each buffer
let g:upgit_no_default = 0 " if you want more control, set it to 1
you can set the command to upload current buffer and save the result to u
register
command! UpgitCurrent :let @u=upgit#upload('%')