Last active
November 18, 2023 10:28
-
-
Save Ethkuil/4cfb477e7ebbbb12763a371030a50c88 to your computer and use it in GitHub Desktop.
Quickly start coding snippet in vscode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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% |
Deprecated. Online playgrounds are convenient.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Keeping folders when deleting temp files is to keep stuff like
.vscode
、venv
.