Multi cursor/selection editing #69
Replies: 13 comments 17 replies
-
Good decision. |
Beta Was this translation helpful? Give feedback.
-
There has been significant progress in the multicaret branch. The aim is to match the related features of VS-Code. The hard part is done. The following is meant to help track the progress made.
|
Beta Was this translation helpful? Give feedback.
-
Looks amazing! I haven't used multi-caret very much (besides some of the Delphi editor options.) I found the multi-caret mouse selection to work intuitively and well. I also tested some of the undo/redo and it looks great. I'm not sure exactly how keyboard multi-caret movement is supposed to work (particularly in how to end the multi-caret mode without clicking) but I'm happy to test or help in any way I can. Great job! |
Beta Was this translation helpful? Give feedback.
-
Column selection using the mouse implemented. Shift+Alt+mouse down/move. |
Beta Was this translation helpful? Give feedback.
-
Key column selection commands implemented: AddKey(ecSelColumnLeft, SYNEDIT_LEFT, [ssShift, ssAlt]);
AddKey(ecSelColumnRight, SYNEDIT_RIGHT, [ssShift, ssAlt]);
AddKey(ecSelColumnUp, SYNEDIT_UP, [ssShift, ssAlt]);
AddKey(ecSelColumnDown, SYNEDIT_DOWN, [ssShift, ssAlt]);
AddKey(ecSelColumnPageUp, SYNEDIT_PRIOR, [ssShift, ssAlt]);
AddKey(ecSelColumnPageDown, SYNEDIT_NEXT, [ssShift, ssAlt]); |
Beta Was this translation helpful? Give feedback.
-
Implemented adding to selections the next matching word and selection of all matching words. Select Word at Cursor: Shortcut Ctrl+W. If you press it again it adds to selection the next match. Press it again and adds the next match etc. Select Matching Text: Shortcut Shift+Ctrl+W Selects all text matching the current selection. If there is no selection it selects all occurrences of the word at cursor. The above provide a way to achieve the "Sync Edit" functionality of Delphi. |
Beta Was this translation helpful? Give feedback.
-
Video Tutorial showcasing the multi-caret, multi-selection capabilities of SynEdit. (They are using PyScripter which is based on SynEdit). |
Beta Was this translation helpful? Give feedback.
-
I have added multi-caret programming and compatibility notes. |
Beta Was this translation helpful? Give feedback.
-
Looks and works great! Nice documentation too, that really helps. I did notice one problem. If you make multiple carets and then unfocus the editor (by changing applications or opening a modeless form and switching to it) then if you scroll the editor using the mousewheel then the carets appearance becomes unsynchronized from the scrolling (it looks like the caret positions aren't moving with the text in that case.) Once you refocus the editor and cause a refresh it seems to fix itself. I've also seen it happen when programmatically moving the caret and selection (using a modeless search and replace type feature.) Let me know if you need more details! |
Beta Was this translation helpful? Give feedback.
-
Got a chance to do some testing of all the new features including multi-caret editing, zoom, selection caret-arrow changes (this is a small but really nice change btw), new structure highlighting, and to a lesser extent, the annotated scrollbar feature. I didn't notice any problems at all. Amazing work and I think it's mergeable at this stage (which I think will bring much more feedback.) |
Beta Was this translation helpful? Give feedback.
-
The multicaret branch was merged back to master and deleted. |
Beta Was this translation helpful? Give feedback.
-
The multi-caret stuff is fantastic! One feature that I'd like to see if possible is allowing an initial selection combined with Ctrl-W (ecSelWord) to then add a new selection of the next occurrence of the selected text. Basically, the same as the current Ctrl-W behavior but allowing an initial and possibly non-word-oriented selection. This would match VSCode's Ctrl-D behavior when a selection already exists. Btw, are feature requests considered "issues" with GitHub? I wasn't sure a good place to put this. Thanks, as always! |
Beta Was this translation helpful? Give feedback.
-
Have you guys noticed that Shift+Alt for column selection is the default combination in Windows for next type language (if you have multiple languages set up) I had Icelandic as primary and I also had UK English and US English |
Beta Was this translation helpful? Give feedback.
-
IMO, one of the most desirable missing features of SynEdit is #2. In case you are not familiar with multi cursor/selection, the following two links will give you a good idea:
What SynEdit offers instead is the column mode, which, although useful, is significantly underpowered compare to the above.
My proposal is to replace the column/line modes with proper multi cursor/selection editing. Preliminary work has been already done, and I expect to make good progress in the near future.
@MShark67 @JaFi-cz @groehner @vincentparrett Any thoughts/feedback
Beta Was this translation helpful? Give feedback.
All reactions