Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add semicolon to the end of the line in visual studio code

I press Shift+Enter, but not working, Ctrl+Enter start a new line, but not add semicolon at the end of previous line. Is there a shortcut?

like image 616
eryrewy Avatar asked May 08 '15 07:05

eryrewy


People also ask

What is a trailing semicolon?

The trailing semicolon is the last semicolon in a declaration block and it is optional. This rule ignores: Less mixins. trailing // comments.

How do you break a line in VS Code?

Use the line-continuation character, which is an underscore ( _ ), at the point at which you want the line to break. The underscore must be immediately preceded by a space and immediately followed by a line terminator (carriage return) or (starting with version 16.0) a comment followed by a carriage return.


1 Answers

Now there is an extension called Colonize:

Shift+Enter Insert semicolon at the end of line and continue on the same line

Alt+Enter Insert semicolon at the end of line and continue on the new line

Ctrl+Alt+Enter Insert semicolon and stay at the same position

like image 142
ST7 Avatar answered Sep 22 '22 14:09

ST7