Skip to content

Find and replace in current (unsaved/out-of-workspace) file #424

@molenzwiebel

Description

@molenzwiebel

I'd love some way to have an ast-grep version of Ctrl-F, i.e. limited to the current file and not requiring the file to actually be in my current vscode workspace (or even be on disk at all). I don't mind if it still writes it to the disk in the background to do the actual processing.

I often find myself wanting to use ast-grep to do small transformations on code snippets that I copied from the internet/am sending to someone as an example/are not in my current workspace. Right now I have to copy them over, perform the transformation, then delete the result. As a result, I end up just fumbling around with multi-cursor replacements instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions