Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete line break in textmate

How to find and delete all the line breaks? I tried \n and it doesn't work! Regular expression? what kinda of expression?

like image 238
randomor Avatar asked Aug 04 '11 17:08

randomor


People also ask

How do I find line breaks in a text file?

Open any text file and click on the pilcrow (¶) button. Notepad++ will show all of the characters with newline characters in either the CR and LF format. If it is a Windows EOL encoded file, the newline characters of CR LF will appear (\r\n). If the file is UNIX or Mac EOL encoded, then it will only show LF (\n).

What are line breaks in text?

The end of a line of text in electronic form. Also called "EOL" (end-of-line), "newline," and "hard return," a line break code is generated when the Enter key is pressed, When typing a command on a command line, pressing Enter executes the command.


2 Answers

I found the answer in the TextMate IRC channel.

Press Option Return to search for literal line breaks in the Find and Replace panel.

Searching for \n works if you select the "Regular Expression" option, but won't work in the literal search mode.

like image 162
randomor Avatar answered Nov 05 '22 07:11

randomor


Without regex (regular search):

Alt + ⏎
like image 33
laffuste Avatar answered Nov 05 '22 08:11

laffuste