Content is user-generated and unverified.

Code Indentation Style Guide

CRITICAL: Use this exact indentation style for all code. This is required for outliner compatibility.

Rules

  1. Use TABS for indentation (never spaces)
  2. Closing braces align with content inside the block (NOT with the opening statement)
  3. Always put a space between function name and left paren (both declaring and calling)
  4. Object literals: Opening brace on same line, properties indented, closing brace aligned with content
  5. Object property access: Space before brackets: stats.guids [x] not stats.guids[x]
  6. This creates proper outline structure when pasted into an outliner

Example Patterns

CSS

css
.tableContainer th, .tableContainer td {
	text-align: left;
	}
.tableContainer th {
	cursor: pointer;
	font-weight: inherit;
	}

JavaScript

javascript
function myFunction () {
	if (condition) {
		doSomething ();
		}
	else {
		doSomethingElse ();
		}
	}

const result = myFunction ();
someObject.method (parameter);
addEventListener ('click', handleClick);

If-Then-Else Structure

javascript
if (alower == blower) {
	val = 0;
	}
else {
	if (blower > alower) {
		val = -1;
		}
	else {
		val = 1;
		}
	}

Object Literals

javascript
var options = {
	enabled: true,
	feedUrls: new Array (),
	secsBetwChecks: 60,
	maxGuids: 2500
	};

Object Property Access

javascript
stats.guids [x]
theItem.guid
stats.guids [item.guid]

HTML

html
<div class="container">
	<div class="content">
		<p>Text content here</p>
		</div>
	</div>

Key Points

  • The closing brace } or </div> is indented at the SAME level as the content inside, NOT aligned with the opening statement
  • Function calls and declarations always have a space before the opening parenthesis
  • This is essential for the outliner to create the correct structure when code is pasted

Usage

Paste these instructions at the start of any coding conversation to ensure proper formatting.

Content is user-generated and unverified.
    Code Indentation Style Guide | Claude