regex - How to delete empty lines in a file by Emacs? -



regex - How to delete empty lines in a file by Emacs? -

in emacs, how remove empty lines (including tabs , spaces) in file ?

can m-x replace-regexp trick?

i can find empty lines regexp: ^[st]*$, don't know how replace deleting.

thanks!

^ , $ match starts , ends of lines, not actual end-of-line characters. have explicitly type newline in look replace it.

to accomplish goal, replace-regexp

^[[:space:]]*^j

with nil (empty text). come in ^j, first press command , q, command , j. in entry field, shows actual line change.

regex emacs str-replace

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -