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

sTeX folding mode #4498

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@edemaine

edemaine commented Jan 17, 2017

CodeMirror's fold mode is awesome! There are built-in folding modules for code, braces, Markdown, XML/HTML, but not for sTeX. (For comparison, Ace supports all of these.) This PR fills this hole by providing folding support in sTeX/LaTeX.

Conveniently, @williamstein already wrote this code; I'm just putting this together into a PR (and converting from CoffeeScript to JavaScript). See sagemathinc/cocalc#1509 which requests that I do this.

I'm new to the CodeMirror source so let me know if I missed anything. In addition to the new fold module, I added to the obvious demo.

@marijnh

This comment has been minimized.

Show comment
Hide comment
@marijnh

marijnh Feb 6, 2017

Member

Hi. Thanks for the PR. But to keep the main distribution maintainable by a small team, we're tightening the criteria for what goes into the main distribution, and are encouraging people to maintain code like this in separate NPM modules. (We will, eventually, also split the current main package into smaller modules.) So it'd be great if you could put this into a separate repository and publish it to NPM. It's not in scope for the main distribution.

Member

marijnh commented Feb 6, 2017

Hi. Thanks for the PR. But to keep the main distribution maintainable by a small team, we're tightening the criteria for what goes into the main distribution, and are encouraging people to maintain code like this in separate NPM modules. (We will, eventually, also split the current main package into smaller modules.) So it'd be great if you could put this into a separate repository and publish it to NPM. It's not in scope for the main distribution.

@marijnh marijnh closed this Feb 6, 2017

@edemaine

This comment has been minimized.

Show comment
Hide comment
@edemaine

edemaine Feb 6, 2017

OK. Do you have a suggested naming for the NPM package, e.g. codemirror-stex-folding? Or would you prefer a more "contributed" namespace?

edemaine commented Feb 6, 2017

OK. Do you have a suggested naming for the NPM package, e.g. codemirror-stex-folding? Or would you prefer a more "contributed" namespace?

@marijnh

This comment has been minimized.

Show comment
Hide comment
@marijnh

marijnh Feb 6, 2017

Member

I'd go with codemirror-fold-stex, so that other folding modules can share the codemirror-fold- prefix.

Member

marijnh commented Feb 6, 2017

I'd go with codemirror-fold-stex, so that other folding modules can share the codemirror-fold- prefix.

@edemaine

This comment has been minimized.

Show comment
Hide comment
@edemaine

edemaine Feb 6, 2017

Ah yes, that is better. FWIW, markdown-it could be a good model here, which has several self-owned plug-ins and several contributed plug-ins, including links to the latter. In any case, I'll keep you posted about an NPM module in case you want to assemble a list of links somewhere.

edemaine commented Feb 6, 2017

Ah yes, that is better. FWIW, markdown-it could be a good model here, which has several self-owned plug-ins and several contributed plug-ins, including links to the latter. In any case, I'll keep you posted about an NPM module in case you want to assemble a list of links somewhere.

@adrianheine

This comment has been minimized.

Show comment
Hide comment
@adrianheine

adrianheine Feb 6, 2017

Contributor

We already have a list which definitely could be improved.

Contributor

adrianheine commented Feb 6, 2017

We already have a list which definitely could be improved.

@edemaine

This comment has been minimized.

Show comment
Hide comment
@edemaine

edemaine Feb 6, 2017

Cool, thanks! I'll just add to that Wiki once I get around to packaging (maybe making a section for fold-related plugins).

edemaine commented Feb 6, 2017

Cool, thanks! I'll just add to that Wiki once I get around to packaging (maybe making a section for fold-related plugins).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment