How do I align const declarations when reformatting code?
Is there a way to automatically align my const variable definitions with 6 spaces instead of 4? Like I can do with var declarations (Preferences > Editor > Code Style> Javascript > Other
const SCREEN_BEGIN = 'screenBegin',
SCREEN_WORK = 'screenWork',
SCREEN_SUCCESS = 'screenSuccess';
should align as:
const SCREEN_BEGIN = 'screenBegin',
SCREEN_WORK = 'screenWork',
SCREEN_SUCCESS = 'screenSuccess';
Please sign in to leave a comment.
In 2017.1.x, Preferences | Editor | Code Style | JavaScript | Other, Align var statements and assignments settings affect const declarations as well as vars
Thank you, this does work. However, is there a way to align just the variable names and not the equal signs?
Not possible currently, please vote for https://youtrack.jetbrains.com/issue/WEB-22356
Voted!
Hope it will be implemented soon.
For const and var.
Best regards,
Alexandre 8)