Adding new lines automatically in vs code

Viewed 66

While I am opening a file in visual studio code...in file automatically adding new lines. Example - In in a file there are totally 10 lines while I am opening this file in vs code that is showing 20 lines with that empty new lines. How I remove that blank new lines ? Thanks.

looking like this :-

                 <select class="form-control card-expiry-month" required >

                    <option value="">Month</option>

                    <option value="01">Jan (01)</option>

                    <option value="02">Feb (02)</option>

                    <option value="03">Mar (03)</option>

                    <option value="04">Apr (04)</option>

                    <option value="05">May (05)</option>

                    <option value="06">June (06)</option>

                    <option value="07">July (07)</option>

                    <option value="08">Aug (08)</option>

                    <option value="09">Sep (09)</option>

                    <option value="10">Oct (10)</option>

                    <option value="11">Nov (11)</option>

                    <option value="12">Dec (12)</option>

                </select>
1 Answers

The way I solve this problem (on my Windows machine) is :

I would search for "" in the find tool (Ctrl+F)

then select all the matches by pressing (Alt+Enter)

then move one line down by pressing the right arrow key.

then press the backspace key and it will clear all the extra lines.

Just left click anywhere on the screen to remove all the extra cursors.

Related