You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a proposal to add the ability to jump from a fragment identifier to its header.
Since the table of contents can be generated as HTML inside a <details> tag, it would be nice to be able to jump from the generated <a href="#fragment">header text</a> links. It would also be nice to have the current cursor position added to the jumplist before jumping to the header. This way, one can jump back and forth between headers with `` / ctrl+O.
When the cursor is not currently positioned on a markdown/html link, it could default to using the first (fragment identifier) link found on the line. If executed and no link is present, nothing should happen.
Valid cursor positions
Markdown:
sample line with a [link](#to-a-heading)
valid position: ^^^^^^^^^^^^^^^^^^^^^
HTML:
sample line with a <a href="#to-a-heading"></a>
valid position: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Both of these should go to a heading with the content: "To a heading" within the document.
If the cursor is not on a link, scan the line from left to right and visit the first fragment link found.
If no valid link is found, do nothing.
settings
Aside from the base functionality, there should be a setting that allows you to opt-out of adding the cursor position before jumping to the jumplist in case you do not want the extra "junk" added. It could be located at:
letg:mkdx#settings.links.fragment.jumplist =1
The text was updated successfully, but these errors were encountered:
This is a proposal to add the ability to jump from a fragment identifier to its header.
Since the table of contents can be generated as HTML inside a
<details>
tag, it would be nice to be able to jump from the generated<a href="#fragment">header text</a>
links. It would also be nice to have the current cursor position added to the jumplist before jumping to the header. This way, one can jump back and forth between headers with `` / ctrl+O.When the cursor is not currently positioned on a markdown/html link, it could default to using the first (fragment identifier) link found on the line. If executed and no link is present, nothing should happen.
Valid cursor positions
Both of these should go to a heading with the content: "To a heading" within the document.
If the cursor is not on a link, scan the line from left to right and visit the first fragment link found.
If no valid link is found, do nothing.
settings
Aside from the base functionality, there should be a setting that allows you to opt-out of adding the cursor position before jumping to the jumplist in case you do not want the extra "junk" added. It could be located at:
The text was updated successfully, but these errors were encountered: