Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 417437

Summary: Cannot insert whitespace characters in Replace field
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: Silenio_Quarti
Version: 3.0   
Target Milestone: 4.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-09-17 10:34:05 EDT
Until recently escape sequences like \n and \t could be used in the Replace field, to insert newlines and tabs, like this:

1. Open the Find toolbar in an editor (Ctrl+F)
2. Enable the "Regular expression" option.
3. In the Find field enter ' {4}' (that is a space followed by {4}, without the quotation marks).
4. In the Replace field, enter \t

This used to replace sequences of 4 spaces with a Tab character. But now it replaces them with the literal text "\t". 

Perhaps the old behavior was accidental, but I found it useful. I would like to have this in some form.

FWIW the Eclipse desktop text editor supports several such escape sequences, including:
 \t  Tab
 \r  CR (U+000D)
 \n  LF (U+000A)
 \R  Default line delimiter of document
Comment 1 Silenio Quarti CLA 2013-09-18 14:12:25 EDT
I am not sure how this stopped working. Anyways, I added support for the cases you mentioned. And to insert the literal "\t", it is necessary to type a double the slash -> "\\t".

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=96bbc09d858c74946dbaa292ea43ff11d4260a27