Skip to content

Support cell Scope Type in Plaintext Notebooks #1980

Open
@C-Loftus

Description

@C-Loftus

Plaintext Notebooks along the lines of https://github.com/mwouts/jupytext are a good choice for voice coding instead of the specialized editors like the VSCode Jupyter Extension. It is easier to move cells around and manipulate text given the fact that they are all part of the same file (whereas in the extension each cell is its own pseudo file)

Currently the cell scope type does not support these sorts of plaintext notebooks where each cell is created with the characters # %%
We would also need to support # %% [markdown] to declare a markdown block.
According to the behavior of the vscode implementation, a cell is defined as having exactly one leading # then at least two % symbols on the same line, directly after, not including whitespace. There can be any number of spaces between these declaraction characters and any character after the last %

Examples of valid cells (each of these will create a new cell and cause the visual studio code extension to label it as such)

    # %%

    # %% test

    # %%%%% test2

    # %%%

    #           %%%%%

    # %% [markdown]

Example of Invalid Cells

    ##%%

    #### %%

    # test # %%

    ### %%% test

An example of using it can be found below
image
More documentation can be found here: https://code.visualstudio.com/docs/python/jupyter-support-py

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang-pythonIssues related to Python programming language support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions