Is there a way to default to “Replace in all cells” in the “Find and Replace” in jupyter?

后端 未结 4 872
滥情空心
滥情空心 2021-02-02 07:45

I usually want to find and replace all, but it looks like it has been set to current/highlighted cell only (https://github.com/jupyter/notebook/pull/2131). jupyter also doesn\'t

4条回答
  •  名媛妹妹
    2021-02-02 08:30

    I just had to do it urgently so shut down the notebook kernel did it from the terminal with sed like this:

    sed -i "" 's/oldword/newword/g' mynotebook.ipynb
    

    That was on a mac which am using at the moment, but if you do it on ordinary linux the "" should be left out ie

    sed -i 's/oldword/newword/g' mynotebook.ipynb
    

    First time I ever needed to do such a thing in years but if it happened more often would be good if it could be done from the browser.

提交回复
热议问题