hoishing / cell-navigation

cell-navigation plugin for Atom text editor, companion of Hydrogen / Jupytext
MIT License
5 stars 4 forks source link

Grammar-Dependent Cell Definitions #1

Open cocopops17 opened 5 years ago

cocopops17 commented 5 years ago

I'm loving this package, although I primarily use Atom for Stata code, such that Hydrogen recognizes cells as defined using the default Stata commenting method of "// %%". I was able to edit the package code successfully to accommodate this by changing the regexp and all cell definition references from "# %%" to "// %%". However, for any future updates, it would be nice to have an option to change the comment-defining character from # to something else (for any possible language), or possibly make the package adjust to the current grammar.

hoishing commented 5 years ago

yes, maybe I can add an option to change the cell delimiter inside the package setting page.

JamesOwers commented 4 years ago

+1 - I'd love to use this with pweave files, my code chunks look like:

```python, ... chunk options ...
print('hi')

But it's worth noting there are quite a few different formats e.g. noweb

<<python, ... chunk options ... >> print('hi') @



I guess these may be more tricky since the start and end of the chunks work differently to # %% format...If I can help code things up, do feel free to reference me in an issue.

More examples here: http://mpastell.com/pweave/usage.html