Vscode-markdown: Support setext headings (underlined with `===` or `---`) in Toggle heading

Created on 26 Aug 2020  ·  5Comments  ·  Source: yzhang-gh/vscode-markdown

What is the problem?

When using C-} to promote the line under cursor to H1 or H2 and C-{ to demote to H1 or H2, # and ## are used. This is not a problem. The problem is that there doesn't seem to be an option to use === and --- in lieu of these.

How can I reproduce it?

Enter "Some Text", then C-}. This will convert to "# Some Text".

Is there any error message in the console?

No.

Suggested Feature

use-fancy-headings

If this feature were enabled the workflow would follow:

enter "Some Text"

Some Text

C-}

Some Text
=========

modify to "Some Different Text"

Some Different Text
=========

C-}, now H2, and modification updates number of ='s or -'s

Some Different Text
-------------------

Is this even possible? If so, I'd be happy to work on it. If it exists already, I'm sorry for the entry.

Help wanted Feature

All 5 comments

If I understand correctly, this request is to add setext heading support to toggleHeadingUp() and toggleHeadingDown()?

I think so

Seem like this would also be nice as an autocompletion feature.

When typing a setex heading underline it should offer to complete based on the length of the heading above.

After typing a valid setex heading underline offer to complete to heading length by repeating what ever valid underline has been used be that (-)------- , (=)=====, (- )- - - - - -, (-- )-- -- --, etc.

Sounds better

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lengyingzi picture lengyingzi  ·  5Comments

FrancesCoronel picture FrancesCoronel  ·  4Comments

MonsieurMan picture MonsieurMan  ·  3Comments

chuyangliu picture chuyangliu  ·  5Comments

akshaybabloo picture akshaybabloo  ·  3Comments