Open thekaganugur opened 5 years ago
Does the fn
part matter at all? Are you suggesting that %
should move between the two backticks?
Yes
Is this working? I have in my after/ftplugin/javascript.vim
:
set matchpairs+=`:`
"set matchpairs? -> matchpairs=(:),{:},[:],<:>,`:`
inside a javascript file:
`foo`
`bar`
The first foo backtick doesnt work, the second foo backtick goes to the first foo backtick, the first bar backtick goes to the second foo backtick and the second bar backtick goes to the first bar backtick:
+---+
| |
v |
`foo`
^
|
+---+
|
`bar`
^ |
| |
+---+
Thanks
No, it's not currently supported. Unfortunately, it's difficult to accomplish, since there's no way to tell what is the start and what is the end. I think it would either need to rely on syntax highlighting, or count backticks on a single line.
Can tagged template literals span lines?
Can tagged template literals span lines?
Yeah, all template literals, not only tagged ones.
I think if the implementation is difficult and/or performance is impacted, then this is not worth it (a nice to have at least)
No, it's not currently supported. Unfortunately, it's difficult to accomplish, since there's no way to tell what is the start and what is the end.
Why? If the index of `
is even, it's the start, if it's odd it's the end. Only thing important is to not confuse ```
with ``
or `
should work the same way
(
In the second lineMDN Doc on Tagged Template Literal