Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SublimeText Plugin #35

Open
0xdevalias opened this issue Apr 25, 2024 · 3 comments
Open

SublimeText Plugin #35

0xdevalias opened this issue Apr 25, 2024 · 3 comments

Comments

@0xdevalias
Copy link
Contributor

This one might be a stretch of an ask, but I figured it can't hurt to at least put it out there.

There's a SublimeText plugin called MarkdownTOC that seemed pretty cool, but it suffers from some bugs (including one that you fixed in this project: #26 / #29) that makes it unusable for some of my workflows. Looking at their repo, there hasn't been any activity for ~3 years, so it seems unlikely that any fixes will land:

So I was wondering if maybe bitdowntoc could maybe be wrapped up into a SublimeText plugin.

It seems MarkdownTOC is MIT licensed, so at least in theory that could probably be forked and reworked as a basis if needs be:

SublimeText plugins are Python based, so i'm not sure how hard it would be to integrate bitdowntoc in that regard (without just shelling out to a binary/etc)

Totally understand if this is too out of scope for this project, or would be too much work, but figured I would ask in case :)

@0xdevalias
Copy link
Contributor Author

0xdevalias commented Apr 25, 2024

SublimeText plugins are Python based, so i'm not sure how hard it would be to integrate bitdowntoc in that regard (without just shelling out to a binary/etc)

Seems there is some background interest in cross-compiling Kotlin to Python, but not sure if it's gotten to a usable state over the years:

Sounds like maybe it's still in the 'developing'/'experimental idea' stage; so probably not usable for this yet unfortunately:

@derlin
Copy link
Owner

derlin commented May 5, 2024

These are very interesting resources and ideas. Thank you for this!

However, porting it to VS Code first would maybe make more sense, as I believe it is now more popular than Sublime Text?
Wondering also if those editors do (or will) support Web Assembly. This would make the porting way easier (and would be quite cool to implement).

@0xdevalias
Copy link
Contributor Author

porting it to VS Code first would maybe make more sense, as I believe it is now more popular than Sublime Text?

@derlin From a raw usage/popularity standpoint, that is probably true. Though personally I don't find myself using VS Code much. I like the 'fast/lightweight' aspect of SublimeText as my 'text editor', whereas when I reach for a more 'heavy weight' IDE, I tend to use JetBrains products rather than VS Code; particularly as they tend to be more 'batteries included'.

It looks like VS Code extensions are nodeJS based:

One of the reasons I was thinking that it might be quicker to do the SublimeText plugin is that you could (theoretically) fork the existing one, and just edit that to integrate with bitdowntoc's semantics.

From a quick skim, it seems it only implements 2 main commands (insert and update):

Which both seem to basically share the one implementation (update just calls insert):

Given most of the logic of insert is probably already self-contained within bitdowntoc itself, the implementation there would probably be fairly straightforward.

The last bit seems to be the autorunner, which just seems to be a small bit of code that defines what sorts of files/when to execute the update command automagically:


Wondering also if those editors do (or will) support Web Assembly.

@derlin That's not something I've looked into before, but from a quick google:

Another alternative could be to just shell out to the existing bitdowntoc binary from the main plugin code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants