Skip to content

πŸ“‚ Provides a "New Folder" view in the Explorer and a command in the Command Palette. 🀟

License

Notifications You must be signed in to change notification settings

igorskyflyer/vscode-new-folder

Repository files navigation

πŸ“‚ New Folder 🀟


New Folder - Visual Studio Code extension

Downloads Installs Rating


πŸ“‚ Provides a "New Folder" view in the Explorer and a command in the Command Palette. 🀟


Visual Studio Code by default doesn't support a New Folder function when there are no open folders in the editor, not in the Explorer view nor in the Command Palette and the aim of this extension is to provide that exactly. With New Folder you can create new (local) folders without the need to leave Visual Studio Code.


πŸŽ‰ NOTE: since v.2.0.0 creating nested/recursive folders is supported! πŸ₯³

Made possible with FolderPicker. πŸ˜„


To get started, open an instance of Visual Studio Code and do any of the following ways of creating a new folder:


Explorer view

Expand the Explorer view in the Sidebar and click on the "Create Folder..." button, pick your desired parent folder and enter the name of the new folder.


Explorer View Explorer View command


Command Palette

Hit F1 to bring up the Command Palette, type "New Folder", select the command and pick your desired parent folder and enter the name of the new folder.


Actions


🎯 Create

Command Palette: New Relative Folder Command palette command to create a folder in the current directory



Command Palette: New Absolute Folder Command palette command to create a folder with an absolute path



Command Palette: New Recursive Folder Command palette command to create folders recursively in the current folder



Command Palette: Invalid Folder Invalid folder name supplied



🎯 Navigate

Command Palette: Navigate to Relative Folder Navigation to relative-path folders



Command Palette: Navigate to Absolute Folder Navigation to absolute-path folders



Command Palette: Pick Folder Pick a Folder


Keyboard shortcut

Press Ctrl/Cmd+Alt+N and pick your desired parent folder and enter the name of the new folder.


βš™ Config

Setting files.simpleDialog.enable to true is NOT necessary since v.2.0.0, that setting does not affect this extension.


To access the extension's config you can either go to Settings manually or open up the Command Palette and search for New Folder Config.


Command Palette Config


The extension exposes these properties for you to change,


newFolder.autoOpen: boolean = true

Whether the newly created folder should be opened automatically upon creation.


newFolder.projectRoot: string = ''

Root directory path where you keep your projects. This is the path to use as the initial folder for the New Folder command. If the path is an empty string (default) or a non-existing path, the root folder will be set to your User/Home folder.

❗ On Windows you can use either forward or back slashes in the path, thanks to uPath.


newFolder.responseSpeed: ResponseSpeed = ResponseSpeed.Normal

Response speed for generating Actions when typing into the InputBox of the Picker. Change only if needed. Functionality provided by Zep().


newFolder.showIcons: boolean = true

Whether to show icons in the Picker.


newFolder.iconsType: string = 'built-in'

The type of icons to use in the Picker, available options are:

  • built-in (default) - uses the active Product Icon theme,
  • emoji.

Icons preview (on Windows)

Command Palette Icons Type
Different types of Icons for the Picker


Built-in icons are provided by the currently set Product Icon theme, in this case, Material Product Icons.


newFolder.ignoreFocusOut: boolean = true

Controls whether the Picker should stay open even when loosing focus. This setting is ignored on iPad and is always false on other platform defaults to true.