Support setext headings (underlined with `===` or `---`) in Toggle heading
See original GitHub issueWhat 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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Third level Setext-style headings with ~ - Extensions
The first style uses underlines, i.e. repeated characters (e.g. equals =, hyphen - or tilde ~, usually at least two or four times)...
Read more >Setext headings
A setext heading underline is a sequence of at least 3 = characters or a sequence of - characters, with no more than...
Read more >Usage - MarkdownEditing - GitHub Pages
MarkdownEditing assists with maintaining width of underlined headings during typing. Just hit Tab after - or = and underline width is adjusted to...
Read more >Markdown All in One - Web - Visual Studio Marketplace
Extension for Visual Studio Code - All you need to write Markdown (keyboard shortcuts, table of contents, auto preview and more)
Read more >Tutorial 17.3 - Markdown and Pandoc
Level 1 headings are specified by underlining the heading with a row of ... Setext-style headings only support level 1 and level 2...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.If I understand correctly, this request is to add setext heading support to
toggleHeadingUp()
andtoggleHeadingDown()
?