To select two or more lines in Visual Studio Code (VS Code) that are not consecutive, there are a few options available. One way is to use the multi-cursor editing feature in VS Code [1][2][4][6]. Multicursor Editing Insert Cursor at Specific Location: * Windows/Linux: `Alt + Click` * macOS: `Option + Click` Explanation: Holding the Alt key (Option on macOS) and clicking at a specific location in the code editor allows you to insert a cursor at that point. You can have multiple cursors by clicking multiple times [2]. Insert Cursors at End of Selected Lines: * Windows/Linux: `Shift + Alt + I` * macOS: `Shift + Option + I` Explanation: Select multiple lines of text in the code editor and then use this shortcut to insert a cursor at the end of each selected line. This is useful for making changes to multiple lines simultaneously [2][4]. Add More Cursors: * Windows/Linux: `Shift + Alt + Down/Up` * macOS: `Shift + Option + Down/Up` Explanation: Use this shortcut to add additional cursors below or above the current cursor position. It is handy when you want to edit or insert text on multiple lines at different locations [1][4]. Selecting Multiple lines using mouse and keyboard shortcuts Select Non-Consecutive Lines: * Windows/Linux: `Alt + Click and Drag Mouse` * macOS: `Option + Click and Drag Mouse` Explanation: Click and drag the mouse while holding the Alt key (Option on macOS) to select multiple lines that are not consecutive. You can create a selection that includes various lines throughout your code [1]. Add Lines to Selection: * Windows/Linux: `Ctrl + Click` * macOS: `Cmd + Click` Explanation: Hold down the Ctrl key (Cmd on macOS) and click on lines to add them to the current selection. This is useful for selecting specific lines from different parts of your code [1]. Move Selected Lines Up/Down: * Windows/Linux: `Ctrl + Shift + Alt + Up/Down` * macOS: `Cmd + Shift + Option + Up/Down` Explanation: Use these shortcuts to move the selected lines up or down in your code. This is helpful for rearranging code blocks or lines of text. Additional Ways to select multiple lines Column (Box) Selection: * Windows/Linux:`Shift + Alt + Click and Drag Mouse` (or `Alt + Shift + Down/Up Arrow`) * macOS: `Shift + Option + Click and Drag Mouse` (or `Option + Shift + Down/Up Arrow`) Explanation: To make a rectangular (box) selection, you can hold down the Shift and Alt keys (Shift and Option on macOS) simultaneously while clicking and dragging the mouse to select a block of text. You can also use the keyboard shortcuts to extend the block selection up or down. Select All Occurrences of a Word: * Windows/Linux: `Ctrl + Shift + L` * macOS: `Cmd + Shift + L` Explanation: Place the cursor within a word, and then use this shortcut to select all occurrences of that word within the document. This is handy for making simultaneous changes to all instances of a particular term. Find and Select Text with Find Widget: * Windows/Linux: `Ctrl + F` * macOS: `Cmd + F` Explanation: Open the Find widget by pressing the keyboard shortcut and enter the text you want to select. Pressing Enter will highlight all instances of that text, and you can then use the keyboard shortcuts Ctrl + Shift + L (Windows/Linux) or Cmd + Shift + L (macOS) to select them all. These are just a few ways to select multiple lines in VS Code. There are many other keyboard shortcuts and features available that can help you edit your code more efficiently [3].