Skip to content

Instantly share code, notes, and snippets.

@stephenreay
Created May 31, 2011 00:26
Show Gist options
  • Save stephenreay/999678 to your computer and use it in GitHub Desktop.
Save stephenreay/999678 to your computer and use it in GitHub Desktop.
Tab-only indenting
// Use an indent of 1 tab. Drop anything that breaks a line and indent one full level:
SomeObject
.myMethod().chain1()
.chain2().chain3();
SomeObject.myMethod({
some: value,
another: value
});
var myList = [
"some",
"another"
];
NameSpace.Indents.A.Lot.SomeObject
.chainMethod(foo)
.chainMethodWithALongName(
bar,
someReallyLongVariable
)
.chainMethod({
foo: bar,
another: [
'set',
'of',
'values'
]
})
.chainMethod([
foo,
bar,
value
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment