vim-gist icon indicating copy to clipboard operation
vim-gist copied to clipboard

list gists and paste the select gist to the current buffer

Open jiqimaogou opened this issue 11 years ago • 8 comments

Can you add the function that, when I list gists, and I can paste the select gist to the current buffer, either open it?

jiqimaogou avatar Oct 16 '14 15:10 jiqimaogou

Do you want to use gist as snippet? :)

mattn avatar Oct 17 '14 04:10 mattn

yes,

jiqimaogou avatar Oct 17 '14 06:10 jiqimaogou

@jiqimaogou You can try my fork; it has all the original functionalities and some (minor) shortcuts for making it easy to operate (I wouldn't call them enhancements!). For example, it allows for pressing 'y' (for yank) while on the gist listing buffer, in order to copy the contents of the gist listed on the current line to the clipboard, ready to paste (with, e.g., 'p' or 'P'). Once you press 'y' it will close the listing buffer and get you back where you were before calling the gist listing.

@mattn This is indeed a great plugin, thanks for the great work mattn, this is really useful. I'm planning on sending a pull request, but I would like to make some other modifications (mostly cleanup of my code) first.

pablocobelli avatar Oct 01 '16 01:10 pablocobelli

interesting. I'm looking for the pr.

mattn avatar Oct 01 '16 10:10 mattn

@mattn I've been working on some modifications to the code, which is great. I just added some stuff to make it (in my opinion) more amenable to my workflow. Check it out if you have time, its on https://github.com/pablocobelli/gist-vim; the README file should give you a hint as to where I'm headed. This is not yet a PR; I just wanted to let you know what I've been playing with, and ask for your opinion and/or ideas on my changes.

pablocobelli avatar Oct 02 '16 23:10 pablocobelli

Seems good to me. I don't make sure but maybe have small issue about multi-byte string. However, I can fix this in later. Thanks. If you are okay to send me the PR, please move some part of contents you written in README.md into doc/gist.txt . :+1:

mattn avatar Oct 03 '16 00:10 mattn

Ok, I'll move some of the description I've added to my README to the doc/gist.txt and then I'll send you the PR.

pablocobelli avatar Oct 03 '16 23:10 pablocobelli

Ok; I just sent the PR. Check it out and tell me what you think.

pablocobelli avatar Oct 08 '16 22:10 pablocobelli