Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support complex surrounding #4

Open
NN--- opened this issue May 14, 2023 · 1 comment
Open

Support complex surrounding #4

NN--- opened this issue May 14, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@NN---
Copy link

NN--- commented May 14, 2023

Some languages has more than one character for surrounding.

For example

F#: let array1 = [| 1; 2; 3 |]
Nemerle: <[ $a ]> or linq <# from a in b select a #>

Python:
“””
Doc string
“””

Other examples can be brought if needed.

Please support this too.

@NN--- NN--- added the enhancement New feature or request label May 14, 2023
@kkm000
Copy link

kkm000 commented Nov 5, 2023

As an F# user, I must👍this! We have not only comments (*...*) (these are handled by VS), but also arbitrary double-backquoted Unicode identifiers¹'² ``...``, attributes [<...>], arrays [|...|], anonymous records {|...|}, half-bananas (|HalfBanana|_|), full bananas (|Full|Banana|)³, interpolated typed quotations <@...@> and interpolated untyped quotations <@@...@@>—the latter of which rudely kills, right on the spot, the budding pattern “anything two-character goes, as long as it's more or less symmetric”⁴...

Oh, and the strings! We have the sane, boring old-school quoted strings, the farthing (@) single and double quoted interpolated strings, one-buck ($) single quoted interpolated strings, two-buck ($$) triple quoted interpolated strings... and perhaps even worse more. Inserting paired {...} over a selection inside such a string would be helpful and appreciated indeed. Sometimes it's not too obvious where they've tangled.


¹ A pattern very common in naming unit tests, e.g.,

[<UnitTest>]
let ``"yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation`` =
   . . .

² ...but on a second thought, is there anything wrong with the naming of this function? It compiles, after all, and does what it's supposed to do! (I'm not sure yet what exactly, tho.) Let the types guide you!

let ``tío, ¡ay, Dios!, ¿por qué se te ve tan triste?``(@): 'ξ->'ξ = (@) >> (@)

³ I'm struggling to remember when I've declared a banana correctly from the first attempt, closing it with the | on both sides inside the parentheses. It's not impossible that such a thing simply never happened.
⁴ j/k, of course. Rly, we first fight to exhaustion about adding (or not) any new syntax at all, then, having recovered a bit, jump back into the ring to fight about the choice of particular characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants