-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add Markdown File Links Plugin #8902
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: SUCCESS
Repo link: Markdown File Links
Packages added:
- Markdown File Links
Processing package "Markdown File Links"
- All checks passed
Interesting, looks useful 👍🏻 One thing I'd like to see is a command palette entry in addition to the context menu entry, to make it easy to use the functionality from the keyboard (and also to consistently have all functionality exposed via the palette). Your is_markdown_file method looks for file extensions. That means that files without extension (that are configured to open as markdown, for instance some README files) are not recognized and the feature won't work there. Or maybe the user is using files with the md extension with a different syntax (I seem to remember more languages use that extension, although markdown is definitely more common). A more reliable way of checking the filetype or syntax of a file is to use match_selector(), passing it a 0,0 point (ie. the first position in the file) and matching for the |
Thanks for the feedback @braver
How would you imagine this would work? The best thing that comes to mind is this flow:
Can you give me an example of doing this? It's been pretty difficult for me in general to grok the Sublime plugin API 😅 |
I can imagine, it's huge!
You could just, once the command is triggered, get the user's current selection, which is a set of regions, where there start and end of each region is a "point" similar to the
|
The functionality of this plugin is more or less already part of MarkdownEditing. It's called "wiki links". |
Thanks @deathaxe . I've been using your plugin for so long and had no idea this functionality was included already. I noticed it was buried at the bottom of the Usage page!. Anyway, if it's preferable to close this PR, please proceed @braver |
Well we can always reconsider if the demand arises, but for now let’s close and not add something new to package control. |
My package is Markdown File Links
There are no packages like it in Package Control.