Vertical Blocks of Code

  • Comments posted to this topic are about the item Vertical Blocks of Code

  • Nice question, thanks Steve
    That is a handy feature...

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    β€œlibera tute vulgaris ex”

  • its working using alt+shift not alt.

  • It's a windows feature. Works in notepad and other programs as well.

  • amish-215805 - Wednesday, February 15, 2017 12:10 AM

    its working using alt+shift not alt.

    Shift is not required, and forms part of the "Selecting Text" part of action, rather than the vertical block part. If you use the mouse to select the text then you only need Alt.

  • I chose CTRL+Shift, thinking that ALT+Shift was intended instead of. 
    ALT+Shift is functioning in all SSMSs (including ssms 2016) I use, and unfortunately just ALT doesn't work.

    Igor Micev,My blog: www.igormicev.com

  • Good question. I have used Alt-Ctrl-Shift to select a block in SQL for years but this is much better. Yes using just Alt works in SQL Server just need to be careful to select the characters you want on the first line before moving your mouse down.

    Thanks good question.

  • I've always used Shift-Alt for this, never realised using just Alt does the trick as well!!!!

    _________________________________________________________________________________SQLGeordieWeb:- Jarrin ConsultancyBlog:- www.chrisjarrintaylor.co.ukTwitter:- @SQLGeordie

  • Alt alone not doing that trick, Shift+Alt works.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • amish-215805 - Wednesday, February 15, 2017 12:10 AM

    its working using alt+shift not alt.

    Alt+Shift selects a block when using the keyboard. Alt by itself selects a block when dragging the mouse.

  • The only way using alt alone works is with the mouse which you shouldn't be using with short cuts anyway. Defeats the whole purpose. alt+arrow moves objects in the code. Shift+alt while using arrow gives block highlighting. Including a mouse with a short cut is uncivilized Steve. πŸ˜€

  • dale_berta - Wednesday, February 15, 2017 6:11 AM

    amish-215805 - Wednesday, February 15, 2017 12:10 AM

    its working using alt+shift not alt.

    Alt+Shift selects a block when using the keyboard. Alt by itself selects a block when dragging the mouse.

    Thanks, perfectly explained, see also this blog.

  • Bobby Russell - Wednesday, February 15, 2017 9:20 AM

    The only way using alt alone works is with the mouse which you shouldn't be using with short cuts anyway. Defeats the whole purpose. alt+arrow moves objects in the code. Shift+alt while using arrow gives block highlighting. Including a mouse with a short cut is uncivilized Steve. πŸ˜€

    How is using one hand for alt and the other one for the mouse and mouse button any less of a shortcut than using one hand for alt-shift and the other for the movement keys? 

    Isn't the only purpose of a shortcut to be easy and quick as opposed to hard and slow?

  • sknox - Wednesday, February 15, 2017 3:52 PM

    Bobby Russell - Wednesday, February 15, 2017 9:20 AM

    The only way using alt alone works is with the mouse which you shouldn't be using with short cuts anyway. Defeats the whole purpose. alt+arrow moves objects in the code. Shift+alt while using arrow gives block highlighting. Including a mouse with a short cut is uncivilized Steve. πŸ˜€

    How is using one hand for alt and the other one for the mouse and mouse button any less of a shortcut than using one hand for alt-shift and the other for the movement keys? 

    Isn't the only purpose of a shortcut to be easy and quick as opposed to hard and slow?

    Any time you remove your hand from the keyboard to the mouse you slow input down. Try the shift-Alt arrow vs. the Alt-mouse. You get the same result much faster because you don't have to move your hand to the mouse. If it doesn't select fast enough for you, up your keyboards rate in settings. πŸ˜€

  • TimCarrett - Wednesday, February 15, 2017 1:43 AM

    Good question. I have used Alt-Ctrl-Shift to select a block in SQL for years but this is much better. Yes using just Alt works in SQL Server just need to be careful to select the characters you want on the first line before moving your mouse down.

    Thanks good question.

    Actually it doesn't matter whether you sart at the bottom and work up or start at the top and work down, it doesn't matter wher you start at the right and work left or start at teh left and work righ, and it doesn't matter whether you move horizontally first and vertically second or vice versa or even alternate bits of each - you always end up with a rectangular block one of whose corners is where you started and the other is where you stopped.  So Yes, using just ALT works if you do as you describe, but it's far more flexible than that so you don't have to start at top left, then move to top right, and then move to bottom right as you describe.   At least that's true of SSMS version 13.0.16106.4, which is the current general release version.

    Tom

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic. Login to reply