0

I want to align the indentation to the equal sign when formatting my code. Is there any plugin or setup out there?

Before:

const React = require('react');
const MainContainer = require('../../components/container/main');
const HasAnyRole = require('../../components/auth/has-any-role');

After:

const React         = require('react');
const MainContainer = require('../../components/container/main');
const HasAnyRole    = require('../../components/auth/has-any-role');
ivi_does_it
  • 155
  • 1
  • 8

2 Answers2

1

This feature is implemented in different IDE in different ways.

If you use SublimeText you can try this plugin: AlignTab

Jetbrains IDE documentation:

Settings | Code Style | Javascript | Variable declarations | Align | When multiline

Then

Code | Reformat code

zxdx
  • 101
  • 1
  • 4
0

depends on your IDE, IntelliJ has a setting for that

Lefthandmedia
  • 385
  • 1
  • 3
  • 5