Closed dschick closed 4 years ago
Hi @dschick,
Can you be more specific as to what you mean by a comment/uncomment shortcut? Commenting and uncommenting where exactly?
@NoahStapp there is actually a jupyter notebook extension https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/comment-uncomment So I would like to comment/uncomment code in the notebook cells with a shortcut like in spyder, etc
In notebooks the shortcut Control-Slash block comments code. Do you want to be able to change it, or are you looking for that command in general?
I actually would like to change that command, because on a non-english keyboard "slash" is not directly available which makes it hard to use this shortcut
Same here! On the Swedish keyboard you have to press Shift + 7
to get /
and of course pressing Ctrl + Shift + 7
does not work.
FYI, these shortcuts are defined in the codemirror setup: https://github.com/jupyterlab/jupyterlab/blob/156a569cae094edebfbd7a4a7a18aeccbeec1705/packages/codemirror/src/factory.ts#L24-L25 and https://github.com/jupyterlab/jupyterlab/blob/156a569cae094edebfbd7a4a7a18aeccbeec1705/packages/codemirror/src/factory.ts#L34-L35
In particular, these don't use the jupyterlab application-wide keyboard shortcut system, so changing these shortcuts would require some work in JupyterLab. Could you open an issue in JupyterLab about changing these shortcut keys?
@dschick were you able to use the shortcut in non-English keyboard?
@gustnt nope. @jasongrout I linked this issue to https://github.com/jupyterlab/jupyterlab/issues/4778 So we could close it here I guess?
Cheers! Thanks for cross-referencing, @dschick. Let's close it here.
thanks for the great extension! Would it be possible to add a comment/uncomment shortcut as well?