[英]How do I edit multiple lines at the same time in Pycharm
How do I erase all the angle brackets on all 6 lines at the same time?如何同时擦除所有 6 行上的所有尖括号? I am using Pycharm and studying off of notes in Notepad++ >>>problem我正在使用 Pycharm 并在 Notepad++ 中学习笔记>>>问题
The input is:输入是:
[input image][2]
The expected output is:预期的输出是:
zork = 0
print('Before', zork)
for thing in [9, 41, 12, 3, 74, 15]:
zork = zork + thing
print(zork, thing)
print('After', zork)
please forgive the noobness请原谅菜鸟
Pycharm support multiple cursors . Pycharm 支持多个游标。 You can position your cursor at the start of the top line, double-tap-and-hold option, then press the down arrow until you're at the bottom line.您可以将光标放在顶行的开头,双击并按住选项,然后按向下箭头直到您到达底行。 Then tap fn-delete 3 times and all of the cursors will delete three characters.然后点击 fn-delete 3 次,所有光标将删除三个字符。
This was tested on MacOS.这是在 MacOS 上测试的。 Your platform may have slightly different key combinations.您的平台的组合键可能略有不同。 I have linked the docs for more info.我已链接文档以获取更多信息。
there is a shortcut for this called square selection .有一个称为方形选择的快捷方式。 I usually use place the cursor on the starting point from where I have to delete the text, alt+ left_shift and click and scroll to the end where u want to delete.我通常使用将光标放在我必须删除文本的起点上,alt+left_shift 并单击并滚动到您要删除的末尾。
It should work perfectly in your case (Hopefully).它应该在您的情况下完美运行(希望如此)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.