Skip to content

Allow creating new files and folders via unnumbered lines #7

@soumyaray

Description

@soumyaray

Feature request

Allow users to create new empty files or folders by adding unnumbered lines in the editor.

Proposed behavior

With the numbered prefix system ([01] file.txt, [02] dir/), the distinction is natural:

  • Numbered lines = existing files (rename/delete/no-op)
  • Unnumbered lines = new creates

Conventions:

  • newfile.txt → create empty file (touch)
  • newfolder/ → create directory (mkdir -p)

Example

[1] existing.txt
[2] README.md
newfile.txt
newdir/

Considerations

  • New action type needed (e.g., Actions::Create, Actions::Mkdir)
  • Security: guard against path traversal, overwriting existing files
  • The current line-count guard (raise if sizes differ) would need to allow growth
  • Should creating files that already exist be an error or a no-op?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions