The way to insert next line(\n) into config, string type


I couldn’t find a way to insert next line character(\n) in Package

When input “\n\n”.${text}":{" in string field on package config (see below):

It saved \\n\\n\".${text}\":{.
I expect \n\n\".${text}\":{.
Is there any way?



The \n is just a convention that means “whatever is the line ending character(s) for the current platform”. There’s no special meaning to it unless some system gives it a special meaning. The package would have to detect the set of characters “\n” and replace it with the line ending characters when it does whatever it does with that configuration setting.

The Settings View is doing the right thing, when you type \n turning it into "\\n" in the config.cson, that’s the proper way to encode that value so that it comes back as \n when you view it in the Settings View again.