Skip to content

jiz4oh/vim-upgit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-upgit

Vim plugin for upgit

Features

  • Upload File by Upgit command
  • Edit Configuration File by UpgitConfig command

Installation

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' }

Usage

configure upgit properly first, call UpgitConfig to open the Configuration file

  1. upload a file ~/images/test.png

    :Upgit ~/images/test.png
  2. upload image from clipboard, e.g. snipping image by snipaste

    :UpgitClipboard
    " equivalent to
    :Upgit :clipboard
  3. upload current file

    :Upgit
  4. 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

Configuration

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

Advanced Usage

you can set the command to upload current buffer and save the result to u register

command! UpgitCurrent :let @u=upgit#upload('%')

Releases

No releases published

Packages

No packages published