Skip to content

Visual Studio extension for remove empty lines (more than one consecutive empty line)

License

Notifications You must be signed in to change notification settings

ArnaudMarcille/EmptyLineExtension

Repository files navigation

EmptyLine Extension

Visual Studio extension for remove empty lines (more than one consecutive empty line)

Build Status

Getting Started

The extension is available the marketplace or directly in Visual studio in Tools => Extension and Update

marketplace marketplace

How to use it ?

Manual

Once the extension is installed, a "Remove empty lines" option is available when right clicking in a file.

Image

If there is some selected text, the selection will be the only part of the document that will be processed.

Automatic

There is now an option in Visual Studio for auto-reformat the code:

you can fint it in Tools => Options => EmptyLine Extension

Configurations

With the version 1.1.0, you can edit the number of allowed lines, for that go on "Tools => Options => EmptyLine Extension", and edit the option "Allowed lines", by default there is no values, in this case, 1 line is kept, if you didn't want any line, then set value to 0. All numbers are allowed for this option.

Delete at start file

Since version 1.3.1, an option is avaiable for delete, in all cases, all the empty line at the start of the file.

Image

Regex

Since version 1.3.0, you can now add some specific rules in regex. The regex will be apply to the file full path (path and file name).

See below an exemple who will manage all the json file, and set the number of tolerated line to 0:

Image

you can add multiples rules, and manage them as you want.

Prerequisites

The extension is only available Visual Studio 2017, 2019, 2022.

About

Visual Studio extension for remove empty lines (more than one consecutive empty line)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages