Sublime Forum

Find and Replace special characters

#1

Hi all,

How can I use the Find or Replace functions to replace tabs or carriage returns? I’ve searched through the forum and the documentation I could find but haven’t found the answer I need. In other editors I’ve used, I can type “^t” to find tabs or “^p” to find carriage returns. What are the equivalents in Sublime? Are there similar strings to use for other control characters, as well?

While I’m at it, is there a plugin to do file comparisons to identify differences?

Thanks much.

0 Likes

#2

Enable regex in the find panel.

Then you can use \t for tabs. \r for carriage returns. \n for newlines.

0 Likes

#3

Use regular expressions:

http://www.regular-expressions.info/reference.html

0 Likes

#4

[quote=“facelessuser”]Enable regex in the find panel.

Then you can use \t for tabs. \r for carriage returns. \n for newlines.[/quote]

Right on, thank you.

0 Likes