vsCode: Quotes around multiple lines

Visual Studio Code natively supports editing multiple lines, adding a quote at the beginning of the line and a quote followed by a comma at the end of the line. Here’s how. This example is from vsCode running on Windows 10.

  • ctl+home – to move to top
  • shift+ctl+alt+[down arrow] – to select all lines that you wish to multi-line edit
  • single tick – adds opening tick to all selected lines
  • end – to jump to the end of all lines in this multi-line edit block
  • single tick and comma – close and end all lines
  • esc – to get out of multi-line edit mode
  • ctl+a – to select all lines
  • [ – to enclose the entire list as an array (this is JavaScript)
  • ctl+home to jump to the top
  • type “var whatever =” – to complete the array

Leave a comment