• Stars
    star
    144
  • Rank 255,590 (Top 6 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 1 year ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Neovim plugin that allows you to create a Github Gist from the current file

gist.nvim

Showcase

gist.nvim is a Neovim plugin that allows you to create a GitHub Gist from the current file. The plugin uses the gh command-line tool to create the Gist and provides a simple interface for specifying the Gist's description and privacy settings.

Installation

To use gist.nvim, you need to have Neovim installed on your system. You also need to have the gh command-line tool installed and configured with your GitHub account.

If you intend to use the GistsList command to list and edit all your gists, I suggest the nvim-unception plugin.

Once you have Neovim and gh installed, you can install gist.nvim using your favorite plugin manager.

Using lazy.nvim:

return {
  {
    "Rawnly/gist.nvim",
    cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
    config = true
  },
  -- `GistsList` opens the selected gif in a terminal buffer,
  -- nvim-unception uses neovim remote rpc functionality to open the gist in an actual buffer
  -- and prevents neovim buffer inception
  {
    "samjwill/nvim-unception",
    lazy = false,
    init = function() vim.g.unception_block_while_host_edits = true end
  }
}

Using packer.nvim:

use {
  "rawnly/gist.nvim",
  config = function() require("gist").setup() end,
  -- `GistsList` opens the selected gif in a terminal buffer,
  -- this plugin uses neovim remote rpc functionality to open the gist in an actual buffer and not have buffer inception
  requires = { "samjwill/nvim-unception", setup = function() vim.g.unception_block_while_host_edits = true end }
}

Usage

To create a Gist from the current file, use the :GistCreate command in Neovim. The plugin will prompt you for a description and whether the Gist should be private or public.

  :GistCreate [description] [public=true]
  • :GistCreate will create the gist from the current selection
  • :GistCreateFromFile will create the gist from the current file

Both the commands accept the same options which are [description=] and [public=true]

If you don't pass the description it will prompt to insert one later. If you pass [public=true] it won't prompt for privacy later.

After you enter the description and privacy settings, the plugin ask for confirmation and will create the Gist using the gh command-line tool and copy the Gist's URL to the given clipboard registry.

You can also list your gists and edit their files on the fly.

    :GistsList
  • :GistsList will list all your gists and after you select one it will open a buffer to edit it

Configuration

gist.nvim provides a few configuration options that you can with the setup function:

    require("gist").setup({
        private = false, -- All gists will be private, you won't be prompted again
        clipboard = "+", -- The registry to use for copying the Gist URL
        list = {
            -- If there are multiple files in a gist you can scroll them,
            -- with vim-like bindings n/p next previous
            mappings = {
                next_file = "<C-n>",
                prev_file = "<C-p>"
            }
        }
    })

License

gist.nvim is released under MIT License. See LICENSE for details.

Contributing

If you find a bug or would like to contribute to gist.nvim, please open an issue or a pull request. All contributions are welcome and appreciated!

More Repositories

1

splash-cli

A simple, CLI to download Unsplash wallpapers. Nothing fancy β€” it just works.
Go
522
star
2

js-challenges

πŸ†A collection of Javascript coding challenges, from beginner to advanced.
JavaScript
92
star
3

electron-touchbar-api-sample

Electron sample Touch Bar integration
JavaScript
46
star
4

Advanced-Clock

Read the article on Medium πŸ‘‰
Swift
29
star
5

hawk

Dead simple rust CLI to ease workflows management inside monorepos.
Rust
25
star
6

vscode-icons-manager--electron

Manage vscode icons by Dhanish Gajjar easy with ease
JavaScript
22
star
7

tmdb-cli

The movie database client
JavaScript
17
star
8

dot-files

My dot files setup.
JavaScript
15
star
9

next-wayfinder

Apply multiple nextjs middlewares with ease
TypeScript
12
star
10

tailwind-radix-colors

TypeScript
9
star
11

raycast-music

The only music extension you need
TypeScript
8
star
12

n1-mdl

Theme inspired from Google MDL palette.
CSS
7
star
13

zippyshare-extractor

Extract ZippyShare download url magically ✨
JavaScript
6
star
14

collection-downloader-py

Download Unsplash Collections with ease
Python
6
star
15

Pasty

Read the article on Medium πŸ‘‰
Swift
6
star
16

gh-linear

create a new branch starting from linear issues
Go
5
star
17

hyper-white-theme

Hyperterm white theme
JavaScript
5
star
18

auth0-jwt

Rust
4
star
19

rawn-tool-bar

Atom toolbar for Atom ToolBar Plugin
CSS
4
star
20

donald-trump-poop

A little fun chrome extension that replaces Donald Trumps name with πŸ’©πŸŽΊ emojis.
JavaScript
4
star
21

website-generator

Simple & Clean website generator
JavaScript
4
star
22

crontab-sentence

Parse a sentence to cron expression
TypeScript
3
star
23

vscode-icons-manager

Management of Dhanish Gajjar's vscode-icons made easy
Swift
3
star
24

blobmaker_sketch

Generate blobs with ease
JavaScript
3
star
25

windocs

Tailwind powered api docs generator.
TypeScript
3
star
26

gitgud

Git library with DX in mind
Go
3
star
27

ttsl-api

JavaScript
2
star
28

cl1p-cli

Cli tool for http://cl1p.net
JavaScript
2
star
29

git-add-commit

Commit made easy
Go
2
star
30

tinymd

Dead simple markdown compiler, written in Rust πŸ¦€
Rust
2
star
31

festivities.json

A list of all internation main festivities.
2
star
32

happynewyear

HappyNewYear provides to make wishes when is a festivity
JavaScript
2
star
33

java-to-typescript

Java to TypeScript converter. Still WIP
TypeScript
2
star
34

react-generated-form

React json based form generation.
TypeScript
2
star
35

apple-solid-wallpapers

Some solid 4k/8k landscape/portrait solid background wallpapers for your device.
2
star
36

csk

A better `brew cask`
JavaScript
2
star
37

chili-js

useful functions / shortcuts / variables for nodeJs
JavaScript
2
star
38

fastify-oauth

TypeScript
1
star
39

fedevitaledev

Personal website (again)
TypeScript
1
star
40

scripto.nvim

Vim Script
1
star
41

next-font-bug

TypeScript
1
star
42

colorscheme-sync

keep your ide / terminal / multiplexer themes in sync
Rust
1
star
43

next-middleware-pahthandler

TypeScript
1
star
44

alacritty-config

1
star
45

blog.fedevitale.dev

JavaScript
1
star
46

homebrew-tap

Let's bring some packages on brew
Ruby
1
star
47

metascraper

TypeScript
1
star
48

github-actions-autodocs

Rust
1
star
49

brostv

CSS
1
star
50

simple-download

Download files
TypeScript
1
star
51

split-website

Split website template
CSS
1
star
52

ppj

Easily beautify JSON in your terminal
JavaScript
1
star
53

rawnly

Just Me
1
star
54

snahp-tool

Client for download movies from snahp lists.
JavaScript
1
star
55

ExtensionPack

Utility
Swift
1
star
56

web-readme

Super simple website readme generator
JavaScript
1
star
57

notifications.css

Simple useful notifications in css
CSS
1
star
58

commas

Add, Remove, Replace commas.
Shell
1
star
59

nvim-config

Lua
1
star
60

template-next-rust-monorepo

Rust
1
star
61

rawgit-cli

Rawgit node client.
JavaScript
1
star
62

Amazon-IVA-4

This extension is designed for italian handicap users who needs iva discount from 22 to 4%
JavaScript
1
star
63

SplashDesktop

The final desktop version of splash-cli
CSS
1
star
64

simple-download-cli

CLI version of simple-download
JavaScript
1
star
65

stockpapers-website

StockPapers('s) website
TypeScript
1
star
66

UnsplashAPIClient

Unsplash API wrapper
Swift
1
star
67

easy-registry

Easy NPM Registry API module
JavaScript
1
star
68

Unsplash-Wallpaper-Utility

a chrome extension that let's you preview Unsplash's photos as iPhone wallpaper
JavaScript
1
star
69

wth-cli

what t
JavaScript
1
star
70

spring-crud-jwt

Java
1
star
71

git-select

Go
1
star
72

lmgtfy-cli

Client of: Let Me Google That For You
JavaScript
1
star
73

stackoverflow-autologin

Login to StackOverflow automatically
Python
1
star
74

uindows-cli

Unix commands on windows
JavaScript
1
star
75

queue-rs

Rust
1
star
76

home-cli

Your favourite in a commandline.
JavaScript
1
star
77

MovieTheater

Demo app to try out new `UICollectionViewDiffableDatasource` (API data by TheMovieDatabase)
Swift
1
star
78

weather-commandline

Node commandline to get forecast from darksky.net
JavaScript
1
star
79

splash-cli-website

Just type splash that's it. Simple and clean
TypeScript
1
star
80

devBadges-js

2 useful dev-badges for your webpage
JavaScript
1
star
81

aalias

Alias management made easy
Rust
1
star