Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aligning nested objects #57

Open
kikito opened this issue Sep 19, 2017 · 1 comment
Open

Aligning nested objects #57

kikito opened this issue Sep 19, 2017 · 1 comment

Comments

@kikito
Copy link

kikito commented Sep 19, 2017

Hi,

I've been looking around the docs but could not find a way to do this. Say I have a nested javascript object, such as this:

var collection = {
  title: "Star Wars",
  author: "George Lucas & others",
  episodes: {
    "IV": "A New Hope",
    "V": "The Empire Strikes Back",
    "VI": "Revenge of the Sith"
  }
}

What is the fastest way to align the colons taking into account the nesting, so it becomes like this?

var collection = {
  title   : "Star Wars",
  author  : "George Lucas & others",
  episodes: {
    "IV": "A New Hope",
    "V" : "The Empire Strikes Back",
    "VI": "Revenge of the Sith"
  }
}

The only way I've found so far is manually selecting every sub-object, but that's a bit painful with lots of nesting / lots of individual objects.

@lesm
Copy link

lesm commented Mar 25, 2020

:Tabularize /:\zs/l0l1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants