Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename a workspace in vscode?

My vscode project has an "app" folder which is the root folder for my workspace.

It is possible to change the title of this workspace?

workspaces

like image 418
kolypto Avatar asked Jan 09 '21 14:01

kolypto


3 Answers

Use the "File -> Save Workspace As ..." to save it into a file.

Menu

Normally, you would only want to use a <name>.code-workspace file with multi-root projects (that is, projects that include multiple folders), but this is also the only way to rename a workspace.

More information:

  • What is a workspace in vscode?
  • Saving workspaces

P.S. All the credit goes to Henry for pointing me to .code-workspace files :) Thanks!

like image 69
kolypto Avatar answered Nov 13 '22 01:11

kolypto


Simply edit the .code-workspace file contained in the actual folder (via file explorer) and rename it. That's it!

like image 21
Henry Avatar answered Nov 13 '22 03:11

Henry


I haven't yet found a way to change the name of the workspace itself (without changing the filename); but one thing not mentioned in other answers that might be relevant: you can edit the .code-workspace file and add a name property to set a custom display name for each folder in your workspace:

{   
  "folders": [
    {
      "path": "../path/to/folder",
      "name": "my custom folder name"
    }
  ],
  "settings": {}
}
like image 13
blindfish Avatar answered Nov 13 '22 01:11

blindfish