How do I quickly annotate Python code?

Source: Internet
Author: User
In Python's idle in front of each line plus # can be turned into comments do not run but more sentences when a row of good trouble ah there is no quick way to add a number of lines in front of #

Reply content:

With 3 single quotes, wrap what you want to annotate and add the following 3 single quotes:

Similar:
'''
Print hohohoho~ Happy new year~
"Using Eclipse + Pydev, select the code you want to annotate, press and hold" ctr+/" to quickly comment and press again to cancel the comment. ""
"" Alt+3, alt+4 Comment, uncomment you select the line you want to comment on, and then press ctrl+/there is no code to terminate the comment, similar to the __end__ in Perl, tell the compiler to start here is not the code used
'''
'''
Vim block operation. Five seconds to fix it. In the interface that VI or VIM opens:

Single-line comment, add "#" to the front of the code;
Multiline comments, with 3 single or double quotation marks at the start and end positions. Without any configuration of vim, you will be able to fulfill your needs.
I don't know if I'm uploading gif. First put a chain to the vim-pass the graph bed
The operations were
1.Ctrl + V, select comment lines
2.shift + I, enter insert mode
3. Enter #
4ESC Exit Insert Mode
Multi-line Comment completion
Dismiss multiple lines of comment
1.Ctrl + V, select comment lines
2.x
Complete

Have time to introduce a super-awesome vim comment plugin currently in use
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.