How can I replace \n
in Sublime Text with real in-editor displayed new line so:
foo\nbar
becomes:
foo bar
in the editor when I view the file in it.
So: Press CTRL-h and the Replace dialog will open. Type \r\n in "Find what" and \\r\\n in "Replace with". Then select search mode Extended (\r, \n, \t, \x..., \0) and click "Replace All".
To insert a new line below the current line in your code, hit Cmd–Return (Mac) or Ctrl–Enter(Windows).
To use Find and Replace in Sublime Text 3, you can either click “Find” in the top-bar, then select “Replace” from the list, or you can press the keyboard shortcut Ctrl+H – the same way it works in, for example, Microsoft Office Word.
In the local searchbox ( Ctrl + F ) you can insert newlines by pressing Ctrl + Enter . If you use the global search ( Ctrl + Shift + F ) you can insert newlines by pressing Shift + Enter .
Turn on Regex Search and Replace (icon most to the left in search and replace bar or shortcut Alt + R)
Find What: \\n
Replace with: \n
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With