concordion / idea-concordion-support

Concordion support IntelliJ Idea plugin https://plugins.jetbrains.com/plugin/7978
Other
13 stars 8 forks source link

Support reference-style Markdown links in "surround with" #9

Open nigelcharman opened 8 years ago

nigelcharman commented 8 years ago

I'm finding myself using reference-style links quite often with the Markdown instrumentation - normally in the form:

[value][]

[value]: - "command"

but sometimes

[value][id]

[id]: - "command"

It would be great to support these with a variant of "surround with Concordion command"

There's lots of examples in https://github.com/concordion/concordion-scope-examples/tree/per_spec_parallel/src/test/resources/demo/google/calculator.

idegtiarenko commented 5 years ago

Hello,

I believe this is implemented by Surround with Concordion expression. It does not have initial hot key binding and can be found using Ctrl+Shift+A or find action menu

nigelcharman commented 5 years ago

Hi Ievgen

When I use Surround with Concordion expression on a text block Selected Text it generates [Selected Text](- "").

As far as I can tell, there's no way to ask it to generate the reference-style link style:

[Selected Text][]
⋮
[Selected Text]: - ""

Where the [Selected Text]: - "" portion could be anywhere, but in my experience would normally be at the end of the example or end of file. For tables, it would normally be after the table.

If I then tried to generate a link to a subsequent identical Selected Text block of text, it should just generate:

[Selected Text][] and reuse the existing declaration.

An alternative format is:

[Selected Text][id]
⋮
[id]: - ""

where id can be any valid identifier.

I realise this is asking a lot, so don't bother if it's too complex. I tend to use this style maybe 20% of the time.