microsoft/vscode

Missing Sublime Text command - expand selection to scope

waderyan opened this issue · 4 comments

While building this extension to map Sublime Text default keyboard shortcuts to VS Code, I found that this feature is missing.

The feature is split selection into lines.

Default Sublime Text keybindings
Windows / Linux: ctrl+shift+space
Mac: cmd+shift+space

expand_selection_by_scope

Today an extension exists that provides this feature. I believe we should bring this into the product.

@waderyan There already is similar command. It's called smart select. But unfortunately I've found it to not be as fine grained as I'd wish.

{ "key": "shift+alt+right",       "command": "editor.action.smartSelect.grow",
                                     "when": "editorTextFocus" },
{ "key": "shift+alt+left",        "command": "editor.action.smartSelect.shrink",
                                     "when": "editorTextFocus" },

Luckily @windwp has created a great extension called expand-region which does this quite well.

image

Hi, I've found the Expand Selection To Scope extension and it works very much like the SublimeText feature.

Very good.

I'm using VSCode 1.18.1 and the built in

Selection -> Expand selection (Ctrl + Shift + Cmd + RightArrow)

and

Selection -> Shrink selection (Ctrl + Shift + Cmd + LeftArrow)

seem to cover this extremely well.

@roblourens it seems that can be closed as it's obviously already implemented.