Skip to content

n04ln/gilbert.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gilbert.nvim☄

Description

gilbert.nvim is neovim plugin that easy file load, upload, update(patch) to gist using NoahOrberg/gilbert.

Requirements

  • only use MacOS
    • because this plugin is using open & pbcopy command.
    • Linux, and Windows does not execute Command.
  • go
    • version 1.8 or 1.9
  • glide
    • But it is NOT using by Installation - using only dein.vim because $XDG_CONFIG_HOME is NOT included $GOPATH. And dependent packages are installed by util/dep.sh and it placed in $GOPATH. (cannot be vendoring)
  • make

Installation

  1. Please set ENVIRONMENT VARIABLE because using gilbert.
$ export GILBERT_GISTTOKEN=********
$ export GILBERT_GISTURL=https://api.github.com/gists

Quickstart [using only dein.vim]

  1. Please write your init.vim.
call dein#add('NoahOrberg/gilbert.nvim', {'build' : 'make'})
  1. Restart nvim.

Perhaps, some problems may happen ;(
Therefore, will recommended another install-method.

using console and dein.vim(RECOMMENDED)

  1. Please go get this repository.
$ go get github.com/NoahOrberg/gilbert.nvim
  1. Please build it.
$ make build
  1. Please write your init.vim
call dein#add('NoahOrberg/gilbert.nvim')
  1. Restart nvim.

VARIABLE

g:gilbert#allow_open_by_browser=1 " allow open browser when `:GiUpload` or `:GiPatch`
g:gilbert#should_copy_url_to_clipboard=1 " allow copy URL to clipboard

How To Use

  • Upload current buffer
    • <FILENAME> is optional. For example when use it if buffer is [No Name].
    • If this command is success, output URL.
:GiUpload <FILENAME>
  • Load new buffer.
    • Load Gist.
    • Open some buffer.
    • Auto save gist-files in ~/.gilbert/<gist_id>/<file_name> when you load gist.
      • However, It's just a workspace(you can use quickrun, syntax highlight and so on).
:GiLoad <GIST-ID or GIST-URL>
  • Update gist
    • Upload all gist-file related from current buffer to gist.
    • Should be load by :GiLoad <GIST-ID> to current buffer or execute :GiUpload command from NoName buffer before execute this command.
    • And after execute this command, related buffer will be closed.
:GiPatch