a/packages/codemirror-extension/src/index.ts +++ b/packages/codemirror-extension/src/index.ts -39,6 +39,8 namespace CommandIDs ) + +Ī keyboard shortcut such as the below will enable Ctrl/Cmd ' to comment code in a text file editor, in addition to Ctrl/Cmd /. Yes, this is the common and only way to comment out a block of code in Python that most of the developers know. In JetBrains P圜harm on Mac use Command + / to comment/uncomment selected block of code. ![]() Likewise, if you use vi or Emacs you can create a macro to do this for you for a block of code. It used to be in one of the drop down menus but is no longer there. Help This issue is a perrennial source of StackOverflow questions (e.g. I want to comment out a block of multiple lines in Jupyter Notebook, but can't find out how to do that in this current version. If you want to comment out multiple lines of code, then you have to add (hash) at the start of each line of the code. Many Python IDEs can add for you on each selected line, and remove them when un-commenting too. In software, its said that all abstractions are leaky, and this is true for the Jupyter notebook as it is for any other software.I most often see this manifest itself with the following issue: I installed package X and now I cant import it in the notebook. ![]() ![]() You cannot comment out a block of the code in Python. Diff -git a/packages/codemirror-extension/src/index.ts b/packages/codemirror-extension/src/index.ts Block comment in Python: Python does not support block comments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |