-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersjavascriptJavaScript support issuesJavaScript support issuessnippetstypescriptTypescript support issuesTypescript support issuesverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
Milestone
Description
A while back, @mjbvz filed microsoft/TypeScript#18458 on the TypeScript side. The idea is that it would be great if we could easily transform.
// Hello
someFunc();
someOtherFunc();into something like
if ([|condition|]) {
// Hello
someFunc();
someOtherFunc();
}as a refactoring. (The [|condition|] here represents a tab-stop where a user can start filling in condition as a placeholder).
The consensus there was that "surround with" is often simple enough that it could be provided through snippets. This won't always be precise, but it's good enough. Taking a look at the documentation, it seems like we can leverage $TM_SELECTED_TEXT in existing snippets to add this behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersjavascriptJavaScript support issuesJavaScript support issuessnippetstypescriptTypescript support issuesTypescript support issuesverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded