desolator_net_decker
desolator_net_decker

Reputation: 23

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? I am using Pycharm and studying off of notes in Notepad++>>>problem

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

Upvotes: 1

Views: 5660

Answers (2)

Francis Sunny
Francis Sunny

Reputation: 36

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.

It should work perfectly in your case (Hopefully).

Upvotes: 1

danielhoherd
danielhoherd

Reputation: 481

Pycharm support multiple cursors. 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.

This was tested on MacOS. Your platform may have slightly different key combinations. I have linked the docs for more info.

Upvotes: 2

Related Questions