Open bhrutledge opened 4 years ago
Just as an FYI, you can also right-click the tab handle for the file, and select “Copy File to Gist”. That way, you could copy the currently opened file to a gist, without needing to find it in the Explorer tree view. Would that suit your workflow?
Ah, thanks for the tip. That's better, but still requires interacting with the mouse. 😉
Putting it in the command palette means it's just a few keyboard strokes, and I'll end up there anyway when entering the Gist name.
@lostintangent any reason not to change this when
condition to gistpad:state == SignedIn
?
The last time I looked at this, I think that the command needed to also be updated in order to properly detect that an editor was active and use it as the copy source. But the change shouldn't be too significant? If you wanted to submit a PR, that would be great!
Yes, I quickly tested it last night, when calling the command from the Palette one of the objects is not initialized (I guess that comes from the click event on the Tree); it needs a bit of work but should be doable
My typical workflow is to write a file locally, then publish it as a new Gist. Currently, that's possible by revealing the file in the sidebar, right-clicking on the file, and clicking "Copy File to Gist".
It would be really nice if I could use the command palette instead.