Skip to content

Indentation no longer working #1003

Closed
Closed
@JESii

Description

@JESii

Recently (last few weeks), JavaScript indenting no longer works - numerous sections of code get outdented too far, but some still work.

I'm writing ES6 code and using only vim-javascript and vim-jsx.

Plugin 'mxw/vim-jsx', { 'for': ['javascript', 'javascript.jsx'] }
Plugin 'pangloss/vim-javascript', { 'for': ['javascript', 'javascript.jsx'] }

(The 'for' clauses are new today; an unsuccessful attempt to solve the problem)

Here's a screenshot of the output; code text follows.
image

Here's the code:

import React from 'react';
import ReactDOM from 'react-dom';

class GetWinningScoreForm extends React.Component {
constructor(props) { super(props);
this.submit = this.submit.bind(this);
}
submit(e) {
const { _score } = this.refs
e.preventDefault();
alert(`New Winning Score: ${_score.value}`);
_score.value = '';
}
render() {
return (
  <div>
    <span>
      Current winning score is: //props.winningScore//
    </span>
    <span>
      Set Winning score:
    </span>
    <form onSubmit={this.submit}>
      <input ref="_score"
        type="text"
        placeholder="new score..." required/>
      </form>
    </div>
)
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions