Anybody know how to comment-out a code block in JupyterLab 4?
It used to be: select code and then CTRL + /
Doesn’t seem to work when running Jupyter Lab 4 on Safari. Is there another magical key-combination?
I just tried it on MyBinder and it still works with that for JupyterLab 4.0.0 in Chrome. On a Mac in Chrome, it also works with Command
in place of CTRL
.
For Firefox with JupyterLab 4.0.0, I’m seeing CTRL + /
not work while Command + /
(on a Mac) continues to toggle the block comments.
I cannot test Safari because I’m limited in how much I can update without changing my OS at this time.
Related to this, I did see here where some key bindings in JupyterLab 4 changed as a result of migration from CodeMirror5 to CodeMirror6. Yet, the report behavior for toggling block comments seems more specific to browsers.
As a workaround you can use the triple double quotes before and after the code block. “”” code “””. Sometimes a tab is required before the triple quotes.