Packages: [JavaScript] tagged templates don't auto-close backtick

Created on 28 Oct 2017  路  9Comments  路  Source: sublimehq/Packages

If I type

const x = `

it'll autoclose it fine to

const x = ``

But when I type

const x = foo`

it doesn't (where foo is a "tagged template function", basically any function can be used as such)

Most helpful comment

While we're at it, Markdown could also benefit from more auto-pairing with backticks and asterisks in particular. @keith-hall?

All 9 comments

Which language syntax is this for? Are you perhaps using a third party package? as I can't see any .sublime-keymap file in this repo with a binding for `...

I use JavaScript (babel) but I carefully tried with the default Javascript syntax as well, same behavior for the tagged functions, trailing backtick not autocompleted

edit: Oh, JavaScript, sorry forgot to mention :)

@caub I think the point is, that the backticks aren鈥檛 supposed to auto-completed right now. My Sublime certainly doesn鈥檛 autoclose them in the second example.

@kleinfreund I don't see why it shouldn't auto-close the backtick. It's similar than a literal string or template string

@caub What I mean is that Sublime doesn鈥檛 do that right now. It probably should. But the behavior you show in the second example is not a Sublime default.

Yes, sure I figured that out, I'd like it to become one :)

While we're at it, Markdown could also benefit from more auto-pairing with backticks and asterisks in particular. @keith-hall?

@caub I could not reproduce this issue on the latest build. I presume it's been fixed at some point. Can this be closed?

yes, this bug occurs with Javascript (Babel) not with Javascript

Was this page helpful?
0 / 5 - 0 ratings