简体   繁体   English

是否可以在TextWrangler中阻止注释Python代码

[英]Is it possible to block comment Python code in TextWrangler

I am using the excellent "Learn Python The Hard Way" tutorials and i am wondering does anyone know if its possible to create block comments in it? 我正在使用出色的“学习Python的艰难方法”教程,并且我想知道是否有人可以在其中创建块注释吗? I note from a similar question here that it does not seem to be possible in Python but that some editors have implemented methods to do it. 我从一个类似的问题,注意这里 ,这似乎并不可能在Python,但有些编辑已经实现的方法来做到这一点。

EDIT I have edited the above question to provide more detail and to use the term "block comment" insted of "block quote" 编辑我已经编辑了上面的问题,以提供更多详细信息,并使用由“块引用”代替的“块注释”一词

Thanks 谢谢

This is a duplicate question: Commenting/Uncommenting a block of Python code in TextWrangler 这是一个重复的问题: 在TextWrangler中注释/取消注释Python代码块

However, I recommend you not bother with those 9 steps and instead just download sublime text 2 . 但是,我建议您不要理会这9个步骤,而只是下载崇高的文字2

It is an excellent editor for Python (I believe that's the language its written in, in fact.) and you can accomplish what you're looking for by simply highlighting the code block and using the comment/uncomment keyboard shortcut: Ctrl+Shift+/ 它是Python的出色编辑器(实际上,我相信这是其编写的语言。),只需突出显示代码块并使用注释/取消注释键盘快捷键,即可完成所需的内容: Ctrl+Shift+/

In textwrangler on a mac, this worked for me. 在Mac上的textwrangler中,这对我有用。 Highlight the text you want to comment out. 突出显示要注释掉的文本。 Hold down the Command Key and hit /. 按住Command键并按/。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM