Skip to content

Instantly share code, notes, and snippets.

@Ethkuil
Last active November 18, 2023 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ethkuil/4cfb477e7ebbbb12763a371030a50c88 to your computer and use it in GitHub Desktop.
Save Ethkuil/4cfb477e7ebbbb12763a371030a50c88 to your computer and use it in GitHub Desktop.
Quickly start coding snippet in vscode
@echo off
set dir=%TMP%\vscode-tmp-code
for %%i in (rm del cl) do (
if "%1" == "%%i" call :rmTmp && exit
)
if not exist "%dir%" mkdir "%dir%"
set ext=%1
set file=tmp.%ext%
start code %dir% && code %dir%\%file% && exit
:rmTmp
REM delete tmp files, but keep the folder
if exist %dir% del /s /q %dir%
@Ethkuil
Copy link
Author

Ethkuil commented Nov 21, 2022

Keeping folders when deleting temp files is to keep stuff like .vscodevenv.

@Ethkuil
Copy link
Author

Ethkuil commented Nov 18, 2023

Deprecated. Online playgrounds are convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment