question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gavbarnettcommented, Feb 8, 2021

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.

1reaction
Lemminghcommented, Aug 28, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found