Delete blank lines in a file using Notepad++


Posted on : Tue, 8th Sep 15 01:04 pm (Updated on : Tue, 8th Sep 15 01:04 pm) UTC
Author : Code2care
2314 votes

If you have a text file, or any programming language file and you want to remove all the blank lines that are there in the file you can make use of Notepad++ Text Editor to make this task easier (imagine doing that manually) .

Note : You need to download a plugin called TextFX for Notepad++.
Features of this Plugin : 
- Text sorting
- Text rewrap
- Column Lineup
- Fill Text Down 
- Interactive Brace Matching
- Quote handling
- Character case alternation
- Insert counter text down
- Text to code conversion
- Ascii Chart
- Leading whitespace repair 
- Autoclose HTML & braces
- Numeric Conversion
- URI & HTML encoding
- HTML to text conversion
- Submit text to W3C

Plugin Homepage: http://textfx.no-ip.com/textfx/
To download the plugin goto Menu -> Plugins -> Plugin Manager -> Show Plugin Manager and under Available tab look for TextFX, check the Checkbox next to it and install it. Once the plugin is downloaded your notepad++ editor will restart and you must be able to see TextFX on Menu Options.


Advertisements





Steps to remove blank lines

  1. Open the file using Notepad++
  2. Select the text in the file from which you want to remove the blank lines (select all if you want to remove blank lines from the complete file)
  3. Now go-to Menu -> TextFX -> TextFX Edit -> Delete Blank Lines

    Select TextFX Edit -> Delete Blank lines

  4. Thats all!! All blanks lines are now being removed!

Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

Follow us : Facebook - Twitter - Google +