2017-04-19 88 views

回答

0

你可以做列选择多种方式,

  • 正如您所指出的,将光标移动到第一列按的第一个字开始(左)和持有Alt + Shift,然后右箭头选择顶行 (尝试Ctrl + Shift如果以前的组合键不起作用)。按下按键继续选择列,按向下键键。

  • 将光标移动到第一列 新闻的第一个字开始(左)和持有ALT + SHIFT,然后反复按向下箭头增添更多游标。 (VSCode的某些版本也使用按Ctrl + Shift代替) 一旦光标加入通过简单Shift +向右箭头

  • 按Ctrl + d选择字的下一个出现目前选择的字在光标下。

  • 按Ctrl + Shift + L选择目前正在光标选择的字的所有出现,不管那些词语是上述的光标下面的。

+0

他们没有在这里工作。我仍然无法像普通的Visual Studio ALT +箭头那样做。 –

+0

@AndréLuizCarletti你可能有一个旧版本的VSCode。 –

+0

我使用的是版本1.11.2。日期2017-04-13。我需要任何特殊的插件来使捷径工作? –

0

默认情况下,这是按Ctrl + Shift + Alt +箭头

如果你想重新绑定到与Visual Studio对齐,把这个在您的keybindings.json

{ 
    "key": "shift+alt+down", 
    "command": "cursorColumnSelectDown", 
    "when": "editorTextFocus" 
}, 
{ 
    "key": "shift+alt+left", 
    "command": "cursorColumnSelectLeft", 
    "when": "editorTextFocus" 
}, 
{ 
    "key": "shift+alt+pagedown", 
    "command": "cursorColumnSelectPageDown", 
    "when": "editorTextFocus" 
}, 
{ 
    "key": "shift+alt+pageup", 
    "command": "cursorColumnSelectPageUp", 
    "when": "editorTextFocus" 
}, 
{ 
    "key": "shift+alt+right", 
    "command": "cursorColumnSelectRight", 
    "when": "editorTextFocus" 
}, 
{ 
    "key": "shift+alt+up", 
    "command": "cursorColumnSelectUp", 
    "when": "editorTextFocus" 
} 

这将与该复制线或生长/智能选择缩小默认功能冲突,这样你就可以添加这个交换那些需要控制

, 
{ 
    "key": "shift+alt+up", 
    "command": "cursorColumnSelectUp", 
    "when": "editorTextFocus" 
}, 
{ 
    "key": "ctrl+shift+alt+down", 
    "command": "editor.action.copyLinesDownAction", 
    "when": "editorTextFocus && !editorReadonly" 
}, 
{ 
    "key": "ctrl+shift+alt+up", 
    "command": "editor.action.copyLinesUpAction", 
    "when": "editorTextFocus && !editorReadonly" 
}, 
{ 
    "key": "ctrl+shift+alt+right", 
    "command": "editor.action.smartSelect.grow", 
    "when": "editorTextFocus" 
}, 
{ 
    "key": "ctrl+shift+alt+left", 
    "command": "editor.action.smartSelect.shrink", 
    "when": "editorTextFocus" 
}