Skip to content

adriantunez/vscode-folder-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

VS Code Folder Launcher

A Zsh plugin to open Git projects in VS Code with tab completion support.

Demo

VS Code Folder Launcher Demo
Alias name configuration with folder path, tab completion and instant project opening in action.

Why

I prefer to have only one Git repository folder open at a time in Visual Studio Code. Since the Git projects I use span different GitHub organizations, I organize them under folders like:

$HOME/software/personal/org_A/repository_A

A typical structure looks like:

$HOME/software/personal/
├── org_A/
│   ├── repository_A/
│   └── repository_B/
├── org_B/
│   └── repository_C/  
└── single_repository_A/  

This plugin lets you create a folder aliases that open the right Git repository in VS Code, with tab completion for organizations and projects It's fast, avoids typing long paths, and saves you from having to remember the full directory structure, so you can focus on coding.

Installation

Oh-My-Zsh

  1. Go to your custom Oh My Zsh plugin directory:
cd ~/.oh-my-zsh/custom/plugins
  1. Clone the plugin repository:
git clone git@github.com:adriantunez/vscode-folder-launcher.git
  1. Add vscode-folder-launcher to your plugin list in ~/.zshrc:
plugins=(... vscode-folder-launcher)
  1. Reload your shell:
source ~/.zshrc

Usage

Once the plugin is installed and enabled, edit the configuration file:

# ~/.vscode-folder-launcher

# Place your folder mappings here
# alias_name:folder_path
codep:$HOME/software/personal/

After making changes, reload your shell:

source ~/.zshrc

Example

codep org_A/repository_A

→ opens $HOME/software/personal/org_A/repository_A in VS Code.

NOTE: Tab completion works! You can autocomplete after the alias by pressing TAB

In addition, you can also:

  • Open all repositories in an organization:
codep org_A
  • Open a subfolder inside a repo:
codep org_A/repository_A/my_subfolder

Features

  • Opens folders using VS Code code.
  • Tab completion for organizations, projects and subfolder paths.
  • Multiple aliases for different base paths (remember to source ~/.zshrc afterwards):
# ~/.vscode-folder-launcher

codep:$HOME/software/personal/
codec:$HOME/software/company/
corga:$HOME/software/personal/org_A/
  • Simple, clean, and reusable.

This project is not affiliated with or endorsed by Microsoft or Visual Studio Code.

About

Zsh plugin to open Git projects in VSCode with tab completions

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages