Auto-indenting works fine with end-of-line braces:
fs.readFile('whatever', (err, content) => {<CR>
// do something useful<CR>
}<CR>
However, this breaks when using K & R style:
fs.readFile('whatever', (err, content) =><CR>
{<CR>
// do something<CR>
}
Indentation of the function body is initially correct, but as soon as you press the '{' key, the indentation level is incremented. Looks like this is happening due to the indentkeys including 0{. Removing it from indentkeys makes delimitMate work, but that results in this:
if (x < 2)<CR>
{<CR>
// more stuff<CR>
}
Auto-indentation no longer removes the extra indentation level on the { key press.
Auto-indenting works fine with end-of-line braces:
However, this breaks when using K & R style:
Indentation of the function body is initially correct, but as soon as you press the '{' key, the indentation level is incremented. Looks like this is happening due to the
indentkeys
including0{
. Removing it fromindentkeys
makesdelimitMate
work, but that results in this:Auto-indentation no longer removes the extra indentation level on the
{
key press.