Config Key : pragma_insert
Description : Insert a marker at the top of a file specifying the file has been beautified
Available since version : 0.7.0 (Current: )
Type : boolean
Default : false
Support
Languages : CSS , GraphQL , JSX , JavaScript , Less , Markdown , SCSS , TypeScript , Vue
Beautifiers : Prettier
Comparison Table
Examples
Invisible characters are shown with the following symbols:
Carriage Return = ␍ ; Line Feed = ␊ ; Tab = ⇥ ; Whitespace = · .
🚧 Original Code
.class1·{␊
··background -color :·red ;␊
}␊
🔧 true
Using Prettier beautifier:
␊
␊
.class1·{␊
··background -color :·red ;␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"CSS" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,5 @@
+/**·@format·*/␊
+␊
.class1·{␊
··background-color:·red;␊
}␊
🔧 false
Using Prettier beautifier:
.class1·{␊
··background -color :·red ;␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"CSS" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
🚧 Original Code
{␊
····me ·{␊
········name ␊
····}␊
}␊
🔧 true
Using Prettier beautifier:
␊
{␊
··me ·{␊
····name ␊
··}␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"GraphQL" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,5 +1,7 @@
+#·@format␊
+␊
{␊
-····me·{␊
-········name␊
-····}␊
+··me·{␊
+····name␊
+··}␊
}␊
🔧 false
Using Prettier beautifier:
{␊
··me ·{␊
····name ␊
··}␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"GraphQL" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,5 +1,5 @@
{␊
-····me·{␊
-········name␊
-····}␊
+··me·{␊
+····name␊
+··}␊
}␊
🚧 Original Code
function ·sayHello ( )· {␊
console .log("Hello·world" );␊
}
🔧 true
Using Prettier beautifier:
␊
␊
function ·sayHello ( )· {␊
··console .log("Hello·world" );␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,5 @@
+/**·@format·*/␊
+␊
function·sayHello()·{␊
\ No newline at end of file
-console.log("Hello·world");␊
-}
+··console.log("Hello·world");␊
+}␊
🔧 false
Using Prettier beautifier:
function ·sayHello ( )· {␊
··console .log("Hello·world" );␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,3 @@
function·sayHello()·{␊
-console.log("Hello·world");␊
-}
\ No newline at end of file
+··console.log("Hello·world");␊
+}␊
🚧 Original Code
function ·sayHello ( )· {␊
console .log("Hello·world" );␊
}
🔧 true
Using Prettier beautifier:
␊
␊
function ·sayHello ( )· {␊
··console .log("Hello·world" );␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JavaScript" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,5 @@
+/**·@format·*/␊
+␊
function·sayHello()·{␊
\ No newline at end of file
-console.log("Hello·world");␊
-}
+··console.log("Hello·world");␊
+}␊
🔧 false
Using Prettier beautifier:
function ·sayHello ( )· {␊
··console .log("Hello·world" );␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JavaScript" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,3 @@
function·sayHello()·{␊
-console.log("Hello·world");␊
-}
\ No newline at end of file
+··console.log("Hello·world");␊
+}␊
🚧 Original Code
@primary: ··green;␊
@secondary: ·blue;␊
␊
.section ·{␊
··@color: ·primary;␊
␊
··.element ·{␊
····color :·@@color ;␊
··}␊
}␊
🔧 true
Using Prettier beautifier:
␊
␊
@primary: ·green;␊
@secondary: ·blue;␊
␊
.section ·{␊
··@color: ·primary;␊
␊
··.element ·{␊
····color :·@@color ;␊
··}␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Less" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,5 +1,7 @@
-@primary:··green;␊
+/**·@format·*/␊
+␊
+@primary:·green;␊
@secondary:·blue;␊
␊
.section·{␊
··@color:·primary;␊
🔧 false
Using Prettier beautifier:
@primary: ·green;␊
@secondary: ·blue;␊
␊
.section ·{␊
··@color: ·primary;␊
␊
··.element ·{␊
····color :·@@color ;␊
··}␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Less" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,5 +1,5 @@
-@primary:··green;␊
+@primary:·green;␊
@secondary:·blue;␊
␊
.section·{␊
··@color:·primary;␊
🚧 Original Code
␊
This·is ·a·test␊
🔧 true
Using Prettier beautifier:
␊
␊
#·Hello·World␊
␊
This·is·a·test␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Markdown" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,5 @@
+<!--·@format·-->␊
+␊
#·Hello·World␊
␊
This·is·a·test␊
🔧 false
Using Prettier beautifier:
␊
This·is ·a·test␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Markdown" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
🚧 Original Code
.selector·{␊
··background -color :·red ;␊
}
🔧 true
Using Prettier beautifier:
␊
␊
.selector·{␊
··background -color :·red ;␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"SCSS" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,5 @@
+/**·@format·*/␊
+␊
.selector·{␊
\ No newline at end of file
··background-color:·red;␊
-}
+}␊
🔧 false
Using Prettier beautifier:
.selector·{␊
··background -color :·red ;␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"SCSS" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,3 @@
.selector·{␊
··background-color:·red;␊
-}
\ No newline at end of file
+}␊
🚧 Original Code
function ·sayHello ( )· {␊
console .log("Hello·world" );␊
}
🔧 true
Using Prettier beautifier:
␊
␊
function ·sayHello ( )· {␊
··console .log("Hello·world" );␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"TypeScript" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,5 @@
+/**·@format·*/␊
+␊
function·sayHello()·{␊
\ No newline at end of file
-console.log("Hello·world");␊
-}
+··console.log("Hello·world");␊
+}␊
🔧 false
Using Prettier beautifier:
function ·sayHello ( )· {␊
··console .log("Hello·world" );␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"TypeScript" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,3 @@
function·sayHello()·{␊
-console.log("Hello·world");␊
-}
\ No newline at end of file
+··console.log("Hello·world");␊
+}␊
🚧 Original Code
<div ·id ="app" >␊
··{{·message·}}␊
</div >␊
🔧 true
Using Prettier beautifier:
␊
␊
<div·id="app" > ␊
·· {{·message·}} ␊
</div > ␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Vue" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : true ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original
@@ -1,3 +1,5 @@
+<!--·@format·-->␊
+␊
<div·id="app">␊
··{{·message·}}␊
</div>␊
🔧 false
Using Prettier beautifier:
<div ·id ="app" >␊
··{{·message·}}␊
</div >␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Vue" : {
"indent_size" : 2 ,
"indent_char" : " " ,
"pragma_insert" : false ,
"beautifiers" : [
"Prettier"
]
}
}
Difference from original