excalidraw / excalidraw-vscode

Excalidraw for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor
MIT License
477 stars 60 forks source link

New command: Create a new untitled Excalidraw file #21

Open pomdtr opened 2 years ago

pomdtr commented 2 years ago

We should also integrate with the Create: New File... command.

rebornix commented 2 years ago

Hi @pomdtr , VS Code dev here. I can help with this if you haven't started yet.

pomdtr commented 2 years ago

Hi @rebornix ! Thanks for proposing your help, go ahead :)

pomdtr commented 2 years ago

I did take a stab at it some time ago, but I did encouter a bug when saving the untitled document : the untitled editor was not closing after saving it to a document, leading to two document opened :/

aadimator commented 2 years ago

Waiting for this eagerly. You should also specify a setting to set the "default path" where it should store the newly created files.

Acumane commented 1 year ago

Emphasis on unsaved/untitled. My ideal workflow is embedding drawings into markdown, so I've no need for saving to its own file

rajguru7 commented 1 year ago

Hi, I am not sure if it is related to this issue, but I am not able to create a *.excalidraw.svg, *.excalidraw.png, *.excalidraw file using the below command in terminal:

code <file-you-want-to-create>.excalidraw

Please let me know if it is possible.

A workaround for this is to open code in the same directory using code . and then creating a new file inside vscode with the .excalidraw extension.

pomdtr commented 1 year ago

Yeah there is something wrong in the way the extension handle files. I really want to fix it, but I don't have a lot of time to dedicate to the issue right now.

Any help would be appreciated! #85 is probably related to this.

sammcj commented 1 year ago

Came here to log a feature request for exactly this.

It's a bit of a pain having to create a new file with a specific extension, open it with vscode etc... and it means there's no hotkey assignable shortcut that can be used with automations/layouts etc....

the-yojimbo commented 8 months ago

anyone have any update on this request? currently, I have to make a copy an existing .excalidraw file and then I can open it from Excalidraw. I wish I could actually help but I am no programmer.