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';

 

4 comments

In 2017.1.x, Preferences | Editor | Code Style | JavaScript | Other, Align var statements and assignments settings affect const declarations as well as vars

0

Thank you, this does work.  However, is there a way to align just the variable names and not the equal signs?

0

Voted!

Hope it will be implemented soon.

For const and var.

Best regards,

Alexandre 8)

 

0

Please sign in to leave a comment.