Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut key for commenting out lines of Python code in Spyder

Tags:

python

spyder

I recently changed from the Enthought Canopy Python distribution to Anaconda, which includes the Spyder IDE.

In Canopy's code editor, it was possible to comment and uncomment lines of code by pressing the "Cntrl+/" shortcut key sequence. In Spyder I was unable to find an equivalent shortcut key in the introductory tutorial.

Is there a shortcut key for commenting and uncommenting code in Spyder?

like image 707
Kurt Peek Avatar asked Apr 15 '16 10:04

Kurt Peek


Video Answer


1 Answers

  • Single line comment

    Ctrl + 1

  • Multi-line comment select the lines to be commented

    Ctrl + 4

  • Unblock Multi-line comment

    Ctrl + 5

like image 58
Suresh2692 Avatar answered Sep 22 '22 09:09

Suresh2692