coteditor / CotEditor

Lightweight Plain-Text Editor for macOS
https://coteditor.com
Other
6.37k stars 431 forks source link

Add Insertion Point to All Selections #1562

Closed justinnoel closed 3 months ago

justinnoel commented 9 months ago

Is your feature request related to a problem? Please describe. The current "Select Rectangular Area" and "Edit Multiple Points" works well for a few lines of text. However, dozens or hundreds of lines, it is slow and tedious.

Other editors allow a single key combination to insert a cursor at the same column on each selected row. For example, Visual Studio Code has "Add Cursors to Line Ends ⌥⇧I".

Describe the solution you'd like Add A keyboard shortcut and menu item to add multiple insertion points to an entire selection at once.

1024jp commented 9 months ago

However, dozens or hundreds of lines, it is slow and tedious.

Humm, this year, CotEditor changed the implementation to hold multiple insertion points to support the new insertion point feature on macOS 14. Due to it, I can imagine it is now hard to have a large number of insertion points. However, I suppose, there is no way to detour it. Sorry. I personally recommend to utilize regex to insert the same text at a bunch of points at once.

Add A keyboard shortcut and menu item to add multiple insertion points to an entire selection at once.

Could you elaborate a bit more on your request? Is the “Add Cursors to Line Ends” command fulfill it straightforwardly?

By the way, CotEditor accepts the most of emacs key bindings. In addition, CotEditor has a command to add an insertion point above/below the current one by pressing Control-Shift-/ keys? Does it work for you?

Screenshot 2023-12-18 at 18 29 02
1024jp commented 9 months ago

Note: I also found the “Split Selection by Lines” command in Xcode.

Screenshot 2023-12-18 at 19 00 26
justinnoel commented 9 months ago

 Thanks so much for getting back to me. Here's a link to a short video to show the comparison between CotEditor and VS Code.    https://customer-2haawx7cuvbfttcn.cloudflarestream.com/f1234ddb514abcedf46e4828952ad92d/watch

1024jp commented 3 months ago

“Split Selection by Lines” command will be added to the Edit > Select menu in the next minor update, which will be released this autumn.