Skip to content

Latest commit

 

History

History
161 lines (133 loc) · 4.05 KB

README.md

File metadata and controls

161 lines (133 loc) · 4.05 KB

Build Status Dependency Status Known Vulnerabilities

File Utils - Visual Studio Code Extension

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: ".
  • Select one of the commands mentioned below.
  • Press [Enter] to confirm, or [Escape] to cancel.

howto

Note

Nonexistent folders are created automatically.

Commands

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

Context Menu

{
    "explorer/context": [
        {
            "command": "fileutils.moveFile",
            "group": "edit"
        },
        {
            "command": "fileutils.duplicateFile",
            "group": "edit"
        }
    ],
    "editor/context": [
        {
            "command": "fileutils.moveFile",
            "group": "edit"
        },
        {
            "command": "fileutils.duplicateFile",
            "group": "edit"
        }
    ]
}

Configuration

{
    "fileutils.delete.useTrash": {
        "type": "boolean",
        "default": false,
        "description": "Move file to the recycle bin instead of deleting it permanently."
    },
    "fileutils.delete.confirm": {
        "type": "boolean",
        "default": true,
        "description": "Controls if it should ask for confirmation when deleting a file."
    },
    "fileutils.typeahead.enabled": {
        "type": "boolean",
        "default": true,
        "description": "Controls if directory selector should be shown."
    },
    "fileutils.typeahead.exclude": {
        "type": "object",
        "default": {},
        "description": "Configure glob patterns for excluding files and folders."
    }
}

Changelog

How to contribute

  1. Download source code and install dependencies
git clone [email protected]:sleistner/vscode-fileutils.git
cd vscode-fileutils
npm install
code .
  1. Make the respective code changes.
  2. Go to the debugger in VS Code, choose Launch Extension and click run. You can test your changes.
  3. Choose Launch Tests to run the tests.
  4. Submit a PR.

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

Steffen Leistner

License

MIT