Author Topic: Block editing mode - useful enhancement suggeston  (Read 230 times)

Johnco3

  • Community Member
  • Posts: 53
  • Hero Points: 1
Block editing mode - useful enhancement suggeston
« on: September 01, 2023, 05:53:14 am »
I noticed that in block editing mode (alt + select a vertical column of text or a column in between the text) the right arrow keys cancels the mode reverting back to normal editing mode, this is different to how things work in visual studio where escape is the exit key to terminate the edit mode (at least with the normal key bindings).  This staying in block edit mode is extremely useful while modifying multiple columns in CSV files just to name one example.  Consider the case where I need to wrap opening and closing quotes around a fixed width column.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3910
  • Hero Points: 512
Re: Block editing mode - useful enhancement suggeston
« Reply #1 on: September 01, 2023, 07:06:29 pm »
Have you tried multiple cursors?  Try using Ctrl+Alt+Shift+Cursor Down to paint multiple cursors on multiple lines.  It is much more powerful than block edit mode.  With this you can use Escape to cancel the multiple cursors.

Johnco3

  • Community Member
  • Posts: 53
  • Hero Points: 1
Re: Block editing mode - useful enhancement suggeston
« Reply #2 on: September 01, 2023, 08:46:29 pm »
Thank you for the suggestion, I tried to get the  Ctrl+Alt+Shift+Cursor Down combination to work. This turns the cursor into a cross hair; however I cannot get it to select anything - do I need to change keyboard emulation to something other than Visual Studio? 

My obvervation about block edit mode was about incompatibility with the VS equivalent (I spend quite a lot of time in VS and switch 20% of the time to SlickEdit) - I keep knocking Visual Slickedit out of Block edit mode when I use the arrow key to adjust for a different column.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3910
  • Hero Points: 512
Re: Block editing mode - useful enhancement suggeston
« Reply #3 on: September 01, 2023, 08:59:10 pm »
I just checked Visual Studio emulation and it worked fine.  It shouldn't turn the cursor into a cross-hair, it should just create multiple cursors, one for each line you move over.  Once you have multiple cursors, you can edit as if you had just one cursor (but it will move and/or modify all of them).

Johnco3

  • Community Member
  • Posts: 53
  • Hero Points: 1
Re: Block editing mode - useful enhancement suggeston
« Reply #4 on: September 02, 2023, 02:49:08 am »
Very strange, once I press the Ctrl key while in a SlickEdit source code window - the cursor turns into a Cross hair (a large plus sign - about double the size of a cursor) and I cannot use this to select text.  One thing to note is that I have multiple languages installed for my windows keyboard (the shift+alt windows key combination is a reserved windows default combination to switch the language keyboard settings (for windows not SlickEdit) (next the clock I will see this change from ENG to ESP for example as I cycle through this keyboard shortcut) - I'm not sure if this is an issue inhibiting this new block cursor mode (which is an additional key beyond the 2 used to switch keyboard languages).

Also, don't you think that the arrow keys should not termimate block selection mode?  Firstly it would make the mode easier to use and secondly it would be compatible with Visual Studio - which happens to be the current emulation mode I am using.

Thanks
John

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6582
  • Hero Points: 511
Re: Block editing mode - useful enhancement suggeston
« Reply #5 on: September 02, 2023, 02:29:51 pm »
It looks like Visual studio has changed it's implementation of selecting text with Alt+LButtonDown. In Visual Studio 2019, any cursor movement would cancel the selection. In Visual Studio 2022, only the Esc key will cancel the column selection. Visual Studio 2022 is creating multiple cursors and not creating a single column selection with one cursor (not sure what 2019 was doing).

To create a Visual Studio 2022 style of column selection, hold down Shift and use the Right mouse button. Shift+RButtonDn and drag.

The binding for Shift+RButtonDn is mou-click-block-add-cursors. This is like Visual Studio 2022 Alt+LButtonDn which adds a cursor/selection per line.

The binding for Alt+LButtonDn is mou-click-copy-block. This creates a single cursor column selection. The one you seem not to like. More similar to Visual Studio 2019 and before.

One clear downside to multiple cursors is that it can't handle many thousands of lines/cursors. Not sure what the limit is. A single column selection can contain any number of lines (millions and more). Other than that limit, this is totally a user preference thing for sure. I mostly avoid multiple cursors because they trip me up. I'm way too used to a single selection and cursor being created and for any cursor movement to cancel the selection like all other selections.