Is multi-caret editing bugged?
-
Not sure if it is a bug or default bevhaviour because I rarely use multi-caret editing in notepad++ and I also just updated to latest version.
Anyway, in the current version, when I create multiple carets and try to move it with arrow key (left / right / up / down), instead of moving the all the carets at the same time, it cancelled multiple carets leaving only one default caret. Multi-carets is very unusable without being able to move them together.
-
@earth-invader said in Is multi-caret editing bugged?:
I also just updated to latest version
That’s rather useless information without stating what version it is.
In 8.4.2, when I create multiple carets and then attempt to move them with the arrow keys, all the carets move together.
-
With Settings > Preferences > Editing > ☑ Enable Multi-Editing (Ctrl+Mouse click/selection) checkmarked on, when I create multiple carets and try to move with the arrow key, it moves all the carets at the same time.
As Alan wrote while I was typing this up, you need to give us more to go on – including the ?-menu’s Debug Info, for example:
Notepad++ v8.4.2 (64-bit) Build time : May 29 2022 - 16:47:30 Path : C:\usr\local\apps\npp\npp.8.4.2.portable.x64\notepad++.exe Command Line : Admin mode : OFF Local Conf mode : ON Cloud Config : OFF OS Name : Windows 10 Enterprise (64-bit) OS Version : 20H2 OS Build : 19042.1586 Current ANSI codepage : 1252 Plugins : mimeTools (2.8) NppConverter (4.4) NppExport (0.4)
I am curious whether you really had a multi-click-based Multi-caret, or if you accidentally used the Alt+Click+Drag to make a column selection – and without the BetterMultiSelection plugin, the column-selection will not move with arrows like Ctrl+Click multi-selection does.
-
Indeed. My multiple carets are created with shortcut ALT + SHIFT + UP.
Is there a reason to have “column selection” not built on multi-caret logic?
It is quite confusing to me. From end user perspective, they should be the same thing. -
Is there a reason to have “column selection” not built on multi-caret logic?
They are completely separate features, implemented separately with different purposes. That’s why they use different keystrokes to activate them (and the preference that you have to enable to get Multi-Editing is pretty explicit about what keystroke activates that feature, as is the Edit > Column Mode which informs you how to make a column selection).
That said, if you want Column Editing (the Alt+selection) to work more like Multi-Editing (Ctrl+Click), then install the BetterMultiSelection plugin: with that plugin installed, column selection will allow you to arrow around just like Multi-Editing does.
-
The BetterMultiSelection works although I don’t know why there is a keyboard shortcut to Column Mode but not the multi-caret mode. I tested that the Column/Multi-selection Editor. It also work on carets created with multi-carets. It seems to me the generic multi-caret can do everything Column Mode provide except it just missing a keyboard shortcut to spawn caret up/down. There seems to be no reason for the special “column mode” to exist.
Anyway, I notice when I undo something, the existing multiple-carets will get cancelled. This behaviour cause the user to have to recreate the extra carets.
Thanks
-
@earth-invader said in Is multi-caret editing bugged?:
t seems to me the generic multi-caret can do everything Column Mode provide except it just missing a keyboard shortcut to spawn caret up/down.
This interpretation is wrong on two counts.
First:
generic multi-caret can do everything Column Mode provide
Nope. The two are different modes, each with unique features. This animated screenshot shows some of the unique capabilities
Second:
except it just missing a keyboard shortcut to spawn caret up/down.
The arrow key isn’t “spawning” caret up/down in multi-edit mode, so claiming that the column mode is “missing” a shortcut to “spawn” caret up/down is showing a misunderstanding on your part.
When you have multiple carets due to multi-selection mode, you have multiple cursors and multiple selections on which you are doing the same thing – some of those things include the ability to move all those cursors simultaneously
However, when you have a column selection, you have a single selection (and it is implemented as such) and there is one tall caret that is always in the same column for every row of the rectangular selection. If it were possible to arrow that tall caret around, it would be extremely likely that you would quickly get into a situation where it would try an impossibility (arrowing right beyond the EOL on the top row while there are still characters left on subsequent rows: would you want the tall-caret to wrap to the next line, or extend beyond the end of the first line: and if you want one, I can guarantee that another user would equally vehemently want it the other way; with some thought, you can find many other such conflicts or impossibilities or difficulties).
To sum up this portion: the Column Mode and Multi-Select mode were added to accomplish different goals, and have different feature sets; neither mode can 100% replicate the features of the other, and as such, the developers would be alienating users of one to combine it into the other and claim that “it’s close enough to the same”.
But I doubt this rebuttal was effective on you (though I hope otherwise), and I am quite confident that any rebuttal that you make from this point on will be equally ineffective on me. So I will try to bow out of this portion of the conversation.
----
However, you were right when you said,
I notice when I undo something, the existing multiple-carets will get cancelled.
Indeed, it can cancel the multi-selection: I can see how that might be annoying. If you don’t like it, the Forum has a FAQ which explains where to submit an official bug report – because as fellow Notepad++ users, there is nothing that those of us who frequent the forum can do to change the codebase. If you do submit a bug report, keep it limited to that actual bug (“doing a multi-edit selection, making an edit, and then undoing part of the edit causes Notepad++ to leave multi-edit mode, forcing users to redo the multiple carets”); if you include your other complaints in the same issue, the issue as a whole is likely to get ignored, and that won’t do you any good to get the undo-cancels-multi-select fixed.
-
@peterjones said in Is multi-caret editing bugged?:
…when you have a column selection, you have a single selection…
Wellll… :
But it does know the difference, via :
If you don’t like it, the Forum has a FAQ which explains where to submit an official bug report – because as fellow Notepad++ users, there is nothing that those of us who frequent the forum can do to change the codebase.
This would probably end up needing to be a Scintilla request, I’d think.
-
Thanks for the explanation. I am not suggesting to merge column mode. I just doubted the existence of the the column mode as I don’t know the usefulness of the column mode before your show the demo and I think its good to have both of them.
The only thing I would like to see improvement is that there is no keyboard shortcut to create new carets like the column mode. People wanting to use multi-carets editing with keyboard shortcut are forced to use column mode with BetterMultiSelection plugin. That doesn’t feel like the right way to do it.
-
@earth-invader said in Is multi-caret editing bugged?:
The only thing I would like to see improvement is that there is no keyboard shortcut to create new carets like the column mode
But this doesn’t make any sense. How would you get your caret to the second position you’d want it placed using the keyboard? As soon as you start “arrowing” to start moving to the second position, you’ve moved the first place. Or is there yet another “mode” that would be invented to allow one to specify this? Seems complicated; let’s keep multi-selection as a mouse-only operation.
-
I suppose it just like how Column Mode works but in multi-caret mode instead?
like
Ctrl+Alt+ Up to spawn a caret above.
Ctrl+Alt+ Down to spawn a caret below.
both without moving the current caret.Isn’t this how many other text editors works?
e.g. Visual Studio, Sublime, you name it. -
@earth-invader said in Is multi-caret editing bugged?:
I suppose it just like how Column Mode works but in multi-caret mode instead
But that only works for the limited subset of multi-caret where those carets all start in a single column on adjacent rows. My screenshot example of putting the caret at the three
|
(which are not in the same column and can have lines in between that don’t contain the cursor) cannot reasonably* be done with keyboard only.If you want to convert a column selection to be a multi-selection (which is what BetterMultiSelection does in your use case), then use BetterMultiSelection – that’s one of the features it gives.
Some editors choose to implement every possible feature themselves (or forbid the feature altogether if they don’t want to implement it). Some choose to allow plugins to implement features that the main developers doesn’t feel like implementing. This discrepancy between users’ desires on the Column vs Multi-selection is why the Notepad++ have allowed plugins to customize things like this – because there won’t be agreement, and the developer doesn’t always think a feature belongs in the main application.
-
@earth-invader said in Is multi-caret editing bugged?:
Ctrl+Alt+ Up to spawn a caret above.
Ctrl+Alt+ Down to spawn a caret below.
both without moving the current caret.Isn’t this how many other text editors works?
e.g. Visual Studio, Sublime, you name it.I have never heard of this, so I jumped over to my already-running Visual Studio 2019 and tried it. Ctrl+Alt+up (or down) does nothing, so unless it is some special mode you have to enable (took a quick look at Text Editor Options but didn’t see it), the answer is Not for me.
I don’t know about Sublime, and I’ve never noticed such a thing in any other text editor I’ve used, and I’ve been using them since 1995.
And, total truth be told, I see little value in multi-carets (that aren’t part of a column block specification). Ok, well maybe if you want to Ctrl+click in several places and then start typing and have the same thing appear everywhere…but by the time I’ve done all that clicking around I might as well have just typed my text in place #1, copied it (by my custom word-yank macro), moved to place #2 and pasted it, moved to place #3 and pasted it, etc. Pretty much the same amount of clicking.
-
By the way, I now know that Ctrl+Alt+down on my setup by default flips the orientation on one of my screens … never knew this… :-)
-
Sorry my bad, Ctrl+Alt+Up/Down is the shortcut of sublime. VS shortcut is as shown above (if I haven’t changed it).
The main different of using mouse click and keyboard shortcut is that user can press and hold to spawn a lot of carets without keep clicking.
By the way, I now know that Ctrl+Alt+down on my setup by default flips the orientation on one of my screens … never knew this… :-)
O_o
-
@earth-invader said in Is multi-caret editing bugged?:
Isn’t this how many other text editors works?
e.g. Visual Studio, Sublime, you name it.Nope.
Ctrl+Alt+Up and Ctrl+Alt+Down do no such thing in Visual Studio, or in Notepad++ with BetterMultiSelection btw. (In VS, it seems to be accessing the little tabbar down arrow)
Alt+Shift+Up and Alt+Shift+Down start a column-mode selection in both Notepad++ and in Visual Studio. And in Visual Studio, after making a selection in column mode, if I right arrow or up arrow, it leaves column-mode selection mode and goes back to just moving a single cursor, which is exactly what Notepad++ does without the BetterMultiSelection:
(this screenshot was made without BetterMultiSelection plugin)
In my tests, NPP and VS do the same thing with that sequence.
-
Alt+Shift+Up and Alt+Shift+Down start a column-mode selection in both Notepad++ and in Visual Studio. And in Visual Studio, after making a selection in column mode, if I right arrow or up arrow, it leaves column-mode selection mode and goes back to just moving a single cursor, which is exactly what Notepad++ does without the BetterMultiSelection:
Probably because you are using an old version. ^_^"
I can 't post gif here so I uploaded it to google drive.
It now support everything I mentioned. Can also undo without leaving multi-caret.
-
Can you ever make a post that contains complete information on a point??
You hint that Peter is using an “old version” (of Visual Studio) but you don’t specify what “non-old” version you are using.
Nobody wants to (or can) access your google drive, so I can’t see what point you’re trying to make there.
You show a partial GUI of VS, but it took me a while to find the same thing in it (I’m not an expert user of VS for editing, as I prefer N++, so I don’t know its setup well); here’s a more complete UI for others that have it and might be interested (start with the Tools > Customize… menu command):
I pretty much agree with Peter’s prior statements. Anyway, the bottom line is I really still don’t understand what you are talking about; sorry to say (and I think I’ve put the effort in for trying to understand).
-
@alan-kilborn said in Is multi-caret editing bugged?:
You hint that Peter is using an “old version” (of Visual Studio)
I’m sure I do – we use a 2017 at work, and I knew there was a 2019 after (and when I looked it up after seeing the post, there is also a 2022 version, apparently). So I shouldn’t be surprised that there are new features; sorry for my out-of-date information.
And once again, in case I wasn’t clear enough for @Earth-Invader:
- The Notepad++ developers have made it quite clear that they are perfectly happy to leave certain features in the hands of plugin developers; since BetterMultiSelection makes column+multi-select work more like you expect multi-select to work based on your “modern VS” (and presumably Sublime) experience, then use that plugin.
- If the “undo without leaving multi-caret” is important to you, report the bug in the appropriate location, as described in the FAQ, as that is the only way that anything will have a chance of being done about it.
-
@peterjones said in Is multi-caret editing bugged?:
we use a 2017 at work, and I knew there was a 2019 after (and when I looked it up after seeing the post, there is also a 2022 version, apparently). So I shouldn’t be surprised that there are new features; sorry for my out-of-date information.
But I highly doubt that 2017 would not have the same keyboard setup choice – maybe an ancient version – wait, I’ll check, I also have VS2008 – time passes while he looks it up… – even that “old” version has it: