How to wrap code in cells on JupyterLab Version 1.1.4

☆樱花仙子☆ 提交于 2021-02-11 02:47:35

问题


I am simply trying to get Jupyterlab Version 1.1.4 to wrap code in cells.

I use the AdvancedSettingsEditor to implement the solution found here: Enable word wrap in JupyterLab code editor

However I get an error that

codeCellConfig is not a valid property

and the AdvancedSettingsEditor will therefore not permit me to save the updated config file.

If I could see the list of valid properties (perhaps dependent on JupyterLab version), I'd be able to do some trial and error. However I have not been able to find such a list.

I put the following text in the file opened for me by the AdvancedSettigsEditor:

{
//"definitions":  {
    //"editorConfig":  {
      //  "properties":  {
           "codeCellConfig":  {
                "lineWrap": "wordWrapColumn",
                 "wordWrapColumn": 80
            }
        //}
    //}
//}
}

The commented out properties were all attempts to make this work given the information found here: https://github.com/jupyterlab/jupyterlab/issues/5277

They all fail with the same error

<whatever_the_property_name> is not a valid property

Questions:

  • How can one get Jupyterlab Version 1.1.4 to wrap code in code cells?
  • Where does the config file actually live (on Windows)?
  • Where can one find a list of properties valid for this config file?

回答1:


This is a partial answer.

When I posted the above question I failed to notice that despite appearances, the Advanced Settings Editor doesn't actually open a text file for you to change any setting you like.

Rather, it gives you a fragment of a text file. Which fragment depends on the category of setting selected from a list which appears on the left hand side. The beguiling appearance of what seemed to be a free form text file on which any setting could be changed led me to overlook the list on the left hand side.

Once I noticed said list, I selected "Notebook" from it and this is where the "codeCellConfig" setting can be amended without complaints.

One question remains however:

  • Where can one find a list of all the properties for each setting category and all their valid settings?


来源:https://stackoverflow.com/questions/58768173/how-to-wrap-code-in-cells-on-jupyterlab-version-1-1-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!