karmaniverous / dot-code

An AutoHotKey script that launches VS Code from File Explorer when you type Alt-Win-.

Home Page:https://karmanivero.us/blog/dot-code-for-windows/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dot-code for Windows

An AutoHotKey script that launches VS Code from File Explorer when you type Alt-Win-..

Why?

I use VS Code as my primary editor. I'm constantly in & out of code repos & single files, and I think the File Explorer context menu is a giant pain in the behind.

This is just better: pick one or more artifacts and hit an easy key combo. Done!

Installing dot-code

  1. Download & install AutoHotKey v2 from the AHK home page.

  2. Type Win-R and enter shell:startup in the dialog to open your startup apps folder.

  3. Do you have a User or System VS Code installation? Download either dot-code-user.ahk or dot-code-system.ahk and copy it into your startup apps folder.

  4. Restart your machine.

Using dot-code

Open a directory (say a code repository) in File Explorer. Type Alt-Win-. without selecting any files or subdirectories, and the entire directory will open in VS Code.

Open a parent directory containing multiple code repos. Select a repo folder, type Alt-Win-., and only the selected repo will open in VS Code.

Now open a repo and select one or more files. When you type Alt-Win-., only the selected files will open in VS Code.

Changing the HotKey

The key combination is articulated in this line of the script, specifically the #!. before the trailing ::.

To change the key combo, just replace #!. with your own combo. See the AutoHotKey docs for more help.

About

An AutoHotKey script that launches VS Code from File Explorer when you type Alt-Win-.

https://karmanivero.us/blog/dot-code-for-windows/


Languages

Language:AutoHotkey 100.0%