Closed
Description
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.
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
Labels
No labels