A Visual Studio Code extension for converting "string literals"
into $"template strings"
.
This extension currently supports CSharp
, Javascript
and Typescript
files. To use the extension, follow these instructions:
- Open a file in one of the supported languages and place your caret within a string literal.
- Open the command palette (Ctrl+Shift+P) and select the
Convert to Template String
command, or press the default key chordctrl+m ctrl+2
.
For CSharp documents, a string like "Some string"
will be converted to a template string $"Some string"
. For Javascript and Typescript documents, a string literal "Some string"
will be converted to a template string Some strign
.
The extension exposes the following command which can be run to convert the string.
stringTemplateExpander.convertToTemplateString
View other extensions from Maptz
No requirements currently.
The extension doesn't expose any settings.
No known issues to-date. Please file a bug on github.
- Release version of extension.
- Fixed issue with Javascript and Typescript.
- Added TypescriptReact support. Thanks @mattread90. See Pull #2.
- Added React support. Thanks @mattread90. See Pull #1.
- Initial alpha release of the extension.