This extension will automatically convert single or double quotes to backticks when needed.
Just start typing a regular string, the extension will transform it into a template literal as soon as it detects placeholders (${}
).
⚠️ Breaking Change: Since version 1.2.0, therevertEnabled
setting has been renamed toenableRevert
. Additionally, its default value has been changed fromtrue
tofalse
. Please ensure to update your configuration accordingly.
-
User-friendly: JavaScript Auto Backticks is designed to be user-friendly and requires no configuration for immediate use.
-
TypeScript Handling: This extension is specifically designed to work seamlessly with both JavaScript and TypeScript languages.
-
Smart Quotes Recognition: JavaScript Auto Backticks is smart enough to differentiate escaped quotes within a string. It ensures that only the quotes that should be part of the template literal are converted to backticks, leaving the escaped quotes unchanged.
-
Handling Pasted Text: This extension handles pasted text. If you paste code containing
${
, the extension will instantly convert the applicable quotes to backticks as required.
Key | Description | Default value |
---|---|---|
js-auto-backticks.enableRevert | Revert to regular quotes after removing last placeholder of a template string. | false |
js-auto-backticks.preferredStandardQuotes | Specifies preferred quotation marks when reverting standard string. | auto |
This project is licensed under the MIT License.
Contributions to the JavaScript Auto Backticks extension are welcome! If you encounter any issues or have suggestions for improvements, please feel free to submit a pull request or create an issue in the project repository on GitHub.
Happy coding with JavaScript Auto Backticks! If you find this extension helpful, don't forget to give it a ⭐ on the Visual Studio Code Marketplace. Thank you!