Skip to content

Instantly share code, notes, and snippets.

@sfengyuan
Last active August 25, 2022 10:34
Show Gist options
  • Save sfengyuan/f16dd4767477bd8c08f07c7d9e4f47cd to your computer and use it in GitHub Desktop.
Save sfengyuan/f16dd4767477bd8c08f07c7d9e4f47cd to your computer and use it in GitHub Desktop.
Settings on Windows: open with sublime text and vs code, scoop python registry entries
@echo off
SET AppKey=SublimeText3
SET AppTitle=Sublime Text 3
SET AppPath=D:\Program Files\st\sublime_text.exe
SET AppIcon=%AppPath%,0
REG ADD "HKEY_CLASSES_ROOT\*\shell\%AppKey%" /ve /f /d "%AppTitle%"
REG ADD "HKEY_CLASSES_ROOT\*\shell\%AppKey%" /v "Icon" /f /d "%AppIcon%"
REG ADD "HKEY_CLASSES_ROOT\*\shell\%AppKey%\command" /ve /f /d "%AppPath% \"%%1\""
REG ADD "HKEY_CLASSES_ROOT\Folder\shell\%AppKey%" /ve /f /d "%AppTitle%"
REG ADD "HKEY_CLASSES_ROOT\Folder\shell\%AppKey%" /v "Icon" /f /d "%AppIcon%"
REG ADD "HKEY_CLASSES_ROOT\Folder\shell\%AppKey%\command" /ve /f /d "%AppPath% \"%%v\""
REG ADD "HKEY_CLASSES_ROOT\Directory\Background\shell\%AppKey%" /ve /f /d "%AppTitle%"
REG ADD "HKEY_CLASSES_ROOT\Directory\Background\shell\%AppKey%" /v "Icon" /f /d "%AppIcon%"
REG ADD "HKEY_CLASSES_ROOT\Directory\Background\shell\%AppKey%\command" /ve /f /d "%AppPath% \"%%v\""
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Python]
[HKEY_CURRENT_USER\Software\Python\PythonCore]
"DisplayName"="Python Software Foundation"
"SupportUrl"="https://www.python.org/"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.10]
"DisplayName"="Python 3.10 (64-bit)"
"SupportUrl"="https://www.python.org/"
"Version"="3.10.6"
"SysVersion"="3.10"
"SysArchitecture"="64bit"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.10\Help]
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.10\Help\Main Python Documentation]
@="C:\\Users\\sensu\\AppData\\Local\\Programs\\Python\\Python310\\Doc\\python3106.chm"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.10\Idle]
@="C:\\Users\\sensu\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\idlelib\\idle.pyw"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.10\IdleShortcuts]
@=dword:00000001
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.10\InstalledFeatures]
"Shortcuts"="3.10.6150.0"
"exe"="3.10.6150.0"
"dev"="3.10.6150.0"
"lib"="3.10.6150.0"
"test"="3.10.6150.0"
"doc_shortcut"="3.10.6150.0"
"doc"="3.10.6150.0"
"tools"="3.10.6150.0"
"tcltk"="3.10.6150.0"
"pip"="3.10.6150.0"
"path"="3.10.6150.0"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.10\InstallPath]
@="C:\\Users\\sensu\\AppData\\Local\\Programs\\Python\\Python310\\"
"ExecutablePath"="C:\\Users\\sensu\\AppData\\Local\\Programs\\Python\\Python310\\python.exe"
"WindowedExecutablePath"="C:\\Users\\sensu\\AppData\\Local\\Programs\\Python\\Python310\\pythonw.exe"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.10\PythonPath]
@="C:\\Users\\sensu\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\;C:\\Users\\sensu\\AppData\\Local\\Programs\\Python\\Python310\\DLLs\\"
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment