/picgo.nvim

Primary LanguageVim ScriptGNU General Public License v3.0GPL-3.0

picgo.nvim

Introduction

This plugin can upload image fro clipboard or from file system (still developing). Although there are similar plugins like nvim-picgo or coc-picgo, there are either not campatible with latest picgo or already lost maintainance.

For now, this plugin only support linux, both wayland and x11.

Dependencies

Installation

use dein:

call dein#add('Corona09/picgo.nvim')

Usage

Upload Image from Clipboard

UploadImageFromClipboard
" or
nnoremap YOUR_KEY :UploadImageFromClipboard <CR>

After image was uploaded, you can also press p to insert its url.

Configuration

g:picgo#image_code_template
" picgo#image_cdoe_template is an array of string
" the plugin will replace ${url} with image url returned by picgo
" the default value is as [ '![]( ${url} )' ]
let g:picgo#image_code_template = [ '![]( ${url} )' ]
g:picgo#insert_image_code
" if you do not want to insert code after uploading
" you can set g:picgo#insert_image_code to 0
" default value : 0
let g:picgo#insert_image_code = 1
g:pigco#show_warning ```vim " set to 0 to disable warning for picgo/xclip/wl-clipboard " default value: 1 let g:picgo#show_warning = 0 ```

Known issues

  • Cannot upload from clipboard while copy image from nautilus

TODO

  • Upload from file system.
  • Optimize action of inserting image code.
  • Add doc.
  • Multiple config.