Skip to main content

How to edit all lines at once in Visual Studio Code

Edit the end

Edit the end of all lines.

  • Ctrl+A selects all lines in the file. (Or select just the lines you want.)
  • Shift+Alt+I puts a cursor at the end of each line.
  • Type whatever you want at the end of all the lines.

Edit the beginning

Edit the beginning of all lines.

  • Ctrl+A
  • Shift+Alt+I
  • Home moves all the cursors to the beginning of each line.
  • Type what you want at the beginning of all the lines.

References

  1. "How to edit all lines in Visual Studio Code." Stack Overflow.