Please consider editing your post and mark it as obsolete instead. Do you want to delete post?
Backtick autoformating
Permanently deleted user
Created
Is it possible to reach an effect that being between backticks on enter it would create a new line without 4 spaces at the beginning? This rule should only work for "backtickts" area.
This syntax is heavily used with the styled components library. Backticks indicate the beginning of a CSS block, which means it is far more pleasant to treat backticks as if they were braces in terms of formatting.
Please can you provide a full code sample? I don't have an indent created when hitting Enter within backticks in the following code:
resultant formatting is
This syntax is heavily used with the styled components library. Backticks indicate the beginning of a CSS block, which means it is far more pleasant to treat backticks as if they were braces in terms of formatting.
before:
const MyStyledDiv = styled('div')``;after new line:
const MyStyledDiv = styled('div')`[indent]
`
fully composed styled component:
const MyStyledDiv = styled('div')`
position: relative;
margin: 10px 20px;
padding: 10px;
background-color: #000000;
`;
Edit: I'm under the impression the original poster meant to say "with", not "without".
please feel free to file a request for this to youtrack, https://youtrack.jetbrains.com/issues/WEB
Related plugin issue: https://github.com/styled-components/webstorm-styled-components/issues/60