简体   繁体   English

如何在 Pycharm 中同时编辑多行

[英]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.

相关问题 如何在 Pycharm 中一次缩进多行 - How to indent multiple lines at once in Pycharm 如何同时检测python中的多个按键? - How do I detect multiple keypresses in python all at the same time? 如何同时打开多个 Tk() windows? - How do I open multiple Tk() windows at the same time? 多个循环/线路同时 - Multiple loops/Lines at the same time 如何在PyCharm中运行包含同一项目中另一个脚本的脚本? (两个脚本都在PyCharm中) - How do I run a script in PyCharm that incorporates another script from the same project? (both scripts are in PyCharm) 如何在 PIL 中编辑多个文件 - How do I edit multiple files in PIL 如何同时使用for循环读取特定的多行? - How to read specific multiple lines using for loop at the same time? Pyplot - 当一个轴的列表长度不一致时,我如何在同一图表上 plot 多条线? - Pyplot - How do I plot multiple lines on the same graph when list lengths for one axis are not consistent? 我如何在 plot 中使用 matlotlib 在 3d plot 中从同一原点开始多条线? - How do i plot multiple lines from a same point of origin in a 3d plot using matlotlib in python? 如何在可绘制的时间序列图表中添加和定义多条线? - How do I add and define multiple lines in a plotly time series chart?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM