Search code examples
sublimetext2sublimetextsublimetext3

Replace \n with actual new line in Sublime Text


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.


Solution

  • 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