Keyboard column selection broken.

qwerky
Posts: 193
Joined: 21.10.2013 00:58

Re: Keyboard column selection broken.

Post by qwerky »

Thanks. Visual Studio Community version is another one with such a mode.

Could you tell me the last version of CudaText that did support that mode? I would like to run it along side the current version.
main Alexey
Posts: 3066
Joined: 25.08.2021 18:15

Re: Keyboard column selection broken.

Post by main Alexey »

I cannot tell, some version after 1.191 i guess.
qwerky
Posts: 193
Joined: 21.10.2013 00:58

Re: Keyboard column selection broken.

Post by qwerky »

Okay, I'll check and see if I can figure it out. Given all the other editors with the feature, I still remain hopeful that you may reinstate it at some point in the future, even if not right now.
main Alexey
Posts: 3066
Joined: 25.08.2021 18:15

Re: Keyboard column selection broken.

Post by main Alexey »

yes, I may reinstate it, maybe. can you tell me how user should activate/toggle this 'mode' in all other editors? using the menuitem with a checkmark? using hotkey w/o menuitems? using Cmd Palette or statusbar click? it is interesting.
qwerky
Posts: 193
Joined: 21.10.2013 00:58

Re: Keyboard column selection broken.

Post by qwerky »

As far as I know, they would all have a hotkey to toggle (in ConTEXT, it is Ctrl-L), and a menu item also.

ConTEXT is the only one I have installed to check on at this moment; it does not toggle on a status bar click (but it does update the status bar when the hotkey/menu is used). In your former implementation, it did toggle on status bar click, which I think is a good idea (if some status bar items toggle on click, then they all should--as many as can toggle; that's my thought).

Of those which have a Command Palette, it of course should be there as well.
main Alexey
Posts: 3066
Joined: 25.08.2021 18:15

Re: Keyboard column selection broken.

Post by main Alexey »

re-added the mode.

now Cmd Palette has 6 items
'mouse column selection, without Alt-key: toggle'
'mouse column selection, without Alt-key: on'
'mouse column selection, without Alt-key: off'
'keyboard column selection, without Alt-key: toggle'
'keyboard column selection, without Alt-key: on'
'keyboard column selection, without Alt-key: off'

and statusbar now shows 3 states for the '-' cell:
both modes off /
mouse mode on /
keybd mode on.

win64 beta
https://github.com/Alexey-T/CudaText/di ... t-16425485

please test.
qwerky
Posts: 193
Joined: 21.10.2013 00:58

Re: Keyboard column selection broken.

Post by qwerky »

Thanks for that, Alexey. I will test it out. Just as you posted, I was composing a reply, so I'll paste it here:

The one absolute requirement for me is true Virtual Space (cursor-past-end-of-line), and the second, just as important, is being able to select by columns (entirely by keyboard).

This would preferably be with a column-selection-mode, in which one toggles between normal selection mode and column selection mode; when in column selection mode, all of the Shift+Movement keys (Up/Down/Left/Right/PgUp/PgDn/Home/End/etc.) perform selection (just like in normal mode), but it is column selection. But if necessary, by secondary keys selection keys, such as Shift+Alt+Movement keys. The former is the type of mode which CudaText did have (and I hope may have again), while the latter is what it has now.

My third and fourth desired requirements are syntax-highlighting, and user-configurable shortcut keys.

ConTEXT, though it is very old and no longer maintained, fills the first two requirement perfectly, which is why I always keep it installed as a backup. And it still works fine, even on Windows 11. It also has good syntax-highlighting, though not as good as CudaText. Configurable shortcut keys is the one feature (of my major desired features) that it lacks.

UltraEdit is an excellent editor, fulfilling all these requirements, according to what I have read from documentation, though I have not used it, as it is very expensive, and further, I will never use software with a subscription model.

Visual Studio Community Edition (free) has Shift+Alt+Movement key column selections, but it has those column selection shortcuts for all movement keys, not just Up/Down/Left/Right. Further, it has configurable keybindings, so one can bind those commands to use, in column selection mode, the same Shift+Movement keys as are used in normal selection mode, thus fulfilling that requirement.

VS Code has column selection mode (and uses Shift-Alt-V to toggle that mode). However, it doesn't have true Virtual Space, but tries to fake it. So this breaks the column selection functionality.

Notepad++ is similar in that it lacks Virtual Space, which it tries to implement via a plug-in, but it is clunky and not fully supported, which is why I wouldn't use that editor. And the same is true of other Scintilla-based editors.

And that last comment (not true Virtual Space) also applies to other editors, such as jEdit and Crimson Editor, which otherwise have true rectangular selection mode, using Shift+Movement keys.

Others that I've tried (years ago) which don't measure up, include Geany, PSPad, RJ TexEd, Notepad3, Textadept, and EditPad Lite, which all fail in one way or another.

But many editors (some of those mentioned above) do use Shift+Alt+Movement keys for column selection, so if you do re-implement column-selection-mode (using the standard Shift+Movement keys), those other keys shouldn't be removed, as no doubt some users would prefer them.

Oh, and I tested many older CudaText versions, and found that 1.217.7.0 still has column selection mode, while 1.218.0.2 does not; so it seems that is where the change occurred.
qwerky
Posts: 193
Joined: 21.10.2013 00:58

Re: Keyboard column selection broken.

Post by qwerky »

Again, thanks Alexey. So in my testing, I have set Ctrl-L to toggle between keyboard-column-selection and normal selection. These comments apply to that mode.

First, just using Shift+Up/Down/Left/Right works as expected, and makes good rectangular selection, even when cursor is past end of line. Great!

Next, Shift+PgUp/PgDn works as expected, with multiple columns or even with just one column. Great!

Next, beginning with no selection, Shift+Home/End does nothing. If you first use Shift+Left/Right to begin a selection, and then use Shift+Home/End, the selection is extended to the beginning/end of line, BUT at that point no Shift+Movement key does anything at all; Shift must be released and the selection canceled.

Finally, Shift+Ctrl+Home/End creates a normal selection (instead of a column selection) to the beginning/end of the file.

So, there's a few glitches to work on, but I'm very pleased with the reinstatement of this mode.
main Alexey
Posts: 3066
Joined: 25.08.2021 18:15

Re: Keyboard column selection broken.

Post by main Alexey »

good catches.

- Shift+Home/End
- Ctrl+Shift+Home/End

were adressed, seems work ok now.
new win64 beta
https://github.com/Alexey-T/CudaText/di ... t-16427913
Post Reply