Skip to content

predragnikolic/JS-Template-String-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

example

This plugin converts a string to template strings in following cases.

  • When ${ is typed:
// | - is the cursor
let x = 'Hello, ${|'
let x = `Hello, ${|}`

// in JSX
const p = <p class="Hello, ${|"></p>
const p = <p class={"Hello, ${}"}></p>

Press undo, to undo the conversion if you do not want template strings.

let x = 'Hello, ${|'
let x = `Hello, ${|}` // press undo
let x = "Hello, ${|}"

This plugin is inspired by Template String Converter by Megan Rogge.

About

A Sublime Text plugin to auto convert strings to template strings.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages