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

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -