Giter VIP home page Giter VIP logo

Comments (5)

sdwolfz avatar sdwolfz commented on July 24, 2024 1

Closing this as I'm no longer interested in the feature, and I won't be able to work on it.

from markdown-toc.

ardumont avatar ardumont commented on July 24, 2024

Let me know what you think!

Interesting!

I just think of the case of people already using the tool needs their buffer to migrate.
So from the top of my head, i see 2 possibilities, either:

  • migrate silently, markdown-toc-generate detects and adapt accordinly the new delimiter comment.
  • do not migrate and let the user decide to migrate or not (adding a new interactive command markdown-toc-migrate), keeping the actual behavior if not migrated, using the new one you propose if not migrated (seems not that nice though).

Well, feel free to choose then ;)

... but I don't make any promise on when this will be delivered.

Sure, to simplify and ease the time to market ;), you could split this into multiple PRs:

  • 1 would introduce the new comment (i used my complicated thing at the time to avoid clash, maybe that was dumb).

  • another one would introduce the parametric comment (hard part maybe?)...

But that's from the top of my head ;)

Cheers,

from markdown-toc.

sdwolfz avatar sdwolfz commented on July 24, 2024

The only problem I see is that currently settings are handled trough global settings in the emacs config, compared to local settings in the <!-- TOC --> comment.

I'll open a WIP PR when I start and document all the problems I hit there. This will end up being a breaking change, so it will need to be released as a major version increase, I'll see how easy it is to maintain compatibility.

from markdown-toc.

ardumont avatar ardumont commented on July 24, 2024

I checked the start of the code again, it's been a while since i looked, here are the customs to setup the start/end tags:

(defcustom markdown-toc-header-toc-start
  "<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->"
  "Beginning delimiter comment."
  :group 'markdown-toc)

(defcustom markdown-toc-header-toc-title
  "**Table of Contents**"
  "Title comment on TOC header."
  :group 'markdown-toc)

(defcustom markdown-toc-header-toc-end
  "<!-- markdown-toc end -->"
  "Ending delimiter comment."
  :group 'markdown-toc)

It's defcustom already so you might be able to check you can actually have what you want already (well the 1. part i mentioned at least ;) by changing to something like:

(custom-set-variables '(markdown-toc-header-toc-start "<!-- TOC -->")
                      '(markdown-toc-header-toc-title "")
                      '(markdown-toc-header-toc-end "<!-- TOC -->"))

Cheers,

from markdown-toc.

sdwolfz avatar sdwolfz commented on July 24, 2024

Don't forget about markdown-toc-user-toc-structure-manipulation-fn. I'll also need to analyze the other repos to find a list of common parameters, find their defaults and implement them. Anyway, I'll get back to you with mode details when I actually start working on it. Right now I only have a vague idea on what I will change and I might be wrong on my assumptions.

Side note, it would be nice if vim/sublime/intellij had similar functionality implemented. I might put it as a side goal to get all major editors in line with this approach. Starting off with atom and vscode since they were they already have some compatibility.

from markdown-toc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.