如何设置Word Wrap&通过编辑用户设置文件/用户首选项文件中的代码折叠在jupyterlab中

发布于 2025-02-13 02:21:06 字数 1694 浏览 3 评论 0 原文

我在标题中显示的问题有两个子问题:

  1. jupyterlab store 系统默认用户preference files?

    • 在GUI的高级设置编辑页面/笔记本中显示为Bellow图片中的显示。
    • “在此处输入图像描述”
    • 我可以找到的最类似的文件是/usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json ,但我不是当然,如果此文件是系统默认的用户偏好
  2. 我想通过编辑配置文件来自定义自己的jupyterlab设置我在网站上发现了几个文件路径建议:

    1. /usr/local/share/jupyter/lab/settings/overrides.json
    2. 〜/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings
    3. /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json
    • 我的问题是:如果我想调整设置(如 代码折叠 line包装?或以上都没有,我应该使用其他文件?

ps。因为我在Docker容器中启动Jupyterlab,然后经常重建容器,所以我想通过编辑配置文件来更改默认设置,而不是每次在GUI中更改这些设置。

谢谢大家。

参考:

I have two sub-questions of the question shown in title:

  1. Where does JupyterLab store System Defaults and User Preference files?

    • Which are displayed in the GUI's Advanced Settings Edit page/Notebook as show in bellow picture.
    • enter image description here
    • The most similar file I can find is /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json, but I'm not sure if this file is for System Defaults or User Preference or neither
  2. I want to customized my own JupyterLab settings by editing the config file, and there are several file path suggestion I found in websites:

    1. /usr/local/share/jupyter/lab/settings/overrides.json
    2. ~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings
    3. /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json
    • My question is: Which correct file should I edit if I want to adjust settings like
      code folding, line wrapping? Or none of above, there is other file I should use?

PS. Because I start JupyterLab in a docker container, and I rebuild the container frequently, I want to change the default settings by editing the config file instead of changing these settings in the GUI every time.

Thank you all.

ref:

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终难遇 2025-02-20 02:21:06

codefolding & WordWarping 设置与Jupyterlab 扩展 - @jupyterlab/notebook-extension 插件 - >跟踪器

有两个Jupyter Lab用户设置文件,您可以编辑以调整代码折叠设置。

因此,有两个选项,您可以选择其中之一:

The codeFolding & wordWarping settings are related to the jupyterlab extension@jupyterlab/notebook-extension and the plugintracker.

There are two Jupyter Lab User Setting files you can edit to adjust codeFolding setting.

So there are two options, you can choose one of them:

  • file 1: ~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings

    According to the documents of jupyter lab:

    By default, the location is $HOME/.jupyter/lab/user-settings/, where
    $HOME is the user’s home directory. This folder is not in the
    JupyterLab application directory because these settings are typically
    shared across Python environments. The location can be modified using
    the JUPYTERLAB_SETTINGS_DIR environment variable.

    JSON5 files are automatically created in this folder recording the
    settings changes a user makes in the JupyterLab Advanced Settings
    Editor. The file names follow the pattern of
    <extension_name>/<plugin_name>.jupyterlab-settings.

    So we should edit ~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings.

    Any settings you write in this file, would override the default settings

  • file 2: /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json
    We can also edit /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json.

    But by editing this file, you are change default settings directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文