Closed sh78 closed 6 years ago
What do you expect if there are several files?
What do you expect if there are several files?
Good point. I suppose it would be best to concatenate and yank all since that would eliminate the scenario where a user has to reopen Gista to get another file's contents. At least then they could easily just delete the portion that they don't need.
Then again there could be two actions:.
These bindings correlate with vim's default motions, "in" and "around/all".
I feel it's a bit ambiguous. For example, assume that a gist have 4 files as
and user want the content of windows.txt but don't know the order of appearance.
In this case, it's sometime difficult to distinguish the content and user can not determine which content comes from which.
So I don't feel the feature should be in gista itself.
For your purpose, the following simple macro would work I guess (not tested so some modification would be required)
qa
<Return>
ggVG
"ay
<C-^>
<C-w>p
q
then press @a
. Once you satisfy, write it to the buffer local function or whatever.
Fair enough - I didn't realize gists could have multiple files originally.
Thanks for typing up that macro @lambdaalisue! I'll make a key mapping for my snippet management.
Would be great to directly yank the contents of a Gist right after
:Gista list
. I want to use Gist like a snippet manager.yy
is already taken, but maybeyi
for "yank inside" would fit.