Ask Your Question

Revision history [back]

To modify the double-click action in vscode editor to expand the selected text area, you can follow these steps:

  1. Open VS Code editor.

  2. Go to the "File" menu and click on "Preferences" -> "Keyboard Shortcuts".

  3. In the "Search Keybindings" field, type "editor.action.smartSelect.grow".

  4. Once the search results appear, click on the "+" icon next to the "editor.action.smartSelect.grow" option.

  5. In the pop-up box, press the "Double Click" key combination (usually left mouse button).

  6. Click the "Add" button to assign the shortcut.

  7. Now, whenever you double-click on a word in the editor, the selected area will be expanded to include the surrounding text.

You can also modify the expansion behavior by going to "File" -> "Preferences" -> "Settings" and searching for "cursorWordNavigation". There you can specify how many characters should be selected, what types of characters constitute a "word", and whether to include or exclude whitespace.