[Tutor] multiline comment in Python

tpc at csua.berkeley.edu tpc at csua.berkeley.edu
Thu Sep 4 16:14:01 EDT 2003


hi Danny, thanks I did not know Emacs had that feature.  I was wondering
how to comment out multiple lines if I use vi on the console.  I know 'I'
inserts at the beginning of the current line, although I don't know how
to do so across multiple lines.  That's where a feature like C
and Java style multiline commenting would come in handy, although I do
see your point and have never had to comment out a code block that already
had multiline comments.

On Thu, 4 Sep 2003, Danny Yoo wrote:

>
>
> On Thu, 4 Sep 2003 tpc at csua.berkeley.edu wrote:
>
> > hello all, I am wondering if there is anything other than triple quotes
> > for multiline commenting blocks of code.
>
> Hmmm... what kind of text editor are you using?  In the Emacs text editor,
> there is a single command to do block commenting
>
>     C-c #
>
> which is very convenient to work with.  Uncommenting a block is also not
> too bad,
>
>     C-u C-c #
>
> But that's just Emacs.  Tell us which text editor you're using; I'm
> positive someone here can help you with the correct key contortions.
>




More information about the Tutor mailing list