Hi everyone,
A quick post on how to merge a multiline block into a single line using Visual Studio Code:
-- From this CREATE TABLE posts ( post_id INT IDENTITY(1,1) PRIMARY KEY, title VARCHAR(100), description VARCHAR(MAX), user_id VARCHAR(255) NOT NULL, created DATETIME NOT NULL, updated DATETIME NOT NULL, version INT NOT NULL, up_votes INT NOT NULL, down_votes INT NOT NULL, updated DATETIME NOT NULL ); -- To this CREATE TABLE posts ( post_id INT IDENTITY(1,1) PRIMARY KEY, title VARCHAR(100), description VARCHAR(MAX), user_id VARCHAR(255) NOT NULL, created DATETIME NOT NULL, updated DATETIME NOT NULL, version INT NOT NULL, up_votes INT NOT NULL, down_votes INT NOT NULL, updated DATETIME NOT NULL )
Simply highlight your code block, press F1, and then type “join lines”. Pressing enter will join everything. If you’re on a mac you can also use ctrl+j.