Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm following the Douglas Crockford's code convention, but I can't get the correct identation in JS mode in Emacs. I tried to customize the mode, try another mode like js3 but nothing seems to work.

When I have parenthesis and I have to break the expression, Emacs does this:

this.offices.each(this.addOfficesToMap,
                  this);

When the convention that I'm following that the code should look like:

this.offices.each(this.addOfficesToMap,
    this);

Any idea of how I can change the indentation on braked expressions?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.