s-oram / vscode-fileutils

Visual Studio Code Extension

Home Page:https://marketplace.visualstudio.com/items?itemName=sleistner.vscode-fileutils

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

icon

File Utils - Visual Studio Code Extension

Build Status Dependency Status Known Vulnerabilities Renovate semantic-release


A convenient way of creating, duplicating, moving, renaming, deleting files and directories.

Inspired by Sidebar Enhancements for Sublime.

How to use

demo

Using the command palette:

  • Bring up the command palette, and select "File Utils: ".
  • Select one of the commands mentioned below.
  • Press [Enter] to confirm, or [Escape] to cancel.

howto

Brace Expansion

Brace expansion is a mechanism by which arbitrary strings may be generated.

Example file name input

/tmp/{a,b,c}/index.{cpp,ts,scss}

will generate the following files

➜  tree /tmp
/tmp
├── a
│   ├── index.cpp
│   ├── index.scss
│   └── index.ts
├── b
│   ├── index.cpp
│   ├── index.scss
│   └── index.ts
└── c
    ├── index.cpp
    ├── index.scss
    └── index.ts

Note

Non-existent folders are created automatically.

Commands

[
    {
        "command": "fileutils.renameFile",
        "category": "File Utils",
        "title": "Rename"
    },
    {
        "command": "fileutils.moveFile",
        "category": "File Utils",
        "title": "Move"
    },
    {
        "command": "fileutils.duplicateFile",
        "category": "File Utils",
        "title": "Duplicate"
    },
    {
        "command": "fileutils.removeFile",
        "category": "File Utils",
        "title": "Delete"
    },
    {
        "command": "fileutils.newFile",
        "category": "File Utils",
        "title": "New File Relative to Current View"
    },
    {
        "command": "fileutils.newFileAtRoot",
        "category": "File Utils",
        "title": "New File Relative to Project Root"
    },
    {
        "command": "fileutils.newFolder",
        "category": "File Utils",
        "title": "New Folder Relative to Current View"
    },
    {
        "command": "fileutils.newFolderAtRoot",
        "category": "File Utils",
        "title": "New Folder Relative to Project Root"
    },
    {
        "command": "fileutils.copyFileName",
        "category": "File Utils",
        "title": "Copy Name Of Active File"
    }
]

Configuration

{
    "fileutils.typeahead.enabled": {
        "type": "boolean",
        "default": true,
        "description": "Controls if directory selector should be shown."
    }
}

Changelog

How to contribute

Disclaimer

Important: This extension due to the nature of it's purpose will create files on your hard drive and if necessary create the respective folder structure. While it should not override any files during this process, I'm not giving any guarantees or take any responsibility in case of lost data.

Contributors

License

MIT

Credits

Icon

About

Visual Studio Code Extension

https://marketplace.visualstudio.com/items?itemName=sleistner.vscode-fileutils

License:MIT License


Languages

Language:TypeScript 97.4%Language:Dockerfile 2.3%Language:JavaScript 0.3%